Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: xmlhttp.open method...how to format the second argument [Thread Next] Re: xmlhttp.open method...how to format the second argumentTo: 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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
