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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

XML What is the ideal method to pass XML data

  • 1.  XML What is the ideal method to pass XML data

    Posted 04/05/04 11:07 PM

    Hello All,

    I would like to know what is the ideal method to pass XML data to webMethods which will execute my flow service directly. The web developer ask me how he should pass the XML data:

    1. FORMS collection. <form> element. Something like <input>
    2. Or the entire XML message.

    He’s going to do an HTTP post to execute my flow service. If we chose option 1, my flow service input will be the variablename? If we chose option 2, my flow service input will be a single string? I tried option 2 but wasn’t able to get it working properly. In my flow service, I define a single string as the input and then I do a “stringToDocument” but it failed. I’m just confuse how everything is suppose to work. Please advise.


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


  • 2.  RE: XML What is the ideal method to pass XML data

    Posted 04/05/04 11:28 PM

    noyb,

    If you are using option2 then make sure the following:

    1)The receving flow service input should be (Node) object and then invoke XMLNodeToDocument service for parsing the XML file.
    2)your client program while sending the XML string should set the Content-type=“text/xml” and do http post to WM.

    Regards,


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


  • 3.  RE: XML What is the ideal method to pass XML data

    Posted 04/05/04 11:33 PM


  • 4.  RE: XML What is the ideal method to pass XML data

    Posted 04/05/04 11:39 PM

    Thanks RMG. Where can I find the service XMLNodeToDocument. Is it in WmPublic package?


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


  • 5.  RE: XML What is the ideal method to pass XML data

    Posted 04/05/04 11:47 PM

    If you are using webmethods4.x server then,

    In WmPublic package look under the web folder for(pub.web:documentToRecord).This service is deprecated in 6.0 version

    If you are using webmethods6.x server then,

    In WmPublic package look under the xml folder for(pub.xml:XMLNodeToDocument).

    HTH,


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


  • 6.  RE: XML What is the ideal method to pass XML data

    Posted 04/06/04 01:04 AM

    Hi,

    The Edit/Find option in 6.x is great.

    Was this available in 4.x?

    Regards

    Alphan


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


  • 7.  RE: XML What is the ideal method to pass XML data

    Posted 04/06/04 03:25 PM

    FYI,

    I defined the Input of the service to be executed as an object and I called “node”. I then call the “documentToRecord” service. Is there correct?


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


  • 8.  RE: XML What is the ideal method to pass XML data

    Posted 04/06/04 03:53 PM

    yes,you are in right path.

    Regarding XML file its valid and you can also test this by opening it in browser for validness.

    HTH,


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


  • 9.  RE: XML What is the ideal method to pass XML data

    Posted 04/06/04 04:21 PM

    Thanks RMG. When I debug, using the save/restoreFromPipeline, when can’t I see the node in the results tab? First I enable the saveToPipeline service…I then I post the XML…I then disable the saveToPipeline and enable the restoreToPipeline (I made sure the filename is the same)…but I don’t see the node in the results tab. What’s the deal :-)?


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


  • 10.  RE: XML What is the ideal method to pass XML data

    Posted 04/06/04 04:30 PM

    How you are posting the XML to wm?While doing http post to WM make sure you set the Content-type=“text/xml”.

    And for testing you can also send the XML file to flowservice using developer tool by “Send XML File” option located under the Test Menu.

    HTH,


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


  • 11.  RE: XML What is the ideal method to pass XML data

    Posted 04/06/04 04:41 PM

    RMG, I made sure the Content-type=“text/xml”. I know my flow service works but I just wanted to trace through the steps just to analyze the pipeline of each step in my service. Without the restoreToPipeline, the test works. I post the XML data and got the response back as I expected. I just want to trace through the steps and see the results after each step in my flow service.


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


  • 12.  RE: XML What is the ideal method to pass XML data

    Posted 04/06/04 04:51 PM

    RMG, thanks for the advice on “Send XML File”. I guess that would work too. I thought I could use the saverestoreToPipeline for debugging purposes. Thanks for the quick response.


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


  • 13.  RE: XML What is the ideal method to pass XML data

    Posted 04/06/04 05:02 PM

    I don’t have any clue why the save/restore pipeline steps are not working which it supposed to show node object in the pipe.Any way continue with Send XML File option for further process.

    Regards,


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


  • 14.  RE: XML What is the ideal method to pass XML data

    Posted 04/10/04 08:27 AM

    saveToPipeline doesn’t work in this case is because the ‘node’ noyb trying to save is an object that is not “serialization”, Java term meaning can’t be saved to disk, thus also the problem when trying to’restorToPipeline’.


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


  • 15.  RE: XML What is the ideal method to pass XML data

    Posted 04/11/04 10:02 PM

    Do the savePipeline after the XMLNodeToDocument/documentToRecord call and the complete file contents will roundtrip. Assuming the node object is not used for anything else, it should be dropped before the savePipeline call.


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