Posting XML data through IE or IIBM

Hi friends,
My partner needs to post a XML data to a URL.I have successfully created a url and given to him.I have also written a flow service that accepts that xml data by creating a node and the calling XMLNodeToDocument flow service.To test it i myself am posting a xml string via http post to the URL which i have created(Content-Type=text/xml) and everything works fine i can see the xml data gettin populated in the database which my flow service does.
Now the problem is my partner is trying to post via an IE browser…i know that we cannot do that he says he gets a “page cannot be displayed” error also he tried to post it via IIBM,but still not successful.I am not able to figure it out how to do that .I have even set the execute ACL for my flow service as Anonymous.Please help with some suggestion how do i tell them to send the xml?
The URL which i have created is http://servername:portnumber/invoke/foldername.subfoldername1.subfoldername2:flowservicename


I have faced the similar problem but could not solve it. Surprisingly my partner was not getting any error when the code moved to test environment

You can’t use a web browser alone (IE, Firefox, Opera, etc.) to post XML data directly to a Flow service.

You can write a DSP page that allows you to paste an XML document into a text box and then invoke a Flow service or you could write a real application on the sending end that understands how to do an HTTP post (this is very, very basic stuff in most languages these days).

Your Flow service does not have a built-in user interface. You can either create one or write a program to post the XML.


Can’t I use code like below to test the http invocation of my service? :eek:

<SCRIPT Language="JavaScript">
function clickBtn()
 document.frmTest.action = "[URL="https://servername:5553/invoke/Sandbox.srv/test1"]https://servername:5553/invoke/Sandbox.srv/test1[/URL]";
<FORM name="frmTest" method="post">
 <INPUT type="button" name="btnSubmit" value= "Submit" onClick="clickBtn();">
 <TextArea width="300" height="100" name="contentStream" value="Hello World" >
<!-- <INPUT type="hidden" name="message" value="Hello World" > -->

You could create a web page like the one you pasted, but the content-type should be “text/xml”.

And, of course, the browser is now loading a page that invokes the service and not invoking the service directly which was the point of my original post.

Also, since “Hello World” is not an XML document, the IS content handler would throw an exception, if that content were not replaced before the submit button were clicked.


Here I cannot use “text/xml” as contentype because then the default content handler converts the input to “node”… and my input is not a valid xml

What will happen if there is no customized page created for this service… what i mean to say is i have just developed a flow service and trying to call it from a simple html page.

due to which i am using text/plain or application/x-wmflatfile as content type…

In the dev environment it is showing “This page cannot be displayed” but in test environment my partner is not getting any error…
If i write java client and try to invoke the service … it works just fine…
Even I used built in client:http service which also works fine.

The problem is not bothering me now… but i am just curious why there is such a difference in response from IS.


I think the basic point is that it is not possible to post a document to a flow service by typing an URL into a browser address box. It is absolutely possible to do as you have done and create an HTML interface to acquire the document and set up the HTTP post. As far as why you’re seeing different behavior in different environments, I can’t tell enough about the differences in the two environments to comment usefully.


Hi all,
My partner wants to post a XML data to an URL,which invokes a flow service.I have written a flow service and given them the following URL


In the flow service I am doin XML string to XMLnode and then node to document and then doing the necessary processing needed.When I do a test by goin to Test->Send XML it works perfectly fine.Also when I post the data through internet explorer by givin the following URL it works perfectly fine.the URL I m givin in IE browser is


This works fine.But my partner is sending the xml through some IBM tool and he is posting it via the following URL

POST /invoke/USFC_ACE_IF.Inbound.postBack.Transactions/inbound_PostBack HTTP/1.1..HOST: CONTENT-LENGTH: 352..CONTENT-TYPE: text/xml..ACCEPT: */*..ACCEPT-LANGUAGE: EN-US..ACCEPT-ENCODING: GZIP, DEFLATE.. CONNECTION: CLOSE....<PostBack><TransactionType>PREMMAN</TransactionType><OutControlISA>000000000</OutControlISA><OutControlGS>000000000</OutControlGS><OutControlST>57</OutControlST><OutSenderID>RETL</OutSenderID><OutReceiverID>CBP-ACE-TEST</OutReceiverID><TransactionID>9061108093031</TransactionID><OutMapDate>20061109</OutMapDate><OutMapTime>1007</OutMapTime></PostBack>

And this is creating a problem ,he doesn’t see any errors at his end but the field values are not getting populated at my end.he says that he has to use IBM tool and nothin else…what shld I incoporate in order to make this work

Plssss help

How are they invoking your service via URL in http post??? In any case they when they invoke your service they should send XML with content-type=text/xml inorder to receive *node object in the pipeline to make work at your end.Is that IBM tool not capable to send the content type info??


they are posting it via URL and the content type is set to text/xml but i noticed something the the encoding is GZIP,DEFLAT.The way the are posting is something like this


Hey -

I have a few things to add to the original conversation:

One really easy way to post XML to a flow service from an HTML form (without using JavaScript or anything) is to give the TEXTAREA (or whatever will hold your XML in the form) the name $xmldata. From GEAR’s XML Services Developer’s Guide:

[/SIZE][/FONT]Here’s a simple example:

Given this, one can realize that it is possible (but not practical) to send XML to a flow service by including the XML in the URL itself. One of the challenges, however, is that the XML and the $xmldata tag must be URL-encoded. Here’s an example:

This URL when “executed” will send the following XML to the postTest:receiveXml service:


A bigger challenge, however, is that the length of the URL is usually limited by the browser, so this practice would most likely not work for large XML documents.

Now, dhimate, if all you want to do is to post plain text data to a flow service, then how about creating a flow service that takes a String variable as input, call it flatFileData, for example. Then, create an HTML form where the TEXTAREA name is the same as your variable name and the action is the URL to your service. Example:

When you submit the form, your input variable will be assigned the text from the TEXTAREA.

  • Percio

Hi Friends,
I have created a service that is expecting an xml post. The client is setting the content-type to text/xml and the service is correctly receiving the xml post as a node object I then convert the node to document etc… the service seems to work fine.Now the client wants a response to the XML post which he has done.How do i do that??


Hi Ppl,
When my partner sends me an XML data through HTTP post,he gets a 403 error.I dont understand.He has all the username and password which I have provided.
Please help

I’ve written a small .net (2.0) app that will do a HTTP post to a flow service, Private Message me with your email address if you’d like a copy. I’ve used this in conjunction with YATT to trace and debug requests/responses to services.


Why don’t you submit this as shareware to the Shareware area of wMUsers?


That’ll work. I’ll clean it up this weekend and post it up there. Cheers.