11 Replies Latest reply on Jan 10, 2008 10:22 AM by vikas_sm

    Issues with SOAPClient

    vikas_sm

      Hi,

      The readme.txt of webservice_consumer1 talks about responseLocation.
      The jboss-esb.xml doesn't have this entry?

      The same applies for paramsLocation.

      The response is getting null . After debugging i found that response is received in process method of SOAPClient.

      Why is MyResponseAction class printing it as null.

      Am i doing something wrong here? I got confused with the readme and the actual source files. please suggest.

      Regards/Vikas

        • 1. Re: Issues with SOAPClient
          jeffdelong

          The readme is a bit out of date.

          The Message Action Guide says:

          The SOAP response object instance can be is attached to the ESB Message instance
          in one of the following ways:
          1. On the default body location (Message.getBody().add(Map))
          2. On in a named body location (Message.getBody().add(String, Map)), where
          the name of that body location is speci fied as the value of the "set-payload-location"
          action property.

          It then gives an example:

          <action name="soapui-client-action"
          class="org.jboss.soa.esb.actions.soap.SOAPClient">
          <property name="wsdl"
          value="http://localhost:18080/acme/services/RetailerService?wsdl"/>
          <property name="operation" value="GetOrder"/>
          <property name="get-payload-location" value="get-order-params" />
          <property name="set-payload-location" value="get-order-response" />
          


          • 2. Re: Issues with SOAPClient
            vikas_sm

            Thanks ,
            I am getting following exception when i tried to set the payload location as suggested by you.


            org.jboss.soa.esb.actions.ActionProcessingException: No params. SOAP message parameters must either be set as the default message body payload, or set on
            the body under the key defined in the 'paramsLocation' acton property.
            at org.jboss.soa.esb.actions.soap.SOAPClient.process(SOAPClient.java:323)


            Exception say 'paramsLocation' . Does that indicate i am having older version of jbossesb.
            Environment details:

            JBossESB4.2.1GA
            JBoss4.2.1GA
            jbossws-native-2.0.2.GA
            jboss-messaging-1.4.0.SP3
            jdk1.5.0_09
            WindowsXP SP2


            What is going here?

            • 3. Re: Issues with SOAPClient
              tfennelly

              Vikas, you're seeing an invalid error message there and you're not seeing the real cause. I created a JIRA for it.

              Basically, it seems like the MessagePayloadProxy is not finding the payload in the default body location, or in the location specified in the "get-payload-location" property.

              Can you post your SOAPClient configuration please?

              • 4. Re: Issues with SOAPClient
                vikas_sm

                I trying to run webservice_consumer1 sample.Result was returned null hence i tried to set the paramlocations in jboss-esb.xml

                <action name="soapui-client-action "class="org.jboss.soa.esb.actions.soap.SOAPClient">
                <property name="wsdl" value="http://localhost:8080/Quickstart_webservice_consumer1/HelloWorldWS?wsdl" />
                <property name="operation" value="sayHello" />
                <property name="responseAsOgnlMap" value="true" />
                <property name="SOAPAction" value="sayHello"/>
                <property name="get-payload-location" value="helloworld-request-parameters"/>
                <property name="set-payload-location" value="helloworld-response"/>
                </action>


                • 5. Re: Issues with SOAPClient
                  vikas_sm

                  Sorry, the xml doesnt appear properly with Quote. Hence posting the reply again.

                  I trying to run webservice_consumer1 sample.Result was returned null hence i tried to set the paramlocations in jboss-esb.xml

                  <action name="soapui-client-action "class="org.jboss.soa.esb.actions.soap.SOAPClient">
                  <property name="wsdl" value="http://localhost:8080/Quickstart_webservice_consumer1/HelloWorldWS?wsdl" />
                  <property name="operation" value="sayHello" />
                  <property name="responseAsOgnlMap" value="true" />
                  <property name="SOAPAction" value="sayHello"/>
                  <property name="get-payload-location" value="helloworld-request-parameters"/>
                  <property name="set-payload-location" value="helloworld-response"/>
                  </action>


                  • 6. Re: Issues with SOAPClient
                    tfennelly

                    Sorry Vikas, can you add the config for all the actions (the ones either side of the SOAPClient at a min)? Don't be shy about providing info so as we can help you ;-)

                    • 7. Re: Issues with SOAPClient
                      tfennelly

                      So is the action preceding the SOAPClient setting the parameter Map in "helloworld-request-parameters"?

                      • 8. Re: Issues with SOAPClient
                        vikas_sm

                        The value of request parameter map and responseLocation are hardcoded in MyRequestAction and MyResponseAction classes.

                        These should not be hardcoded? Am i correct? Since responselocation is not specified anywhere in jboss-esb.xml. how will it get the response back in MyResponseAction .
                        Correct me if my understanding is wrong.

                        I am using the webservice_consumer1 sample. I modified it because the response was null.

                        <?xml version = "1.0" encoding = "UTF-8"?>
                        <jbossesb
                         xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
                         parameterReloadSecs="5">
                        
                         <providers>
                         <jms-provider name="JBossMQ"
                         connection-factory="ConnectionFactory"
                         jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
                         jndi-URL="localhost">
                         <jms-bus busid="quickstartEsbChannel">
                         <jms-message-filter dest-type="QUEUE"
                         dest-name="queue/quickstart_webservice_consumer1_esb" />
                         </jms-bus>
                         </jms-provider>
                         </providers>
                        
                         <services>
                         <service category="MyServiceCategory" name="WebserviceConsumer1"
                         description="Helloworld Webservice Consumer">
                         <listeners>
                         <jms-listener name="JMS-ESBListener"
                         busidref="quickstartEsbChannel" maxThreads="1" />
                         </listeners>
                         <actions>
                         <action name="request-mapper"
                         class="org.jboss.soa.esb.samples.quickstart.webservice_consumer1.MyRequestAction">
                         </action>
                         <action name="soapui-client-action"
                         class="org.jboss.soa.esb.actions.soap.SOAPClient">
                         <property name="wsdl"
                         value="http://localhost:8080/Quickstart_webservice_consumer1/HelloWorldWS?wsdl" />
                         <property name="operation" value="sayHello" />
                         <property name="responseAsOgnlMap" value="true" />
                         <property name="SOAPAction" value="sayHello"/>
                         <property name="get-payload-location" value="helloworld-request-parameters"/>
                         <property name="set-payload-location" value="helloworld-response"/>
                         </action>
                         <action name="response-mapper"
                         class="org.jboss.soa.esb.samples.quickstart.webservice_consumer1.MyResponseAction">
                         </action>
                         </actions>
                         </service>
                         </services>
                        
                        </jbossesb>
                        


                        • 9. Re: Issues with SOAPClient
                          tfennelly

                          You keep saying "responseLocation"... anyway, is your MyRequestAction setting the output Map (input to the SOAPClient) in "helloworld-request-parameters" in the message bosy e.g. Message.getBody().add("helloworld-request-parameters", soapParamsMap);

                          ???

                          • 10. Re: Issues with SOAPClient
                            vikas_sm

                            Hi,
                            my apologies, i got used to the 'responselocation'.

                            Thanks for figuring this out. I was expecting sample to run out of box like other samples. Appreciate your help.

                            Here is change which make this sample working.
                            Old

                            message.getBody().add(requestMap);

                            New Change
                            message.getBody().add("helloworld-request-parameters",requestMap);


                            The set/get-payload-location are used by MessagePayloadProxy and we need to hard code the value of location in request and response actions respectively..

                            Can you file JIRA for this?
                            Thanks/Vikas


                            • 11. Re: Issues with SOAPClient
                              vikas_sm

                               

                              "vikas_sm" wrote:

                              Can you file JIRA for this?

                              Just to be more clear, I mean JIRA for the webservice_consumer1 sample.