2 Replies Latest reply on May 4, 2011 10:54 AM by Hans Wolffenbuttel

    ESB provide a way to read soap ?

    everson . Newbie

      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>