2 Replies Latest reply on May 4, 2011 10:54 AM by h.wolffenbuttel

    ESB provide a way to read soap ?

    everjava

      Hello ....... I have 2 doubt

       

      1) I'd like know if there's a way provided by jboss esb for unmarshall a soap inside a message ? Or do I need do it by jaxb, saaj ... ?

      This soap came in the message and I need get the values.

       

      2) I'm using  Message esbMessage =  SOAPProcessor.getMessage(); to get the message, but getMessage() is deprecated. What can I use instead that ?

       

      Thanks

       

       

       

      Message esbMessage =  SOAPProcessor.getMessage();

      String soapmsg = esbMessage.getBody().get().toString();

       

       

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://phpwebservice_producer/orderplaced" xmlns:ns2="http://xml.apache.org/xml-soap">

          <SOAP-ENV:Header/>

          <SOAP-ENV:Body>

              <ns1:testList>

                  <lista>

                      <ns2:Map>

                          <item>

                              <key>id</key>

                              <value>100</value>

                          </item>

                          <item>

                              <key>name</key>

                              <value>ok</value>

                          </item>

                      </ns2:Map>

                      <ns2:Map>

                          <item>

                              <key>id</key>

                              <value>101</value>

                          </item>

                          <item>

                              <key>name</key>

                              <value>ok</value>

                          </item>

                      </ns2:Map>

                  </lista>

              </ns1:testList>

          </SOAP-ENV:Body>

      </SOAP-ENV:Envelope>

        • 1. ESB provide a way to read soap ?
          tcunning

          ESB is agnostic about what's inside the message body.      You should use jaxb or castor or whatever your favorite Unmarshaller is to do this.

          • 2. ESB provide a way to read soap ?
            h.wolffenbuttel

            However, if you use EBWS then SOAP is automatically removed from your message.

             

            In terms of what to use for SOAPProcessor.getMessage(), i believe you just need to get the body like you are already doing (

            String soapmsg = esbMessage.getBody().get().toString();    ) but this time you get it from the action you place after your SOAPProcessor because it is delivering the reponse in the default location.

             

            Regards,

             

            Hans