1 2 Previous Next 21 Replies Latest reply: Sep 29, 2011 4:43 AM by Hans Wolffenbuttel RSS

Problem invoking SOAPProxy Service from ServiceInvoker Client

Fran GJ Newbie

Hi,

 

I'm using JBoss ESB Server 4.8 and Tomcat 6, where I deploy a simple web service.

 

That service is exposed in my ESB through SOAPProxy, I've tested it with soapUI and works fine, this is my jboss-esb.xml:

 

<services>

<service category="SOAP" description="WS Contador" invmScope="GLOBAL" name="ContadorWS">
<listeners>
     <http-gateway name="Proxy_Basic-GwListener"/>

</listeners>
<actions mep="RequestResponse">

     <action class="org.jboss.soa.esb.actions.SystemPrintln" name="echo-request">
          <property name="message" value="Message before SOAPProxy"/>
      </action>
      <action class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy" name="proxy">
          <property name="wsdl" value="http://localhost:8080/ContadorWS/services/Contador?wsdl"/>
           <property name="endpointUrl" value="http://localhost:8080/ContadorWS/services/Contador"/>
      </action>
      <action class="org.jboss.soa.esb.actions.SystemPrintln" name="echo-response">
           <property name="message" value="Message after SOAPProxy"/>
      </action>

</actions>
...























But when I try to invoke the proxied service from a Java client, using ServiceInvoker and deliverAsync I get an empty response and this in the ESB console:

 

09:25:06,557 INFO [STDOUT] Message before SOAPProxy:

09:25:06,557 INFO [STDOUT] [<cadena xmlns="http://contador.simplews">hola</cadena>].

09:25:06,557 WARN [SOAPProxy] null binding for soapaction [null]; parsing envelope to discover operation...

09:25:06,558 ERROR [SOAPProxy] null binding for operation [null] in addition to soapaction [null]

 

And with deliverSync I got this response.. and nothing in the ESB console:

 

org.jboss.soa.esb.listeners.message.MissingServiceException: Registry details for service [SOAP:ContadorWS] could not be determined from the registry.
at org.jboss.soa.esb.client.ServiceInvoker.post(ServiceInvoker.java:348)
at org.jboss.soa.esb.client.ServiceInvoker.deliverSync(ServiceInvoker.java:219)
at org.jboss.soa.esb.myclient.SendEsbMessage.sendMessage(SendEsbMessage.java:52)
at org.jboss.soa.esb.myclient.SendEsbMessage.main(SendEsbMessage.java:67)

 

 

public class SendEsbMessage {

private static String body = "<cadena xmlns=\"http://contador.simplews\">hola</cadena>";
 public void sendMessage(String message) throws Exception
{

// Create the delivery adapter for the target service (cache it)
System.setProperty(
"javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");

// Create the delivery adapter for the target service (cache it)
ServiceInvoker deliveryAdapter = new ServiceInvoker("SOAP","ContadorWS");

// Create and populate the request message...
Message requestMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
 requestMessage.getBody().add(message);
  deliveryAdapter.deliverAsync(requestMessage);

 //Message replyMessage = deliveryAdapter.deliverSync(requestMessage, 2000);
//System.out.println((String)replyMessage.getBody().get());
 }

public static void main(String args[]) throws Exception
{
SendEsbMessage sm =
new SendEsbMessage();
sm.sendMessage(
body);
}
}














































 

Any idea??

 

Thank you in advance

  • 1. Re: Problem invoking SOAPProxy Service from ServiceInvoker Client
    David Ward Master

    Okay, quite a few things here:

    1. It would be helpful to see your wsdl.  Can you attach it to this forum thread?
    2. It would also be helpful to see your full jboss-esb.xml.  Please attach that as well.
    3. Pointing your wsdl property to a localhost url can be problematic on restarts.  I would suggest using the internal:// URI format instead of http://.  You can read about it in the Programmer's Guide.
    4. Why are you specifying and endpointUrl property?  It's not necessary if it is the same as what the wsdl says it is.
    5. Why are you using a ServiceInvoker in your client?  I would think the "user" of your proxy would be an http client...
    6. According to your log, the SOAPProxy can't figure out the right binding.  This is because you haven't specified a SOAPAction.  Sometimes you don't need to if the first XML element in the body matches the operation name, but really you should specify a SOAPAction.  If you are going to use ServiceInvoker, then you can do esbMessage.getProperties().setProperty("soapaction", "<whatever>");

    There's more I can comment on, but that's good enough to start with...

  • 2. Re: Problem invoking SOAPProxy Service from ServiceInvoker Client
    Fran GJ Newbie

    At first, thank you for your wide and fast response.

     

    I'm beginning to evaluate a number of open source ESBs and all are similar but different...

     

    I'll try setting the soapaction property.. and I'll tell you if that works or does not

     

    The reason I'm using ServiceInvoker is for sending the message through the ESB,,,, I mean to make that the ESB routes the message.. I think is not the same that sending directly from an HTTP client... please, correct me if I'm wrong.

  • 3. Re: Problem invoking SOAPProxy Service from ServiceInvoker Client
    David Ward Master
    I'll try setting the soapaction property.. and I'll tell you if that works or does not

    Yes, please do let us know.

    The reason I'm using ServiceInvoker is for sending the message through the ESB,,,, I mean to make that the ESB routes the message.. I think is not the same that sending directly from an HTTP client... please, correct me if I'm wrong.

    The ESB will route the message either way.  The big difference is that using the ServiceInvoker requires the client to know the "inner canonical representation" of an ESB message.  If you invoke the service over http - like a normal/regular soap client would do - then in this case the HttpGateway will transform the http request into an ESB message itself.  This protects the client from knowing how to do that.

  • 4. Re: Problem invoking SOAPProxy Service from ServiceInvoker Client
    Fran GJ Newbie

    Hi David,

     

    Setting the soapaction property didn't work, I tried it in several ways.. and also I think there is no operation property...

     

    09:38:54,627 WARN [SOAPProxy] null binding for soapaction []; parsing envelope to discover operation...

    09:38:54,628 ERROR [SOAPProxy] null binding for operation [null] in addition to soapaction []

     

    Please, find attached my WSDL, jbossesb-properties and uddi.xml. I think it has to be someting related with these last two.

     

    I forgot pointing that I run both the client application and the ESB in the same machine.

     

    In the other hand, I prefer using ServiceInvoker to speak directly to the ESB service, so I can compare performance of the different platforms in terms of measuring invocation times through their own clients librarys.

     

    Thank you David

  • 5. Re: Problem invoking SOAPProxy Service from ServiceInvoker Client
    Fran GJ Newbie

    I just solved it!


    I set soapaction property to my operation and replaced the body message for the full SOAP message.

     

    that's all

     

    thank you for your time!

  • 6. Re: Problem invoking SOAPProxy Service from ServiceInvoker Client
    David Ward Master

    Yes, the body of the message needs to be the full SOAP message.  I'm glad you got it working. 

  • 7. Re: Problem invoking SOAPProxy Service from ServiceInvoker Client
    Kapil Jain Newbie

    Hi,

     

    I am too facing the same issue. Here is the log of deployment. Could you please help me in fixing the problem.

     

    23:03:24,781 INFO [EsbDeployment] Starting ESB Deployment 'CIMService.esb'

    23:03:27,343 WARN [WSDL11Reader] UsingAddressing extensibility element not supported yet.

    23:03:27,343 INFO [SOAPProxy] mapped soapaction ["CreateCustomerIdentity"] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,343 INFO [SOAPProxy] mapped operation [{http://bestbuy.com/CustomerIdentityManagement/2009/04}CreateCustomerIdentity] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,343 INFO [SOAPProxy] mapped soapaction ["UpdateCustomerIdentity"] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped operation [{http://bestbuy.com/CustomerIdentityManagement/2009/04}UpdateCustomerIdentity] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped soapaction ["GetCustomerIdentityAttribute"] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped operation [{http://bestbuy.com/CustomerIdentityManagement/2009/04}GetCustomerIdentityAttribute] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped soapaction ["GetCustomerUserName"] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped operation [{http://bestbuy.com/CustomerIdentityManagement/2009/04}GetCustomerUsername] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped soapaction ["CreateAuthenticatedCustomer"] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped operation [{http://bestbuy.com/CustomerIdentityManagement/2009/04}CreateAuthenticatedCustomer] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped soapaction ["CreateTrustPartnerToken"] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped operation [{http://bestbuy.com/CustomerIdentityManagement/2009/04}CreateTrustPartnerToken] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped soapaction ["UpdateTrustPartnerTokenMetadata"] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped operation [{http://bestbuy.com/CustomerIdentityManagement/2009/04}UpdateTrustPartnerTokenMetadata] to binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2]

    23:03:27,375 INFO [SOAPProxy] mapped binding [{http://bestbuy.com/CustomerIdentityManagement/2009/04}DefaultEndpoint2] to transport [org.jboss.soa.esb.actions.soap.proxy.HttpSOAPProxyTransport] with endpoint address: [http://dsd02wmgr.na.bestbuy.com/eProxyCI/Service/CustomerIdentityManagementService]

    23:03:27,750 INFO [TomcatDeployment] deploy, ctxPath=/CIMService

    23:03:27,984 WARNING [config] Unable to process deployment descriptor for context '/CIMService'

    23:12:37,390 INFO [STDOUT] Message before SOAPProxy:

    23:12:37,390 INFO [STDOUT] [<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns="http://bestbuy.com/CustomerIdentityManagement/2009/04" xmlns:ns1="http://bestbuy.com/Common/types/2009/04"> <soapenv:Header> </soapenv:Header> <soapenv:Body> <ns:CreateAuthenticatedCustomerRequest> <ns:CustomerIdentityAttribute> <!--Optional:--> <ns1:PasswordResetAddress>kapil.jain122152233223@bestbuy.com</ns1:PasswordResetAddress> <!--Optional:--> <ns1:SecurityQuestions> <ns1:SecurityQuestions> <!--Optional:--> <ns1:ID>007</ns1:ID> <!--Optional:--> <ns1:Question>Blue</ns1:Question> <!--Optional:--> <ns1:SourceID>PC1</ns1:SourceID> <!--Optional:--> <ns1:QuestionText></ns1:QuestionText> </ns1:SecurityQuestions> </ns1:SecurityQuestions> <!--Optional:--> <ns1:PartyID>1098392992</ns1:PartyID> <!--Optional:--> <ns1:PasswordResetOption>EMAIL</ns1:PasswordResetOption> <!--Optional:--> <ns1:IdenityStatus>CONFIRM</ns1:IdenityStatus> </ns:CustomerIdentityAttribute> <!--Optional:--> <ns:Password>virgin1234$</ns:Password> <!--Optional:--> <ns:SourceID>S2P</ns:SourceID> <!--Optional:--> <ns:UserName>kapil.jain122152233223@bestbuy.com</ns:UserName> </ns:CreateAuthenticatedCustomerRequest> </soapenv:Body></soapenv:Envelope>].

    23:12:37,437 WARN [SOAPProxy] null binding for soapaction [CreateAuthenticatedCustomer]; parsing envelope to discover operation...

    23:12:37,453 ERROR [SOAPProxy] null binding for operation [{http://bestbuy.com/CustomerIdentityManagement/2009/04}CreateAuthenticatedCustomerRequest] in addition to soapaction [CreateAuthenticatedCustomer]

    23:12:37,484 ERROR [[cim-GwListener]] Servlet.service() for servlet cim-GwListener threw exception

    org.jboss.soa.esb.actions.ActionProcessingException

     

    : null transport for soapaction [CreateAuthenticatedCustomer], operation [{http://bestbuy.com/CustomerIdentityManagement/2009/04}CreateAuthenticatedCustomerRequest], binding [null]

    at org.jboss.soa.esb.actions.soap.proxy.SOAPProxy.process(

    SOAPProxy.java:268)

    at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(

    ActionProcessingPipeline.java:634)

  • 8. Re: Problem invoking SOAPProxy Service from ServiceInvoker Client
    David Ward Master

    Kapil,

     

    The SOAPProxy could not find a binding (and thus transport) because neither of the two attempts matched/worked:

     

    1. The SOAPAction in the request was [CreateAuthenticatedCustomer] (without the square brackets), which is not the same as ["CreateAuthenticatedCustomer"].  The double quotes are what is different.  Please refer to this URL:

        http://www.ws-i.org/Profiles/BasicProfile-1.1.html#SOAPAction_HTTP_Header

    , which says "The value of the  SOAPAction HTTP header field in a HTTP  request MESSAGE MUST be a quoted string."

    It isn't until SOAP12 that SOAPAction must not be depended upon.  Currently, SOAPProxy only promises SOAP11 compliance.

     

    2. The first element in the request was [{http://bestbuy.com/CustomerIdentityManagement/2009/04}CreateAuthenticatedCustomerRequest] (without the square brackets).  If the #1 attempt (SOAPAction) could not match, SOAPProxy falls back to trying to "deduce" the intent of the message by trying to match the first element in the body of the message to an operation name in your WSDL.  According to the INFO log statements, there was no CreateAuthenticatedCustomerRequest operation mapped.

     

    Hope this helps,

    David

  • 9. Problem invoking SOAPProxy Service from ServiceInvoker Client
    Chandra Shekhar Newbie

    Hi There,

     

    I am getting same problem to get response from ESB but little bit different in way of calling ESB.

     

    I am using jBPM ESB Node to invoke ESB [BPM Process]. I can send request but I am not getting response

     

    Please help me to sort out the problem.

     

    I am providing my inputs below

     

    ************************  jboss-esb.xml  ***************************************

    <?xml version="1.0"?>

    <jbossesb parameterReloadSecs="5"

    xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">

    <services>

      <service category="TestESB" description="Basic WebService Proxy"

       invmScope="GLOBAL" name="TestESB">

       <listeners>

        <http-gateway name="TestESB-GwListener"/>

       </listeners>

        <actions mep="RequestResponse">

        

         <action class="org.jboss.soa.esb.actions.SystemPrintln" name="echo-request">

          <property name="message" value="ESB:Message before SOAPProxy"/>

         </action>

        

         <action class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy" name="proxy">

               <property name="wsdl" value="http://127.0.0.1:8080/FastCar/CarService?wsdl"/>

         </action>

        

         <action class="org.jboss.soa.esb.actions.SystemPrintln" name="echo-response">

         <property name="message" value="ESB:Message after SOAPProxy"/>

         </action>

     

       </actions>

      </service>

    </services>

    </jbossesb>

     

    ******************************* processdefination.xml *************************************************************

     

    <?xml version="1.0" encoding="UTF-8"?>

     

    <process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="FastCarProcess">

     

          <start-state name="start">

                <event type="node-enter">

                      <action name="action" class="com.sample.action.MessageActionHandler"/>

                </event>

                <transition to="fastCarState">

                      <action name="action" class="com.sample.action.MessageActionHandler">

                            <message>{ BPM } Going to the Fast car state...</message>

                      </action>

                </transition>

          </start-state>

     

          <state name="fastCarState">

         

                <transition to="fastCarESBNode" name="to fastCarESB">

                      <action name="action" class="com.sample.action.AddressActionHandler">

                            <message>{ BPM } Going to the Fast Car ESB...</message>

                      </action>

                </transition>

          </state>

     

          <node name="fastCarESBNode">

                <action name="action" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">

                      <esbServiceName>TestESB</esbServiceName>

                      <esbCategoryName>TestESB</esbCategoryName>

                      

                      <bpmToEsbVars>

                            <mapping bpm="entireRequest" esb="BODY_CONTENT"/>

                      </bpmToEsbVars>

                     

                </action>

                <event type="node-enter">

                            <action name="action" class="com.sample.action.MyEventHandler" />      

                </event>

                <transition to="end">

                      <action name="action" class="com.sample.action.AddressActionHandler">

                            <message>{ BPM } Going to the End State...</message>

                      </action>

                </transition>

          </node>

          <end-state name="end">

          </end-state>

    </process-definition>

     

    ********************************************** logs from server console *********************************************************

    2011-02-08 12:05:46,853 INFO  [STDOUT] (http-127.0.0.1-8080-3) ========= BPM Started=============

    2011-02-08 12:06:24,618 INFO  [STDOUT] (http-127.0.0.1-8080-3) *** Handling ESB Layer ************

    2011-02-08 12:06:24,618 INFO  [STDOUT] (http-127.0.0.1-8080-3) MyEventHandler

    2011-02-08 12:06:24,634 INFO  [STDOUT] (http-127.0.0.1-8080-3) *** Handling ESB Layer ************

    2011-02-08 12:06:24,899 INFO  [STDOUT] (pool-23-thread-1) ESB:Message before SOAPProxy:

    2011-02-08 12:06:24,899 INFO  [STDOUT] (pool-23-thread-1) [<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:car="http://www.hexaware.com/CarService/">

    <soapenv:Header/>

    <soapenv:Body>

    <car:hireCarRequest>

    <noOfPersions>1</noOfPersions>

    <carType>Benz</carType>

    <fromTo>ChennaiToTirupati</fromTo>

    </car:hireCarRequest>

    </soapenv:Body>

    </soapenv:Envelope>

    ].

    2011-02-08 12:06:24,915 WARN  [org.jboss.soa.esb.actions.soap.proxy.SOAPProxy] (pool-23-thread-1) null binding for soapaction [null]; parsing envelope to discover operation...

    2011-02-08 12:06:24,931 ERROR [org.jboss.soa.esb.actions.soap.proxy.SOAPProxy] (pool-23-thread-1) null binding for operation [{http://www.hexaware.com/CarService/}hireCarRequest] in addition to soapaction [null]

    2011-02-08 12:06:25,478 WARN  [org.jboss.soa.esb.services.jbpm.cmd.CallbackCommand] (WorkManager(2)-6) Token id 178 from process instance 178 has already terminated

     

     

    ************************************ WSDL ********************************

     

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>

    <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.hexaware.com/CarService/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CarService" targetNamespace="http://www.hexaware.com/CarService/">

      <wsdl:types>

        <xsd:schema targetNamespace="http://www.hexaware.com/CarService/">

     

          <xsd:element name="hireCarRequest">

            <xsd:complexType>

              <xsd:sequence>

                <xsd:element name="noOfPersions" type="xsd:int"/>

                <xsd:element name="carType" type="xsd:string"/>

                <xsd:element name="fromTo" type="xsd:string"/>

              </xsd:sequence>

            </xsd:complexType>

          </xsd:element>

         

          <xsd:element name="hireCarResponse">

            <xsd:complexType>

              <xsd:sequence>

                <xsd:element name="tokenNuber" type="xsd:string"/>

              </xsd:sequence>

            </xsd:complexType>

          </xsd:element>

     

          <xsd:element name="getReport">

                <xsd:complexType>

                      <xsd:sequence>

                            <xsd:element name="noOfBookings" type="xsd:string"/>

                      </xsd:sequence>

                </xsd:complexType>

          </xsd:element>

          <xsd:element name="getReportResponse">

                <xsd:complexType>

                      <xsd:sequence>

                            <xsd:element name="carType" type="xsd:string"/>

                      </xsd:sequence>

                </xsd:complexType>

          </xsd:element>

        </xsd:schema>

      </wsdl:types>

      <wsdl:message name="hireCarRequest">

        <wsdl:part element="tns:hireCarRequest" name="parameters"/>

      </wsdl:message>

      <wsdl:message name="hireCarResponse">

        <wsdl:part element="tns:hireCarResponse" name="parameters"/>

      </wsdl:message>

      <wsdl:message name="getReportRequest">

          <wsdl:part name="parameters" element="tns:getReport"/>

      </wsdl:message>

      <wsdl:message name="getReportResponse">

          <wsdl:part name="parameters" element="tns:getReportResponse"/>

      </wsdl:message>

     

      <wsdl:portType name="CarService">

        <wsdl:operation name="hireCar">

          <wsdl:input message="tns:hireCarRequest"/>

          <wsdl:output message="tns:hireCarResponse"/>

        </wsdl:operation>

        <wsdl:operation name="getReport">

          <wsdl:input message="tns:getReportRequest"/>

          <wsdl:output message="tns:getReportResponse"/>

        </wsdl:operation>

      </wsdl:portType>

     

      <wsdl:binding name="CarServiceSOAP" type="tns:CarService">

        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

        <wsdl:operation name="hireCar">

          <soap:operation soapAction="http://www.hexaware.com/CarService/hireCar"/>

          <wsdl:input>

            <soap:body use="literal"/>

          </wsdl:input>

          <wsdl:output>

            <soap:body use="literal"/>

          </wsdl:output>

        </wsdl:operation>

     

        <wsdl:operation name="getReport">

          <soap:operation soapAction="http://www.hexaware.com/CarService/getReport"/>

          <wsdl:input>

            <soap:body use="literal"/>

          </wsdl:input>

          <wsdl:output>

            <soap:body use="literal"/>

          </wsdl:output>

        </wsdl:operation>

     

      </wsdl:binding>

     

      <wsdl:service name="CarService">

        <wsdl:port binding="tns:CarServiceSOAP" name="CarServiceSOAP">

          <soap:address location="http://127.0.0.1:8080/FastCar/"/>

        </wsdl:port>

      </wsdl:service>

    </wsdl:definitions>

  • 10. Problem invoking SOAPProxy Service from ServiceInvoker Client
    Keith Babo Master

    See #2 in David's reply above.  If SOAPAction is not supplied, SOAPProxy expects the root element of the SOAP Body to be the operation name (e.g. "<car:hireCar>").

     

    Another option is to set the SOAPAction header on the ESB message from your jBPM process, e.g.

     

    <mapping esb="properties.soapaction" default="http://www.hexaware.com/CarService/hireCar" />

     


  • 11. Problem invoking SOAPProxy Service from ServiceInvoker Client
    Chandra Shekhar Newbie

    Keith - Thanks for your reply.

     

    I edited processdefinition.xml then still I am getting same experience

     

    Please correct me where I am doing wrong.

     

    <?xml version="1.0" encoding="UTF-8"?>

     

    <process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="FastCarProcess">

     

          <start-state name="start">

                <event type="node-enter">

                      <action name="action" class="com.sample.action.MessageActionHandler"/>

                </event>

                <transition to="fastCarState">

                      <action name="action" class="com.sample.action.MessageActionHandler">

                            <message>{ BPM } Going to the Fast car state...</message>

                      </action>

                </transition>

          </start-state>

     

          <state name="fastCarState">

         

                <transition to="fastCarESBNode" name="to fastCarESB">

                      <action name="action" class="com.sample.action.AddressActionHandler">

                            <message>{ BPM } Going to the Fast Car ESB...</message>

                      </action>

                </transition>

          </state>

     

          <node name="fastCarESBNode">

                <action name="action" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">

                      <esbServiceName>TestESB</esbServiceName>

                      <esbCategoryName>TestESB</esbCategoryName>

                      <bpmToEsbVars>

                     <mapping bpm="entireRequest" esb="BODY_CONTENT"/>

                     <mapping esb="properties.soapaction" default="http://www.hexaware.com/CarService/hireCar" />

                </bpmToEsbVars>

                     

                </action>

                <event type="node-enter">

                            <action name="action" class="com.sample.action.MyEventHandler" />      

                </event>

                <transition to="end">

                      <action name="action" class="com.sample.action.AddressActionHandler">

                            <message>{ BPM } Going to the End State...</message>

                      </action>

                </transition>

          </node>

     

          <end-state name="end">

          </end-state>

     

    </process-definition>

     

    My bpm code is below

    ---------------------

    package com.sample.action;

     

    import org.jbpm.graph.def.ActionHandler;

    import org.jbpm.graph.exe.ExecutionContext;

     

    public class AddressActionHandler implements ActionHandler {

     

          private static final long serialVersionUID = 1L;

         

          /**

           * The message member gets its value from the configuration in the

           * processdefinition. The value is injected directly by the engine.

           */

     

          String message;

     

          /**

           * A message process variable is assigned the value of the message

           * member. The process variable is created if it doesn't exist yet.

           */

          public void execute(ExecutionContext context) throws Exception {

                context.getContextInstance().setVariable("message", message);

                System.out.println("*** Handling ESB Layer ************");

               

                String carBooking = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:car=\"http://www.hexaware.com/CarService/\">\n"+

                   "<soapenv:Header/>\n"+

                   "<soapenv:Body>\n"+

                      "<car:hireCarRequest>\n"+

                         "<noOfPersions>1</noOfPersions>\n"+

                         "<carType>Benz</carType>\n"+

                         "<fromTo>ChennaiToTirupati</fromTo>\n"+

                      "</car:hireCarRequest>\n"+

                   "</soapenv:Body>\n"+

                "</soapenv:Envelope>\n";

                context.getContextInstance().setVariable("entireRequest", carBooking);

               

          }

     

    }

    -----------------------------------------------------------------

    package com.sample.action;

     

    import org.jbpm.graph.def.ActionHandler;

    import org.jbpm.graph.exe.ExecutionContext;

     

    public class MessageActionHandler implements ActionHandler {

     

          private static final long serialVersionUID = 1L;

         

          /**

           * The message member gets its value from the configuration in the

           * processdefinition. The value is injected directly by the engine.

           */

          String message;

     

          /**

           * A message process variable is assigned the value of the message

           * member. The process variable is created if it doesn't exist yet.

           */

          public void execute(ExecutionContext context) throws Exception {

                context.getContextInstance().setVariable("message", message);

                System.out.println("========= BPM Started=============");

               

          }

     

    }

    ---------------------------------------------------------------------------------------------

    package com.sample.action;

     

    import org.jbpm.graph.def.ActionHandler;

    import org.jbpm.graph.exe.ExecutionContext;

     

    public class MyEventHandler implements ActionHandler {

     

                    /**

                     * A message process variable is assigned the value of the message

                     * member. The process variable is created if it doesn't exist yet.

                     */

                    public void execute(ExecutionContext context) throws Exception {

    //                            System.out.println("MyEventHandler");

                                    context.leaveNode();

                    }

    }

    -------------------------------------------------------------------------------------------

     

    Thank you advance for your all help

  • 12. Problem invoking SOAPProxy Service from ServiceInvoker Client
    Keith Babo Master

    I just noticed that I omitted the bpm variable in the mapping I suggested, which should have resulted in a parse error when you ran the process.  I'm surprised you ended up with the same result.  In any case, I will create a quick test to make sure this works as I expect it to and reply back with the correct config.

     

    In the meantime, you could always wrap the body content with the operation name as suggested above.  Taking a step back, is there a reason you are using SOAPProxy in this case instead of SOAPClient or even HttpRouter?

  • 13. Problem invoking SOAPProxy Service from ServiceInvoker Client
    Chandra Shekhar Newbie

    I am completely new for this ESB and BPM technologies so went throw quick start examples these explain to me exchange message in between web service, ESB and BPM, ESB.  I could not find an example exchange message in between web service, ESB and BPM. At this moment I am using jBoss BPM console to test this flow by default SOAP Proxy is taken.

  • 14. Re: Problem invoking SOAPProxy Service from ServiceInvoker Client
    Laura Simona Newbie

    Hello David,

     

    I have the same problem as Kapil, but I don't know how to introduce these quotes. The context is the following one: I have a soap message, I do some transformation (XsltAction) on this (change namespace, operation name, parameters) and then I route the message to another wsdl interface.

     

    WARN null binding for soapaction ["ChangeInstancePowerState"]; parsing envelope to discover operation...

    ERROR [org.jboss.soa.esb.actions.soap.proxy.SOAPProxy] (pool-50-thread-2) null binding for operation [{http://test.com/Automate/xsd}ChangeVMInstancePowerState] in addition to soapaction ["ChangeInstancePowerState"]

     

    Do you have any idea what should I do?

     

    Thank you,

    Laura

1 2 Previous Next