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.  Sending XML data to BC using HTTP

    Posted Wed November 03, 2004 11:35 AM

    Hi to all,

    I’m trying to send XML data to a Business Connector 4.6 using HTTP POST to a flow service that only has a documentToRecord step. The call is working ok (I get a 200 response from BC) but the service is not decoding the XML data. Using a HTTP sniffer I can see what I am sending (and looks ok…):

    POST /invoke/RemoteServices:GetXMLData HTTP/1.1
    Authorization: Basic aGVycnNlZXM6VVAyZ3VuZw==
    Content-Type: text/xml
    Accept: text/xml
    User-Agent: Java1.3.1
    Host: bbmags8.bbmag.bbraun.com:6666
    Connection: keep-alive
    Content-length: 11220

    <?xml version=“1.0” encoding=“UTF-8”?>
    <root table=“ZSHG.IDOCPALE”>
    <segment>
    <segnam>E1EDL20</segnam>
    <mandt>110</mandt>
    <docnum>0000000000431101</docnum>
    <segnum>000001</segnum>
    <psgnum>000000</psgnum>
    <hlevel />
    <sdata>0076501029ES3D2240 Almacén CIFRubi 010.025 0.024 KGM2.134 DMQ00000</sdata>
    </segment>
    <segment>
    <segnam>Z1EDL20</segnam>
    <mandt>110</mandt>
    <docnum>0000000000431101</docnum>
    <segnum>000002</segnum>
    <psgnum>000001</psgnum>
    <hlevel />
    <sdata>ZMM00_THIRD_PARTY 00</sdata>
    </segment>
    </root>

    Any help will be greatly appreciated!

    Thanks in advance
    Sebastià


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Sending XML data to BC using HTTP

    Posted Wed November 03, 2004 02:37 PM

    Sebastia,

    Is the documentToRecord step is not parsing the XML?
    Did you provided the necessary inputs as expected like (node,recordName(fully qualified recordname),makeArrays=false (if the xml has complex arrays then set this to true and fill the Arrays param) and the output will be boundNode(map this to a recordReference which is the actual xml structure that you are trying to parse).

    For debugging put a savePipelineToFile and later restore it and step thru the flow.

    let use know the result.

    HTH,
    RMG.


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods


  • 3.  RE: Sending XML data to BC using HTTP

    Posted Wed November 03, 2004 04:00 PM

    Hi again and thanks for your response!

    I’ve added a savePipelineToFile to the flow, and I have found that the node variable is empty. So it seems that BC is not receiving the data correctly.

    I am sending the data from a Java program using a HttpURLConnection to make the connection and then sending the XML using a PrintWriter connected to the output stream.

    Perhaps I must configure something in BC?

    Thanks in advance

    Sebastià


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 4.  RE: Sending XML data to BC using HTTP

    Posted Wed November 03, 2004 04:31 PM

    Sebastia,

    I am not so familiar to BC/IS environment,and i think there is nothing need to configure for http process,but the way you are http posing the XML with content-type:“text/xml” will definetly work and you should see the node object with value and downstream parsing will work.

    For testing purpose you can do is try using (pub.client.http) service and do the same process which you are doing using Java stub and make sure http post works internally in your BC.

    HTH,
    RMG


    #webMethods
    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB


  • 5.  RE: Sending XML data to BC using HTTP

    Posted Wed November 03, 2004 06:00 PM

    Hi RMG,

    It’s solved! :slight_smile:
    The problem was that I was sending special chars (Like in Almacén) with an UTF-8 encoding. I changed the encoding to “ISO-8859-1”, and now it’s working.

    I found the error when I tested the flow in the Business Connector Developer, and using Test->Send XML File. It showed a XML malformed error.

    Thanks for all

    Sebastià


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 6.  RE: Sending XML data to BC using HTTP

    Posted Wed November 03, 2004 06:16 PM

    great,you found it,always debugging helps a lot.


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods