This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > July 2004 > Posting XML





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Posting XML
Leon Hoeneveld

2004-07-30, 7:15 am

Hello group,

I wonder if any of you has experience with the Business
Connector?

I want to pick up an XML file when it is posted. Imagine
someone posting something like:

http://server:port/invoke/service?XML=string

I wonder if you can do that. The string might get very long.
Is there another way of doing an XML-post?

Regards, Léon Hoeneveld


Martin Honnen

2004-07-30, 12:15 pm



Leon Hoeneveld wrote:


> I wonder if any of you has experience with the Business
> Connector?


I don't know Business connector.

> I want to pick up an XML file when it is posted. Imagine
> someone posting something like:
>
> http://server:port/invoke/service?XML=string
>
> I wonder if you can do that. The string might get very long.
> Is there another way of doing an XML-post?


What you have above is a HTTP GET request, the service would then need
to read out the query string. Not a good and feasable approach as there
are usually restrictions depending on user agent and/or proxy and/or
server for the length of the URL.
What you can and should do is send a HTTP POST request of Content-Type
text/xml where the XML forms the body of the HTTP request, that can be
easily done with MSXML e.g. with JScript
var httpRequest = new ActiveXObject('Msxml2.XMLHTTP');
httpRequest.open('POST', 'http://server:port/invoke/service', false);
httpRequest.send('<root><child>...</child></root>');
You can then process the response, for instance check
httpRequest.status
if the server returns XML process
httpRequest.responseXML


--

Martin Honnen
http://JavaScript.FAQTs.com/

Leon Hoeneveld

2004-07-30, 12:15 pm

Thanks Martin.

I think when the sender uses a post and uses the same
variable name as we do that everything will be alright. Just
forgot the difference between POST and GET.

Regards, Léon Hoeneveld

"Martin Honnen" <mahotrash@yahoo.de> wrote in message
news:u9YhMLidEHA.3964@TK2MSFTNGP10.phx.gbl...
>
>
> Leon Hoeneveld wrote:
>
>
>
> I don't know Business connector.
>
long.[color=darkred]
>
> What you have above is a HTTP GET request, the service

would then need
> to read out the query string. Not a good and feasable

approach as there
> are usually restrictions depending on user agent and/or

proxy and/or
> server for the length of the URL.
> What you can and should do is send a HTTP POST request of

Content-Type
> text/xml where the XML forms the body of the HTTP request,

that can be
> easily done with MSXML e.g. with JScript
> var httpRequest = new ActiveXObject('Msxml2.XMLHTTP');
> httpRequest.open('POST',

'http://server:port/invoke/service', false);
> httpRequest.send('<root><child>...</child></root>');
> You can then process the response, for instance check
> httpRequest.status
> if the server returns XML process
> httpRequest.responseXML
>
>
> --
>
> Martin Honnen
> http://JavaScript.FAQTs.com/
>



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews