Solved

How to SEE ENTIRE XML returned from Web Service

Posted on 2011-09-16
7
337 Views
Last Modified: 2012-05-12
We have a web service that takes a complex type as input and returns a complex type as output

How do we SEE the entire XML of the output?

=========================================

    Private Sub BtnSend_CORS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSend_CORS.Click
     
        Dim svc As New SxM.Service1

        Dim CORs As New SxM.CustomerOrderRequests()

        Dim COR As New SxM.CustomerOrderRequest
        COR.CreatedBy = Me.tbCreatedBy.Text
        COR.DateCreated = Now()
        COR.MessageId = CInt(Me.tbMessageId.Text)
        COR.MessageTypeId = 0
        COR.StatusChangeAuthor = "StatusChangeAuthor"

        Dim CORCO As New SxM.CustomerOrderRequestCustomerOrder()
        CORCO.AffiliateId = 0
        CORCO.AffiliateIdSpecified = CBool(False)
        CORCO.AffiliateOrderNumber = Me.tbAffiliateOrderNumber.Text
        CORCO.CustomerOrderId = CInt(Me.tbCustomerOrderId.Text)
        CORCO.PromotionalMaterialType = "PromotionalMaterialType"

        Dim CORCOCOU As New SxM.CustomerOrderRequestCustomerOrderCustomerOrderUnit()
        CORCOCOU.Address1 = Me.tbAddress1.Text
        CORCOCOU.Address2 = "Address2"
        CORCOCOU.BillingAmount = 0
        CORCOCOU.City = "City"
        CORCOCOU.Company = Me.tbCompany.Text
        CORCOCOU.Country = "Country"

        CORCO.CustomerOrderUnit = CORCOCOU
        COR.CustomerOrder = CORCO
        CORs.CustomerOrderRequest = COR

'The response is a complex type returning an object SxM.CsiNotification
        Dim ret As SxM.CsiNotification
'Here we call the Web Service and pass in the complex CORS structure
        ret = svc.postCOU(CORs)
'Here we want to SEE the xml ... below doesn't work
        tbResponse.Text = ret.ToString()
'all I get in text box is:   Client.SxM.CsiNotification

    End Sub
=================================

I want to see the entire XML received back from the web service call

How?
0
Comment
Question by:volking
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 28

Accepted Solution

by:
strickdd earned 500 total points
ID: 36551055
The easiest way is to call the web service with the same inputs through a third part application (i.e., Web Service Studio or SoapUI). That will give you the raw XML.
0
 
LVL 23

Expert Comment

by:wdosanjos
ID: 36551206
You can enable WCF Message Logging:

http://msdn.microsoft.com/en-us/library/ms730064.aspx
0
 
LVL 2

Expert Comment

by:mansooralia_yahoo
ID: 36553809
'The response is a complex type returning an object SxM.CsiNotification

according to this sentence, the return is an object, check what properties are populated in that object, you may find a raw xml string too
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 5

Author Comment

by:volking
ID: 36554420
@Strickdd - I need "See" the XML in about 20 places in my code. That solution may (or may not) work, but I'll try it as a last resort.

@mansooralia - I've looked and can find nothing about XML in the objects.

@wdosanjos - Trying your suggestion now.

Thanks - Volking
0
 
LVL 5

Author Comment

by:volking
ID: 36554462
@wdosanjos - Took awhile to realize, we're not using WCF. This is an OLD WebService originally written for Framework 2.0 using Visual Studio 2003. It has evolved over the years. From what I read, looks like WCF Message Logging isn't applicable.
0
 
LVL 23

Expert Comment

by:wdosanjos
ID: 36561938
OK. I guess your application is probably using WSE, if so the following link should work for you.

Web Services Enhancements Diagnostic Settings
http://msdn.microsoft.com/en-us/library/aa529559.aspx

Web.Config
<configuration>
   <configSections>
      <section name="microsoft.web.services3"
               type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
   </configSections>
  <microsoft.web.services3>
    <diagnostics> 
      <trace enabled="true" 
        input="d:\trace\inputTrace.webinfo" 
        output="d:\trace\outputTrace.webinfo"/>
    </diagnostics>
  </microsoft.web.services3>
</configuration>

Open in new window


Note: Give the proper access to the trace folder for the ASP.NET Machine Account (generally 'ASPNET'), otherwise it will fail to create/write the trace files.
0
 
LVL 5

Author Closing Comment

by:volking
ID: 36582094
Although clumsy, this is the only solution that worked
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

730 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