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
Rajeev Ranjan
NA
8
5.2k
Web Service call dynamically using HTTPWebRequest
Mar 5 2012 10:49 AM
Hi,
I am writting one application that will call any SOAP Web Service dynamically. I used HTTPWebRequest object of C# for this but I receive different format of Request and Response packet. I am not able to identify how to create such request packet (XML) so it will work for all type of Web Services. Example one service takes all input parameter under METHOD NAME tag in SOAP:body. Another service takes one more tag between input parameter and METHOD NAME tag. Same happens with Response packet. Even namespace is also different in request packet. Please check below 2 examples. I am not sure how to handle such scenario.
Can anybody tell me how to handle such thing.
Thanks in advance.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
" xmlns:xsd="
http://www.w3.org/2001/XMLSchema
" xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/
">
<soap:Body>
<ConversionRate xmlns="
http://www.webserviceX.NET/
">
<FromCurrency></FromCurrency>
<ToCurrency></ToCurrency>
</ConversionRate>
</soap:Body>
</soap:Envelope>
=====================================================================
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<UserCredentials xmlns="http://www.xyz.com/Services">
<userid>
string
</userid>
<password>
string
</password>
</UserCredentials>
</soap:Header>
<soap:Body>
<ChangeAccountInfo xmlns="http://www.corecard.com/Services">
<ChAcctRequest>
<AccountNumber>
string
</AccountNumber>
<CardNumber>
string
</CardNumber>
</ChAcctRequest>
</ChangeAccountInfo>
</soap:Body>
</soap:Envelope>
Regards,
Rajeev
Reply
Answers (
1
)
Protocol error
Datagridview does not display the return dataset in win forms