I want to send the xml request to another server and want to read the xml response in asp.net C#.
But I don’t know how to do it??
This is my request.. How can I generate it??
<request-Body>
<request>
<id>001</client-id>
<code>33333</authentication-code>
</request>
</request-Body>
This the the respond from another sever.
How to read it??
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope" xsi:schemaLocation="http://www.aaa.com/schemas/ver1.4/Schema.xsd">
<SOAP-ENV:Body xsi:type = "response-Body">
<response-Body>
<response>
<id>001</client-id>
<status>ok</status>
<authentication-status>yes</authentication-status>
<session-id>0</session-id>
</response>
</response-Body>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
How to do it?? How to connect another server??
This looks like a web service. Get the wsdl for the web service. There are two different apis you can use in .net to talk to the web service, ASMX based and WCF based. Each API has its own command line tool that is used to generate a proxy for the web service.
After you generate the proxy add the code file to your project.
Also in VS you can use the add web reference feature.
http://msdn.microsoft.com/en-us/library/bb628649.aspx