?
Solved

How to view XML Posted to a SOAP web service

Posted on 2012-08-28
4
Medium Priority
?
736 Views
Last Modified: 2012-08-30
Hi,
I am using a SOAP based web service. Below is a snippet of my code.
I am getting error, and the vendor has asked me to provide them with the XML that i post. How go I get hold of the raw XML that is getting posted?

please help

thanks
try
            {
                DateTime today = DateTime.Now.Date;

                 
                using (ManageSubscriptionsService service = new ManageSubscriptionsService())

                {

 

                    subscriberDetails newSubscription = new subscriberDetails();
                 
                    newSubscription.emailAddress = "abc@aaa.net";
                    newSubscription.password = "pp";
                    newSubscription.givenName = "ps";
                    newSubscription.familyName = "s";
                    newSubscription.town = "";
                    newSubscription.region = "";
                    newSubscription.country = "";
                    newSubscription.startDate = today;
                    newSubscription.startDateSpecified = true;
                    newSubscription.endDate = today.AddYears(2).AddDays(-1);
                    newSubscription.endDateSpecified = true;
                    newSubscription.numberOfComputersAllowed = 10;
                    newSubscription.numberOfComputersAllowedSpecified = true;
                    newSubscription.subscribedNodeId = 33137;
              
                    
                  long i =  service.addSubscriber(GetSOAPAuthDetails(),newSubscription,1065);
                   
                 
                
                }

Open in new window

0
Comment
Question by:pritam25shitole
  • 2
4 Comments
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 980 total points
ID: 38344194
Can you step into the code and see what is called subsequently in those functions like service.addSubscriber?

A solution without looking at the code may be to use a tool like Fiddler, which can show you any network traffic in and out, text/xml or otherwise.
0
 
LVL 16

Assisted Solution

by:Rose Babu
Rose Babu earned 980 total points
ID: 38344389
Hi,

If you are using the WCF web services, then you have to use some third party tool to get the request and response XML structure.

Best third party tools i'm using is soapUI.

http://soapui.org/

http://sourceforge.net/projects/soapui/files/

Download soapUI and instal it.

Just add the WSDL file as mentioned in the below tutorial

http://soapui.org/Getting-Started/your-first-soapui-project.html

then you could see the web methods available. and by expanding the webmethod you can see the request node. Then Double click it to get the request XML structure.

Also this is the best tool to test all kind of the web services.

Get the XML structure and give that to your vendor. Or give me the wsdl link, i can post the XML structure.
0
 

Author Comment

by:pritam25shitole
ID: 38344416
stepping into code gives me the values that I am passing but not the raw XML.
Even fidler doesn't seem to help here.
Thanks
0
 

Author Comment

by:pritam25shitole
ID: 38349088
Fiddler2 did the job! Turns out I was looking at wrong piece of info.

thanks for your help.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question