1 Reply Latest reply on Jan 28, 2011 5:44 AM by Tom Fennelly

    SOAPClient response as OGNL Map including XML attributes

    Reto Huber Newbie

      I'm using SOAPClient (not wise)(JBoss ESB 4.9) to invoke a webservice .The response of the service should be added to the ESB message as OGNL Map. Unfortunately I’m not able to have the attributes of the response in the OGNLMap.

       

      There is the ESB Action I’m using.

      <action name="soap-meteoData" class="org.jboss.soa.esb.actions.soap.SOAPClient">

      <property name="wsdl"value="http://myserver:8080/MyService-1.0?wsdl"/>

      <property name="responseAsOgnlMap"value="true" />

      <property name="SOAPAction"value="getMeteoData"/>

      <property name="get-payload-location"value="meteoDataRequest" />

      <property name="set-payload-location"value="meteoDataResponse" />

      </action>

       

       

      The response of the service:

       

       

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

         <soap:Body>

            <ns3:getMeteoDataResponse xmlns:ns2="http://mydomain.ch/meteoservice/types/v1_0"xmlns:ns3="http://mydomain.ch/meteoservice/v1_0"xmlns:ns4="http://mydomain.ch/common/types/v1_0">

               <return responseType ="metar" data="TUVUQVIgTFNaSCxMU0JTIDE0MTU0OVogMTIzNDVLVCBDQVZPSyBOT1NJRz0NCg=="/>

            </ns3:getMeteoDataResponse>

         </soap:Body>

      </soap:Envelope>

       

       

      The ESB Message Body after the service call:

      body: [ objects: {meteoDataRequest-set-stack=java.lang.Exception: setPayload stack trace for 'meteoDataRequest'., org.jboss.soa.esb.message.defaultEntry-set-stack=java.lang.Exception: setPayload stack trace for 'org.jboss.soa.esb.message.defaultEntry'., meteoDataRequest={getMeteoData.meteoRequest.requestType=metar, getMeteoData.meteoRequest.firs=, getMeteoData.meteoRequest.aerodromes=LSZH}, org.jboss.soa.esb.message.defaultEntry=<v1:IbsMeteoServiceRequest xmlns:v1="http://mydomain.ch/meteoservice/types/v1_0" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" aerodromes="LSZH" firs="" requestType="metar" userName="testuser" />, meteoDataResponse-set-stack=java.lang.Exception: setPayload stack trace for 'meteoDataResponse'., meteoDataResponse={}, SmooksExecutionContext={}} ]

       

       

      The body part meteoDataResponse of the ESB message is still empty. The attributes responseType and data have not been added to the OGNL Map. Does somebody know how to add the attributes? Is it even supported? (There was alreadya discussion about attributes in the web service request (http://community.jboss.org/message/509642))

      Thank you for every hint!

       

      Regards,

      Reto