TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Avishek Singh
NA
179
3.6k
sending and receiving xml file to XML Web Service
Dec 26 2014 3:38 AM
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
Reply
Answers (
1
)
Error: Cannot import wsdl:binding Detail: The required WSDL
How to call webservice from stored Procedure.