5 Replies Latest reply on Dec 29, 2011 10:51 PM by ffang

    Error 500

    johnwalker

      Hi

       

      Thanks for taking the time to read about the problem I'm tryin to solve.

       

      I'm having 4 boxes:

       

      1) Portal (Liferay)

      2) ESB (fuse)

      3) Application Server exposing a sayHello web service

      4) BPM having a primitive flow

       

      From the portal, I'm sending to the ESB a dummy string.

       

      Scenarios

       

      A) If this string is routed from the box 1to 3, it works, the box 1 receive the msg hello dummy. The flow is as follow:

      (1) dummy> (2) dummy> (3) Hello dummy> (2) Hello dummy> (1)   WORK

       

       

      If the string is routed from the box 1 to 4, it fails:

       

      HTTP operation failed invoking the distant WS with statusCode: 500
      (1) dummy> (2) FAIL> (4)    ERROR 500

       

      C) If I use SOAP UI to send the message directly to 4, it works.

       

          In fact, the box 4 is simply calling the box 3 (going thru the ESB for that)

       

          (SOAPUI) dummy> (4) dummy> (2) dummy> (4) Hello dummy> (SOAPUI)    WORK

       

       

       

       

      So the problem is between the ESB and the BPM: this route doesn't work.

       

       

       

      A soap format problem ? but I can't see where.

       

      The message sent under C) by SOAPIU is as follow:

       

          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pin="http://www.example.com/hello/HelloProcess">

      <soapenv:Header/>

      <soapenv:Body>

      <pin:helloRequest>dummy</pin:helloRequest>

      </soapenv:Body>

      </soapenv:Envelope>

       

       

      And it's response:

       

       

          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

      <soapenv:Body>

      <helloResponse xmlns="http://www.example.com/hello/HelloProcess">Hello dummy</helloResponse>

      </soapenv:Body>

      </soapenv:Envelope>

       

       

      While the request/response for A) look as follow

       

       

       

      Request

       

          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.example.ch/xmlns/hello-ws/1">

      <soapenv:Header/>

      <soapenv:Body>

      <ns:helloInput>dummy</ns:helloInput>

      </soapenv:Body>

      </soapenv:Envelope>

       

      Response

       

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

      <helloOutput xmlns="http://www.jpl.ch/xmlns/hello-ws/1">Hello dummy</pingOutput>

      </soap:Body>

      </soap:Envelope>

       

       

       

      The trace for the scenario B) is:

       

      org.apache.camel.component.http.HttpOperationFailedException: HTTP operation failed invoking http://BPM:8080/ode/processes/Hello-process/helloClient?dataFormat=MESSAGE with statusCode: 500

      at org.apache.camel.component.http.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:181)131:org.apache.camel.camel-http:2.7.1.fuse-00-43

      at org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:114)131:org.apache.camel.camel-http:2.7.1.fuse-00-43

      at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)59:org.apache.camel.camel-core:2.7.1.fuse-00-43

      at

      etc......

       

      The hello route that fails (no rocket salad science I guess ):

       

       

      <route id="hello">

      <from uri="cxf:bean:helloEndpoint?dataFormat=MESSAGE"/>

      <to uri="log:input"/>

      <to uri="http://BPM:8080/ode/processes/Hello-process/helloClient"/>

      <to uri="log:output"/>

      </route>

       

       

      Thank you for your help!

       

      J.

        • 1. Re: Error 500
          ffang

          Hi,

           

          As you can use SOAPUI to invoke BPM, so I suggest you just dump the message between FUSE ESB and BPM, compare it with the one you send from SOAPUI, I believe it can give you more hint.

           

          Freeman

          • 2. Re: Error 500
            johnwalker

            Hi

             

            Thank You Freeman.

             

            After investigation, seems the pb come from the operation is missing:

             

            SOAPUI is adding it in a way or another, and so do the portal when invoking the application server through the ESB.

             

            But from the portal to the ESB to the BPM, the operation is not specified.

             

            I read somewhere that it is possible to add a header mediator to specify the operation name to invoke.

             

            Do you have any idea how to write one with camel ?

             

            Best Regards,

            J.

            • 3. Re: Error 500
              ffang

              Hi,

               

              You can use SOAPUI to send request to BPM at http://BPM:8080/ode/processes/Hello-process/helloClient, right?

              But you can't send request use FUSE ESB to BPM at http://BPM:8080/ode/processes/Hello-process/helloClient, right?

               

              If so, you can use some tool like tcpmonitor or tcpdump between the FUSE ESB and http://BPM:8080/ode/processes/Hello-process/helloClient to dump the onwire message, then compare it with the one from SOAPUI, there must be some difference between the two which can give you more hint why one works but another doesn't.

               

              Freeman

              • 4. Re: Error 500
                johnwalker

                Hi

                 

                Thank You Freeman, indeed  tcpdump gave some hint:

                 

                The endpoint reference (EPR) for the Operation not found is ... and the WSA Action = null     at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:89) at ....

                 

                confirming the operation is missing.

                 

                But I have no idea how to specify it with some Camel coding.

                Any direction would be helpful.

                 

                Thank You

                 

                J.

                • 5. Re: Error 500
                  ffang

                  Hi,

                   

                  You didn't post the message sent from SOAPUI to BPM, so I assume SOAPUI will add SOAPAction which is the operationName as a HTTP header(as generally do), so you can set a http header before

                   

                   

                  You can get more details how to set http headers from

                   

                  http://camel.apache.org/http.html

                   

                  Freeman