How to view XML Posted to a SOAP web service

Posted on 2012-08-28
Last Modified: 2012-08-30
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

                DateTime today = DateTime.Now.Date;

                using (ManageSubscriptionsService service = new ManageSubscriptionsService())



                    subscriberDetails newSubscription = new subscriberDetails();
                    newSubscription.emailAddress = "";
                    newSubscription.password = "pp";
                    newSubscription.givenName = "ps";
                    newSubscription.familyName = "s";
           = "";
                    newSubscription.region = "";
           = "";
                    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

Question by:pritam25shitole
    LVL 35

    Accepted Solution

    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.
    LVL 16

    Assisted Solution

    by:Rose Babu

    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.

    Download soapUI and instal it.

    Just add the WSDL file as mentioned in the below tutorial

    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.

    Author Comment

    stepping into code gives me the values that I am passing but not the raw XML.
    Even fidler doesn't seem to help here.

    Author Comment

    Fiddler2 did the job! Turns out I was looking at wrong piece of info.

    thanks for your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API ( has made its way into the popular lexicon of the English language.  A few years ago, …
    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…
    This video is a brief demonstration on how to use security groups and Network Access Control Lists (ACLs) in Amazon Web Services.  Security groups and Network ACLs are mechanisms you can use in AWS to control network traffic.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now