0 Replies Latest reply on Nov 9, 2009 2:24 PM by Jason Stratton

    JBossWS Client vs. SoapUI

    Jason Stratton Newbie

      One of our teams has a service that has been deployed and I can successfully test it with SoapUI. This is a service that was originally on a Matamatrix server and is now deployed on JBoss. Both the new JBoss service and the legacy Metamatrix services are available and can be tested successfully with SoapUI. The WSDL have not changed, just the endpoint location.

      Another team has written a client of the original Metamatrix service, which works fine. They changed the endpoint to point to the new service on JBoss and they get a "Server Error".

      I have hopped in to try to resolve the issue. Used wsconsume to generate the client stubs and a small command line app to drive things. I generated it using the WSDL of the service deployed on JBoss and I get the same "Server Error". I just change the BindingProvider.ENDPOINT_ADDRESS_PROPERTY to point t the legacy Metamatrix service and it works fine. So I believe my code should work with either service.

      I have checked the log on the server when the error occurs and I find the error message:
      "SAAJ0511: Unable to create envelope from given source"

      Next I used TCPTrace to capture the successful request from SoapUI and the unsuccessful request from my code and I found the following:

      Successful Request from SoapUI:
      POST /idataservice-rs-pa/ia HTTP/1.0
      Accept-Encoding: gzip,deflate
      Content-Type: text/xml;charset=UTF-8
      SOAPAction: "IAList_WebService.IAList.getIAList"
      User-Agent: Jakarta Commons-HttpClient/3.1
      Content-Length: 340
      Authorization: Basic czYwOTE1NzpKYVo3VnU5dQ==
      Host: localhost:8080

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ial="http://IAListRequest.xsd">
      <soapenv:Header/>
      <soapenv:Body>
      <ial:IAListRequest>
      <ial:Tin_Txt>174991806</ial:Tin_Txt>
      <ial:Plan_ID>1749918060205</ial:Plan_ID>
      </ial:IAListRequest>
      </soapenv:Body>
      </soapenv:Envelope>

      Unsuccessful Request:
      POST /idataservice-rs-pa/ia HTTP/1.1
      Authorization: Basic czYwOTE1NzpKYVo3VnU5dQ==
      SOAPAction: "IAList_WebService.IAList.getIAList"
      Content-Type: text/xml; charset=UTF-8
      JBoss-Remoting-Version: 22
      User-Agent: JBossRemoting - 2.2.3
      Host: localhost:8080
      Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
      Connection: keep-alive
      Transfer-Encoding: chunked

      123
      <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><IAListRequest xmlns="http://IAListRequest.xsd" xmlns:ns2="http://IAListResponse.xsd"><Tin_Txt>174991806</Tin_Txt><Plan_ID>1749918060205</Plan_ID></env:Body></env:Envelope>
      0

      Please note the text/numbers before and after the tags. I'm guessing that these are causing the "SAAJ0511: Unable to create envelope from given source" error.

      I'm not sure where this text/numbers are coming from.

      Can anyone please give me a clue?

      Thank you very much
      Jason