hello,
i am new to web service . can any one tell me how can i send xml file to xml webservice and receive xml webservice (WSDL,SOAP)
following is the code that i have attempted , which is not working for me:-
[WebService(Namespace = "http://microsoft.com/webservices/")]
protected void Button1_Click(object sender, EventArgs e)
{
XmlTextWriter writer = new XmlTextWriter("input.xml", System.Text.Encoding.UTF8);
writer.WriteStartDocument(true);
writer.Formatting = Formatting.Indented;
writer.Indentation = 2;
//<string xmlns="http://tempuri.org/">
writer.WriteStartElement("string");
//writer.WriteAttributeString("xmlns","http://tempuri.org/");
writer.WriteStartElement("IDV");
writer.WriteStartElement("start_date");
writer.WriteString("25/12/2014");
writer.WriteEndElement();
writer.WriteStartElement("class_cd");
writer.WriteString("4");
writer.WriteEndElement();
writer.WriteStartElement("LocationCode");
writer.WriteString("10416");
writer.WriteEndElement();
writer.WriteStartElement("modelcode");
writer.WriteString("22647");
writer.WriteEndElement();
writer.WriteStartElement("manufacturer_code");
writer.WriteString("12474");
writer.WriteEndElement();
writer.WriteStartElement("purchasedate");
writer.WriteString("24/12/2013");
writer.WriteEndElement();
writer.WriteStartElement("manufacturingyear");
writer.WriteString("2013");
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndDocument();
writer.Close();
XmlDocument XmlDoc = new XmlDocument();
XmlDoc.Load("input.xml");
demo.Service src=new demo.Service();
var exelement = src.getPremium("test",4);
}
Regards ,
Avishek