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:
FORMS collection. <form> element. Something like <input>
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.
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.
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 :-)?
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.
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.
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.
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’.
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.