Announcement Announcement Module
Collapse
No announcement yet.
Extraneous characters in response Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Extraneous characters in response

    Hi,

    I have a class like (well this is the parent):

    public abstract class AbstractMessageHeaderEndpoint extends TransformerObjectSupport implements MessageEndpoint

    To give back the answer we do:

    String resultingXml = handleMessage(messageID, request.getPayloadSource());
    StringReader sr = new StringReader(resultingXml);
    getTransformer().transform(new StreamSource(sr), response.getPayloadResult());

    So, the reponse gets populated and everything goes out.

    The problem is that the response is:

    TTP/1.1 200 OK
    Date: Tue, 12 Dec 2006 08:45:40 GMT
    Transfer-Encoding: chunked
    Content-Type: text/xml; charset="utf-8"
    X-Powered-By: Servlet/2.4 JSP/2.0

    0097
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header/><soapenv:Body>data</soapenv:Body></soapenv:Envelope>
    0000

    What are these 0097 and 0000 that are around the soap envelope ?
    Our Webservices clients (based on JWSDP1.6 and Axis1.3) choke on that and fail.

    TIA for any clue.
    /Phil

  • #2
    It looks like these are garbage unicode characters, which should not be there, of course. I have no idea how you can get rid of them, unfortunately. The only thing I can think of is to upgrade your Xerces and Xalan to recent versions.

    It can be useful to use a different SOAP client (soapui) for instance, to see whether you get this response there as well.

    If you create a JIRA issue out of it, I will try to take a look at it later. Make sure you add all environment information (i.e. JDK version, app server, using SAAJ or Axiom, etc.)

    Comment


    • #3
      Found the reason why

      I've found why there are these characters.
      Since the reply is sent in chunked mode, theses XXXXes are delimiting the chunks. 0000 marks the end.

      My JWSDP 1.6 client and my axis 1.3 clients are swallowing the output properly.

      I've found my other issue and it had to do with a missing namespace to be provided in my reply. Our former WS implementation used Axis and took care of converting the WSDL in a compilant API whereas with SpringWS we have to go to the metal and call the Transformers ourselves. So, it appears that SpringWS is clean and flexible and requires a more understanding of what is going on under the cover.

      Thanks for the reply.

      Comment


      • #4
        Yeah, I just remembered that it could have been the chunked mode as well. Great that you found out yourself, though.

        Comment

        Working...
        X