Hi,
I have to write an interface that accepts "XML over HTTP"-messages. How is
this done in .NET?
The goal is to have an application (webservice, webapplication, ...) that
accepts XML over HTTP and that sends reponses the same way.
I'm used to webservices, but this seems to be different.
Can someone give me a hint?
Jeroen db
//Rutger Smit - 26 Oct 2005 19:40 GMT
Well, webservices are XML over HTTP
It's just another name.
Cheers,
//Rutger
http://www.RutgerSmit.com
> Hi,
>
[quoted text clipped - 9 lines]
>
> Jeroen db
Jeroen De Brabander - 26 Oct 2005 19:56 GMT
Hi Rutger,
I'm probably being a real newbie, I'm a little confused ...
I am aware of the fact that webservices use XML over HTTP but in my
situation, the party I'm interfacing with wants a URL to which they can send
XML messages to. They will not be able to call webmethods and so on. They
just want a URL from me to which they make a xmlhttpRequest.
Is this making any sense?
Jeroen db
> Well, webservices are XML over HTTP
> It's just another name.
[quoted text clipped - 17 lines]
>>
>> Jeroen db
Bruce Barker - 26 Oct 2005 21:03 GMT
you will need more info. there are three approaches
1) a standard webserveice (SOAP)
2) xml post - standard http post - content-type: text/xml or
application/xml
3) xml urlencode in a form field - content-type:
application/x-www-form-urlencoded
-- bruce (sqlwork.com)
> Hi,
>
[quoted text clipped - 9 lines]
>
> Jeroen db
Sreejith Ram - 26 Oct 2005 21:25 GMT
I think, to make an aspx page return XML all you need to do is to remove all
HTML tags from aspx page and do response.write to contruct the response XML
tags
this may help http://www.objectgraph.com/dictionary/how.html
Googling : "xmlhttpRequest asp" should bring up some more samples
> Hi,
>
[quoted text clipped - 9 lines]
>
> Jeroen db
sp3d2orbit - 26 Oct 2005 21:38 GMT
Haven't tried it in C#, but I imagine this might work:
Posting:
http://yourdomain.com/yourpage.aspx?data=<xml_to_post/>
-of course this needs to be done as a post and not a query or it will
get truncated
In yourpage.aspx
void Page_Load()
{
string strPostedXml = (string) Request["data'];
}
I don't think it needs to be any harder than that.