0 Replies Latest reply on Nov 6, 2009 4:17 PM by octavio echevarria

    Question about SOAPMessage

    octavio echevarria Newbie

      Hi all,

      I installed and ran the test suite for jbossws-native-3.2.0.GA. Everything worked OK. Then using Eclipse I ran and debugged the tests in the org.jboss.test.ws.jaxws.samples.provider package. Everything OK again.
      Then I modified ProviderBeanMessage.java to look like this (just the modified part):

      public SOAPMessage invoke(SOAPMessage request)
      {
      SOAPPart soapPart = request.getSOAPPart();
      try {
      SOAPEnvelope envelope =soapPart.getEnvelope();
      SOAPBody body = envelope.getBody();
      SOAPHeader header = envelope.getHeader();
      Source source = soapPart.getContent();
      } catch (SOAPException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      }
      return request;
      }


      I also modified ProviderMessageTestCase.java to enhance the test String to look like this
      private String msgString =
      "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" +
      " <soap:Body>" +
      " <ns1:somePayload xmlns:ns1='http://org.jboss.ws/provider'/>" +
      "<ns1:addcall xmlns:ns1='http://org.jboss.ws/provider'>" +
      "<ns1:addImport xmlns:ns1='http://org.jboss.ws/provider'>" +
      "<ns1:ImportCalcCalculator xmlns:ns1='http://org.jboss.ws/provider'>" +
      "<ns1:Num2 xmlns:ns1='http://org.jboss.ws/provider'>?</ns1:Num2>" +
      "<ns1:Num1 xmlns:ns1='http://org.jboss.ws/provider'>?</ns1:Num1>" +
      "</ns1:ImportCalcCalculator>" +
      "</ns1:addImport>" +
      "</ns1:addcall>" +
      " </soap:Body>" +
      "</soap:Envelope>";

      I rebuilt and ran everything again and when I looked at the contents of the incoming request in the Bean I noticed that element ns1:addImport and its children are not visible or present in the message structure. So the line Source source = soapPart.getContent();
      returns an invalid object.

      If I inspect the response back in testProviderDispatch() and testProviderMessage() (in ProviderMessageTestCase.java) the entire message is there.

      So the question is: why is that when the message arrives on the server side it is missing a portion of its contents?
      Any thoughts or comments are greatly appreciated


      Regards,
      Octavio