IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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
  • 1.  webservice throws XML block was not well-formed

    Posted Fri July 24, 2009 08:03 PM

    we have a webservice JournalEntryWS where we are using requestResponseSpec for input and output.

    In that we have used the following services
    pub.soap.utils:stingToSoapData
    pub.soap.utils:getBody
    pub.xml:xmlNodeTODocument
    then map this doc and done our bussiness logic and then created the response

    pub.xml:documentToXMLString
    pub.xml:xmlStringToXMLNode
    pub.soap.utils:createSOAPdata
    pub.soap.utils:addBodyEntry

    The input document type which was created in webMethods
    JouralEntryRequest doc type name

    • m:JournalEntryRequest
      -IBANNumber (string)
      -AccountNumber(string)

    The output document type which was created in webMethods
    JouralEntryResponse doc type name

    • m:JournalEntryResponse
      -AccountStatus(string)
      -Flag(string)

    The problem we are facing is, when individually run this service this is working fine.
    But when I am passing the soaprequest from pub.client:soapHTTP it is throwing the following exception.

    <?xml version="1.0" encoding="UTF-8"?>

    <SOAP-ENV:Envelope xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/[/URL]” xmlns:xsi=“[URL]http://www.w3.org/2001/XMLSchema-instance[/URL]” xmlns:xsd=“[URL]http://www.w3.org/2001/XMLSchema[/URL]”>
    <SOAP-ENV:Header xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/”></SOAP-ENV:Header>SOAP-ENV:Body[/URL]
    SOAP-ENV:Fault
    SOAP-ENV:Server
    [ISS.0088.9135] A WMDocument Exception was thrown in the server, usually because an XML block was not well-formed
    http://gxstest.com:7300/soap/

    webM:exception
    webM:classNamejava.lang.NullPointerException</webM:className>
    <webM:message xml:lang=“”></webM:message>
    </webM:exception>

    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    In all the documentToXMLString and related services i have given the namespace correctly.
    This is my input which we are submmiting to soapHTTP

    <?xml version="1.0" encoding="UTF-8"?>

    <SOAP-ENV:Envelope xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/[/URL]” xmlns:SOAP-ENC=“[URL]http://schemas.xmlsoap.org/soap/encoding/[/URL]” xmlns:xsd=“[URL]http://www.w3.org/2001/XMLSchema[/URL]” xmlns:xsi=“[URL]http://www.w3.org/2001/XMLSchema-instance[/URL]”>
    <SOAP-ENV:Header xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/”></SOAP-ENV:Header>SOAP-ENV:Body[/URL]
    <m:JournalEntryRequest xmlns:m=“[URL]http://www.gsx.com/gl[/URL]”>
    900
    iii
    </m:JournalEntry></SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    The response which is generating when I run the service individually gives me

    <?xml version="1.0" encoding="UTF-8"?>

    <SOAP-ENV:Envelope xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/[/URL]” xmlns:SOAP-ENC=“[URL]http://schemas.xmlsoap.org/soap/encoding/[/URL]” xmlns:xsd=“[URL]http://www.w3.org/2001/XMLSchema[/URL]” xmlns:xsi=“[URL]http://www.w3.org/2001/XMLSchema-instance[/URL]”>
    <SOAP-ENV:Header xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”></SOAP-ENV:Header>
    SOAP-ENV:Body
    <m:JournalEntryResponse xmlns:m=“[URL]http://www.gsx.com/gl[/URL]”>
    1
    0
    </m:JournalEntryResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    → we are using the default soap processor.
    My Questions

    1. The Soap response which we are forming is wellformed , what is the causing the above exception.
    2. when the soap request reaches the webservice is coming as the string type,rather than a object. so we are using stringToSOapdata to change into object.

    BR
    Hiubert


    #soa
    #API-Management
    #webMethods


  • 2.  RE: webservice throws XML block was not well-formed

    Posted Mon July 27, 2009 01:19 PM

    Which wm version are you using?

    Please validate if you have defind all namespace correctly while calling pub.xml:documentToXMLString (nsDecls parameter).

    Thanks
    Amrendra


    #soa
    #webMethods
    #API-Management


  • 3.  RE: webservice throws XML block was not well-formed

    Posted Mon July 27, 2009 02:48 PM

    Hi Amrendra

    I am using 7.1.x webMehods.

    And the namespace have been declared at the required places.

    still i am getting the same exception.

    BR
    Hiubert


    #soa
    #webMethods
    #API-Management


  • 4.  RE: webservice throws XML block was not well-formed

    Posted Wed July 29, 2009 09:41 AM

    You have mentioned that when you run the service individually it works fine…

    Could you please capture the soap envolop by individually running the service and then calling it as a ws, and then compare the envolop.

    You can repeat the same step for capturing the final soap response that you are generating.+


    #API-Management
    #webMethods
    #soa