webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

SOAP handler doesn't get original response

  • 1.  SOAP handler doesn't get original response

    Posted Tue April 05, 2016 11:42 AM

    Hi everybody.

    As I couldn’t figure out the problem myself, I’d like to ask for an advice.

    I created a WS consumer in IntegrationServer. It communicates with a cloud webservice which sometimes returns an invalid XML respones. It’s invalid because the namespace prefixes are used but the namespace declarations are missing. It looks like this:

    soapenv:Body
    soapenv:Fault
    Internal Server Error
    The incoming message is invalid with the following errors: urn:Ariba:Sourcing:vrealm_1711:AwardDownload
    cvc-elt.1: Cannot find the declaration of element ‘typens:AwardDownloadRequest’.
    </soapenv:Fault>
    </soapenv:Body>

    So, I thought I’d create a response SOAP handler on the consumer and provide the namespaces to make the XML valid. But, using pub.soap.handler:getSOAPMessage, the SOAP handler doesn’t get that response. It gets some other, SOAP-client-generated SOAP fault, which looks like this:

    <?xml version='1.0' encoding='utf-8'?>soapenv:Servercom.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "soapenv"

    at [row,col {unknown-source}]: [1,14]http://wm9-is-d1.ifs.ori.local:5555/soap<webM:exception xmlns:webM=“API Integration Platform | Software AG”>
    webM:classNameorg.apache.axiom.om.OMException</webM:className>
    <webM:message xml:lang=“”>com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix “soapenv”
    at [row,col {unknown-source}]: [1,14]</webM:message>
    </webM:exception></soapenv:Fault></soapenv:Body></soapenv:Envelope>

    It looks to me that there is some XML parser that tries parsing the XML response before it puts the result to the SOAP handler. And because it failes, I am not able to get the original response.

    Is there a way to disable the response parsing before it reaches my response handler?

    Thanks a lot, guys.

    Regards,

    Ivo


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 2.  RE: SOAP handler doesn't get original response

    Posted Thu December 31, 2020 02:58 AM

    Hi,

    Am facing similar error. Do you have any resolution for this?

    I have a soap request which have declaration for soapenv as xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/
    So request is working fine.

    I am getting an error when processing soap response back.
    Status Message: "Error occurred while processing SOAP response.
    Body : com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix “soapenv”
    at [row,col {unknown-source}]: [1,14] "

    "SOAP Response is starting something like this (without declaration)

    soapenv:Body
    soapenv:Fault

    Not sure how i can control or declare namespace prefix for response. Can any one help?


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB