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
Expand all | Collapse all

Sending xmlDoc string to webservice as input parameter

webMethods Community Member

webMethods Community MemberTue August 08, 2006 10:30 PM

webMethods Community Member

webMethods Community MemberWed August 09, 2006 04:08 AM

  • 1.  Sending xmlDoc string to webservice as input parameter

    Posted Mon August 07, 2006 02:18 AM

    Hi All,

    Im trying to send an xml string to a webservice as an input paramter, however it receives the error:’
    Server was unable to read request. → There is an error in XML document (5, 4). → The XML declaration is unexpected. Line 5, position 16.’

    Here is the xml Doc im trying to send:

    <?xml version="1.0" standalone="yes"?>
    <ItemDescJde xmlns="http://Integration/itemDesc">
    <Table>
    <ID>1234VBMRBERRO</ID>
    <lineNo>1</lineNo>
    <itemNo>9990327</itemNo>
    <desc_a>                              </desc_a>
    <desc_b>                              </desc_b>
    <mrp_item>2</mrp_item>
    <uom>  </uom>
    </Table>
    </ItemDescJde>

    I have tried setting the various pararmeters in the pub.xml:documentToXmlString step of the web service invocation to no avail…

    Thanks for any help


    #API-Management
    #soa
    #webMethods


  • 2.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Mon August 07, 2006 02:34 AM

    Try removing this line. It is not necessary and may be causing the problem.

    <?xml version="1.0" standalone="yes"?>

    Mark


    #API-Management
    #webMethods
    #soa


  • 3.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Mon August 07, 2006 03:02 AM

    Thanks Mark, that worked…I had a feeling it was that and the quotes in it… If the webservice then returns an xmlstring should it have the xml declaration removed also?


    #API-Management
    #soa
    #webMethods


  • 4.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Mon August 07, 2006 03:06 AM

    Just tested it, and it doesnt matter if it includes the xml declaration or not…Thanks


    #API-Management
    #webMethods
    #soa


  • 5.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Mon August 07, 2006 03:25 AM

    Kewl. Glad that worked. The line “The XML declaration is unexpected” was the clue.


    #API-Management
    #soa
    #webMethods


  • 6.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Tue August 08, 2006 08:30 PM

    I am trying to call my partner’s webservice and I get this error. I am using certificates. I just renewed our certificate. Prior to expiration everything used to work smoothly. Can someone help on this. Thanks in advance.

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

    <soap:Envelope xmlns:soap=“[URL=“http://schemas.xmlsoap.org/soap/envelope/”]http://schemas.xmlsoap.org/soap/envelope/[/URL]” xmlns:xsi=“[URL=“http://www.w3.org/2001/XMLSchema-instance”]http://www.w3.org/2001/XMLSchema-instance[/URL]” xmlns:xsd=“[URL=“XML Schema”]http://www.w3.org/2001/XMLSchema[/URL]”>
    soap:Body
    soap:Fault
    soap:Client
    Server was unable to read request. → There is an error in XML document (5, 4). → The XML declaration is unexpected. Line 5, position 16.

    </soap:Fault>
    </soap:Body>
    </soap:Envelope>


    #webMethods
    #soa
    #API-Management


  • 7.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Tue August 08, 2006 08:37 PM

    What makes you think this issue is related to the expiration of your security certificate?

    Can you post the soap request message? It appears that it contains an extraneous XML declaration.

    Mark


    #API-Management
    #soa
    #webMethods


  • 8.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Tue August 08, 2006 08:42 PM

    Only reason i thought certificate could be issue is after renewal its not working.
    Below is the first few lines of my request :

    <?xml version="1.0" encoding="utf-8"?> 30XYZ PP PP 2 0

    Going through this thread i tried removing the xml declaration. But that also did not work.


    #API-Management
    #soa
    #webMethods


  • 9.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Tue August 08, 2006 08:51 PM

    That’s not enough of the request to understand the issue. Are you sending a soap message? If so, what does the envelope look like? Can you capture the request on the wire and review it for extra xml declarations?

    Mark


    #soa
    #webMethods
    #API-Management


  • 10.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Tue August 08, 2006 09:03 PM

    Thanks Mark. I did that.
    Here is soap msg capture on wire :

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

    <SOAP-ENV:Envelope xmlns:SOAP-ENV=“[URL=“http://schemas.xmlsoap.org/soap/envelope/”]http://schemas.xmlsoap.org/soap/envelope/[/URL]” xmlns:SOAP-ENC=“[URL=“http://schemas.xmlsoap.org/soap/encoding/”]http://schemas.xmlsoap.org/soap/encoding/[/URL]” xmlns:xsd=“[URL=“XML Schema”]http://www.w3.org/2001/XMLSchema[/URL]” xmlns:xsi=“[URL=“http://www.w3.org/2001/XMLSchema-instance”]http://www.w3.org/2001/XMLSchema-instance[/URL]”>
    SOAP-ENV:Body
    <tns1:ImportTitle xmlns:tns1=“[URL=“.xyz Domain Names | Join Generation XYZ”].xyz Domain Names | Join Generation XYZ”>
    tns1:arg1
    <lib_title>
    <title_no>XYZ</title_no>
    <cust_id></cust_id>
    PP 2
    <title_desc>PP</title_desc>



    <reel_num></reel_num>

    <time_code_no>0</time_code_no>


    #webMethods
    #API-Management
    #soa


  • 11.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Tue August 08, 2006 09:09 PM

    Based on that message fragment, I don’t have the slightest idea.


    #soa
    #API-Management
    #webMethods


  • 12.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Tue August 08, 2006 09:14 PM

    Does that mean the information i provided is not sufficient for further analysis. OR the message looks good and we are unable to identify what is going on ?


    #webMethods
    #soa
    #API-Management


  • 13.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Tue August 08, 2006 10:30 PM


  • 14.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Wed August 09, 2006 12:18 AM

    Little different error this time :

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

    <soap:Envelope xmlns:soap=“[URL=“http://schemas.xmlsoap.org/soap/envelope/”]http://schemas.xmlsoap.org/soap/envelope/[/URL]” xmlns:xsi=“[URL=“http://www.w3.org/2001/XMLSchema-instance”]http://www.w3.org/2001/XMLSchema-instance[/URL]” xmlns:xsd=“[URL=“XML Schema”]http://www.w3.org/2001/XMLSchema[/URL]”>
    soap:Body
    soap:Fault
    soap:Client
    Server was unable to read request. → There is an error in XML document (6, 4). → ‘Element’ is an invalid node type. Line 6, position 4.

    </soap:Fault>
    </soap:Body>
    </soap:Envelope>

    One difference I see my earlier between my successful webservice call and failure webservice call. Earlier I did not have SP2 installed in my env. and Now I have SP2 installed. My regular simple webservice is also not working after i upgrade. Can you help in identifying what more i have to take care ?

    Thanks in advance


    #API-Management
    #webMethods
    #soa


  • 15.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Wed August 09, 2006 12:19 AM

    One difference I see between my successful webservice call and failure webservice call. Earlier I did not have SP2 installed in my env. and Now I have SP2 installed. My regular simple webservice is also not working after i upgraded. Can you help in identifying what more i have to take care ?


    #API-Management
    #soa
    #webMethods


  • 16.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Wed August 09, 2006 04:08 AM

    Need. The. Request.


    #soa
    #webMethods
    #API-Management


  • 17.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Wed August 09, 2006 07:08 PM

    Sorry Mark. I did not understand. Did you mean complete soap message ?


    #API-Management
    #webMethods
    #soa


  • 18.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Wed August 09, 2006 08:43 PM

    Please post the complete SOAP request messsage. Feel free to edit out any company-specific information. You should be able to post it as an attachment with a txt or xml file extension.

    Mark


    #API-Management
    #webMethods
    #soa


  • 19.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Wed August 09, 2006 08:56 PM

    Please find the attachment enclosed.
    PP305.xml (4.13 KB)


    #webMethods
    #API-Management
    #soa


  • 20.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Wed August 09, 2006 09:23 PM

    Is your partner’s ImprorTitle operation expecting a single item “arg1” that contains an XML string? Do you have a WSDL that describes this service?

    What content-type is being sent in the HTTP properties of the working service invocation and the non-working one?

    Mark


    #API-Management
    #soa
    #webMethods


  • 21.  RE: Sending xmlDoc string to webservice as input parameter

    Posted Wed August 09, 2006 10:32 PM

    Yes. My partner webservice expects arg1 that contains xml string. enclosed is the wsdl from my partner.

    The content type is by default text/xml. Even if force it or not its taking the content type as text/xml; charset=utf-8.

    Thanks
    ti.wsdl (2.66 KB)


    #API-Management
    #soa
    #webMethods