Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xmlhttp.open method...how to format the second argument

From: "Alex Krawarik [MSFT]" <alexkr@------.---------.--->
To: NULL
Date: 4/30/2007 2:06:00 PM
Also, you can use setRequestHeader() to add specific headers, if you need.

Alex

"Neil Smith [MVP Digital Media]" <neil@n...> wrote in message 
news:q4h733dvbkbgu99ppv53ca8m47mak78dhm@4......
> NJo mystery - Just like
>
> xmlhttp.open("POST", "http://12.345.6.789:4580/RQ1", false);
> xmlhttp.send(strXMLData);
>
> Assuming of course that /RQ1 is an alias for some processing script
> expecting to receive the XML packet.
>
> If you were using PHP, you'd need to check php://input to get the raw
> POST data, because you wouldn't be posting a variable to key off in
> the example above (typically, GET and POST use key=value pairs)
>
> HTH
> Cheers - Neil
>
>
> On 28 Apr 2007 13:49:08 -0700, mirandacascade@y... wrote:
>
>>Questions at the bottom of this post.
>>Situation is this:
>>1) existing client program uses BSD socket library to post a message
>>and receive a reply
>>2) would prefer it if client program would use xmlhttp to manage the
>>process of posting a message and receiving replies
>>3) the existing client program knows the ip address and the port
>>number, and it uses those 2 pieces of information to connect
>>4) it looks like when one uses the xmlhttp.open method, where the
>>first argument is 'POST', the second argument is a url
>>5) also, I'm not sure how to configure xmlhttp so that it produces the
>>exactly what is expected in the first line of the HTTP header
>>
>>Example:
>>
>>client app knows the following information:
>>ip address: "12.345.6.789"
>>port: 4580
>>
>>client app puts the following request message on the wire:
>>
>>POST /RQ1 HTTP/1.1
>>Content-type: text/xml
>>Header-AppName: RQ1
>>Header-FileName: httpsonic.xml
>>User-Agent: Java1.3.0
>>Host: 12.345.6.789:4580
>>Accept: text/html,image/gif,image/jpeg,*;
>>Connection: keep-alive
>>Content-length: 46
>>
>><request><dbup><bank>1</bank></dbup></request>
>>
>>So, my questions are:
>>1) is there a way to transform the ip address and port number into a
>>string the contents of which contain the url that gets passed as the
>>second argument to the xmlhttp.open method?
>>would it be something like: "http://12.345.6.789:4580" ?
>>2) is there a way to configure things such that when xmlhttp creates
>>the HTTP header, the first line of the header will contain "/RQ1"
>>between the POST and the HTTP/1.1?
>>
>>Thank you.
> ------------------------------------------------
> Digital Media MVP : 2004-2007
> http://mvp.support.microsoft.com/mvpfaqs 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent