Louie Nohay | 1 Feb 02:31

Help on routing using HTTP Path

Hi community,

Just need your idea for routing using HTTP Inbound Endpoint's Path. I am having problem using the correct
route evaluator and expression as I am not yet quite familiar to using the expressions.
Here is my idea for this problem.

    <context:property-placeholder location="classpath:muleconfig.properties"></context:property-placeholder>
    <flow name="wsflow" doc:name="wsflow">
        <inbound-endpoint address="http://${mule.http.host}:${mule.http.port}/${mule.http.path}"
exchange-pattern="request-response" doc:name="Generic"/>
        <echo-component doc:name="Echo"/>
        <choice doc:name="Choice">
            <when expression="*?*" evaluator="*?*">
                <processor-chain>
                    <logger message="LOG FOR TEST 1 #[payload]" level="INFO" doc:name="Logger"/>
                </processor-chain>
            </when>
            <when expression="*?*" evaluator="*?*">
                <processor-chain>
                    <logger message="LOG FOR TEST 2 #[payload]" level="INFO" doc:name="Logger"/>
                </processor-chain>
            </when>
        </choice>
    </flow>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

(Continue reading)

David Dossot | 1 Feb 02:57
Favicon
Gravatar

Re: Help on routing using HTTP Path

This discussion is relevant to your use case: http://stackoverflow.com/questions/8845906/how-to-check-for-valid-urls-and-route-it-to-vm-at-the-end-of-flow-in-mule



On Tue, Jan 31, 2012 at 5:31 PM, Louie Nohay <mule.user.relay-EcxAVUbx2uVoiYX5Tdu9fQ@public.gmane.org> wrote:
Hi community,

Just need your idea for routing using HTTP Inbound Endpoint's Path. I am having problem using the correct route evaluator and expression as I am not yet quite familiar to using the expressions.
Here is my idea for this problem.

   <context:property-placeholder location="classpath:muleconfig.properties"></context:property-placeholder>
   <flow name="wsflow" doc:name="wsflow">
       <inbound-endpoint address="http://${mule.http.host}:${mule.http.port}/${mule.http.path}" exchange-pattern="request-response" doc:name="Generic"/>
       <echo-component doc:name="Echo"/>
       <choice doc:name="Choice">
           <when expression="*?*" evaluator="*?*">
               <processor-chain>
                   <logger message="LOG FOR TEST 1 #[payload]" level="INFO" doc:name="Logger"/>
               </processor-chain>
           </when>
           <when expression="*?*" evaluator="*?*">
               <processor-chain>
                   <logger message="LOG FOR TEST 2 #[payload]" level="INFO" doc:name="Logger"/>
               </processor-chain>
           </when>
       </choice>
   </flow>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Louie Nohay | 1 Feb 04:06

Re: Help on routing using HTTP Path

Thank you David for referencing me to the link.
I also found a solution I need to use in routing my HTTP Path to specific route paths by using this groovy expression,
expression="message.getInboundProperty('http.request.path') ==~ '.*/test1.*'" evaluator="groovy".

Thanks again.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Sesharao | 1 Feb 07:03
Picon

Re: Memory not released using File Transport and Smooks

Hi Tomas Blohm-2,

can you post your Transformer code,i think you are not closing InputStream.
i am posting my TransformerCode pls look into it.

protected Object doTransform(Object in, String encoding) throws
TransformerException {
        *InputStream src = (InputStream) in;*       
             String COPRARXML = null;
        try {
            EDIParser ediParser = new EDIParser();
            DOMResult domResult = new DOMResult();
            MSCConfigurationManagerBean managerBean = new
MSCConfigurationManagerBean();
            System.out.println("EDI Configured Size------>>>" +
managerBean.getConfiguration(EQD_CONFIGURE_KEY));
            String noOfEQDsToProcess =
managerBean.getConfiguration(EQD_CONFIGURE_KEY);
            if (mscDataFinder.getEQDCount() <
Integer.parseInt(noOfEQDsToProcess)) {
                COPRARXML = ediParser.getXml(src, domResult,
"coprar-smooks-config.xml", COPRAR);
            }
            *src.close();*       
          } catch (IOException e) {
            e.printStackTrace();
        } catch (SAXException e) {
            e.printStackTrace();
        }
        return COPRARXML;
    }

--
View this message in context: http://mule.1045714.n5.nabble.com/Memory-not-released-using-File-Transport-and-Smooks-tp2679272p5446604.html
Sent from the Mule - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Dirk Olmes | 1 Feb 07:20
Gravatar

Re: Re: Memory not released using File Transport and Smooks

This is more a general comment than specific to your problem ...

> protected Object doTransform(Object in, String encoding) throws
> TransformerException {
>         *InputStream src = (InputStream) in;*       
>              String COPRARXML = null;
>         try {
[...]
>             *src.close();*       
>           } catch (IOException e) {
>             e.printStackTrace();
>         } catch (SAXException e) {
>             e.printStackTrace();
>         }
>         return COPRARXML;
>     }

In case of an exception you leak the InputStream. It's better to close
it in a finally block so you can be sure the stream is closed in any case.

-dirk

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Louie Nohay | 1 Feb 10:31

Webservice invoking JDBC Connector via Component

Hi Community,

Is it possible to fetch database query inside a custom component when it is invoked from a web service. 
My idea is somewhat like this.

HTTP ---> SOAP ---> JAVA Component (Invoking database query) ---> HTTP RESPONSE

Or can I invoke JDBC Connector inside the Java Component Class or something like that of Autowiring
datasource configuration into a DAO Class?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

achraf | 1 Feb 11:36

Re: Failed to read schema document AMQP issue

absolutly,  the WSDL is correctly generated at this address on my browser.

The Mule satandalone log file contains the following error :

[01-31 15:44:13] WARN  PhaseInterceptorChain
[[Mule_WS].connector.http.mule.default.receiver.08]: Interceptor for
{http://ws/}IPersonServiceService#{http://ws/}getPersonType has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: org.apache.cxf.jaxws.spring.EndpointDefinitionParser$SpringEndpointImpl.getPersonType(person.Person)
	at org.mule.module.cxf.MuleInvoker.invoke(MuleInvoker.java:90)
	at org.mule.module.cxf.MuleJAXWSInvoker.invoke(MuleJAXWSInvoker.java:47)
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)
	at org.mule.module.cxf.CxfInboundMessageProcessor.sendToDestination(CxfInboundMessageProcessor.java:296)
	at org.mule.module.cxf.CxfInboundMessageProcessor.process(CxfInboundMessageProcessor.java:137)
	at org.mule.module.cxf.config.FlowConfiguringMessageProcessor.process
Caused by: java.lang.NoSuchMethodException: org.apache.cxf.jaxws.spring.EndpointDefinitionParser$SpringEndpointImpl.getPersonType(person.Person)
	at java.lang.Class.getMethod(Unknown Source)
	at org.mule.model.resolvers.MethodHeaderPropertyEntryPointResolver.validateMethod
******************************************************************************************************************
getPersonType() is the unique method in my web service class. it taks a person object as argument.

also my RabbitMq server receives nothing from the RabbitMQ client (rabbitMq client sends the object
person received by the webservice, and the server reply with his/her gender)

could it be an issue of interceptor or transformer (I'm new in Mule).

thnks.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Sesharao | 1 Feb 12:29
Picon

Migration Problem from Mule v2.2.1 to v3.2.1

Hi,

Can anyone explain to me what the equivalent of the following Mule 2.2.1
code is in Version 3?

<inbound>
  <file:inbound-endpoint
path="D:/Development/workspaces/publishvelocity/files/manuscripts/pdf/uploaded"
synchronous="true" /> 
</inbound>

The reason I ask is because the only way i could get my service to work in
Mule 2.2.1 was to mark the file:inbound-endpoint as synchronous.

Mule 3 does not allow me to use the synchronous attribute, and when I try
and use the exchange-pattern attribute i get the following error message:
  org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
'exchange-pattern' is not allowed to appear in element
'file:inbound-endpoint'.

Can someone explain why the endpoint won't accept the exchange pattern
attribute and how I mimic v2.2.1 'synchronous' behaviour in v3.0.1

Thanks in advance...

--
View this message in context: http://mule.1045714.n5.nabble.com/Migration-Problem-from-Mule-v2-2-1-to-v3-2-1-tp5447238p5447238.html
Sent from the Mule - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Sesharao | 1 Feb 12:40
Picon

Re: Memory not released using File Transport and Smooks

Hi Dirk Olmes,
Thank you for your reply,
actuvally i tried to close it in finally block, but i got some Exception. so
i handled like that.
really i didn't remember that Exception.

-----
-Sesha Rao.Nuthanki
--
View this message in context: http://mule.1045714.n5.nabble.com/Memory-not-released-using-File-Transport-and-Smooks-tp2679272p5447258.html
Sent from the Mule - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Morten Minke | 1 Feb 12:59

Re: Can the enricher modify a message payload

Dear Daniel,

I have made my first attempt at creating a BeanExpressionEnricher including a unit test.

The unit test works correctly, but I do want to test it in the flow, however, I cannot find how to register the
new expression enricher in order for it to get used. Can you please explain how I can use the custom
expression enricher in the flow?

Gr. Morten

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane