views:

94

answers:

3

Hello,

I am a .NET begginer and i'm trying to develop a webservices using C# so i can send a XML data to an specific URL. I can't use Web Reference and i need to construct the xml data using this kind of format:

<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"&gt;
 <soap-env:Body>
 <m:Send xmlns:m="http://www.urltest.com/soap/arquivo.xsd"&gt;
 <user id="522" senha="pwd000"/>
 <ack txt_email="[email protected]" num_ack="12345678910" num_obs="1"/>
 </m:Send>
 </soap-env:Body>
</soap-env:Envelope>

i'm trying to research about MessageContracts, but so far i got nothing to help me.

Thanks in advance,

Felipe

+1  A: 

The best (fastest, easyest) way to develop a web service is to use WCF. Have you ever look on it?

Vasiliy Borovyak
Thanks vbor.I'm trying to research about MessageContracts and WCF, but i can't find something that teaches me how to create a xml with the structure that i posted. As i said, i cannot use WebReference, I'm have to send a xml data to a servlet that will receive the xml, process it and return another xml with some data that i need to parse.thanksFelipe
Felipe
A: 

It has nothing to do with xml. just send a string. using WebRequest, TcpClient, Socket or whatever.

Itay
A: 

Check out the MSDN WCF Developer Center for a ton of intro materials. There's a "Beginner's Guide" right on the landing page there. Check it out.

I especially recommend the WCF screencasts by Aaron Skonnard, also available here:

http://www.pluralsight.com/main/screencasts/default.aspx

Click on the "WCF" in the tag cloud and work your way up from the last of five pages to the front (the oldest, most basic screencasts useful for beginners are way in the back of the list :-). Excellent material.

Marc

marc_s