duplicated soap response
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.aspnet.webservices.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

David Bartosik MSFT MVP (VIP)
My client wanted the "any" wildcard in the WSDL replaced with the data
schema, just like in the SOAP. To acomplish that I created a class (called
Play) of the data fields. Then in the web method I used XmlElement as such:
[return: XmlElement(typeof(Play[]))]
public XmlNode RandomNowPlayingXml(string format)
..
..
..
return new XmlDataDocument(type);

That gives the client the schema in the WSDL they wanted but it duplicates
it in the soap :

<soap:Body>
<RandomNowPlayingXmlResponse xmlns="http://bdskc.com/webservices/";>
<RandomNowPlayingXmlResult>
<Play>
<msa_metro_id>string</msa_metro_id>
<print_name>string</print_name>
<station_num>string</station_num>
<call_letters>string</call_letters>
<station_type_id>string</station_type_id>
<song_title>string</song_title>
<artist_name>string</artist_name>
<label_descr>string</label_descr>
<detect_datetime2>string</detect_datetime2>
</Play>
<Play>
<msa_metro_id>string</msa_metro_id>
<print_name>string</print_name>
<station_num>string</station_num>
<call_letters>string</call_letters>
<station_type_id>string</station_type_id>
<song_title>string</song_title>
<artist_name>string</artist_name>
<label_descr>string</label_descr>
<detect_datetime2>string</detect_datetime2>
</Play>
</RandomNowPlayingXmlResult>
</RandomNowPlayingXmlResponse>
</soap:Body>

Is that a problem? Is there a better solution?

--
David Bartosik - MS MVP
www.publishermvps.com

Reply to this message...
 
    
[MSFT] (VIP)
Hello david,

Since you define the XmlElementArrtibute as Play[] ( an array) , there
will two <Play> element in the soap body. I don't think it is a problem. Is
there any issues when you call the web service?

Luke

Reply to this message...
 
    
David Bartosik - MSFT MVP (VIP)
I don't "think" it's a problem either.
Still awaiting a response from the client doing the consuming.

--
David Bartosik
Microsoft MVP
www.davidbartosik.com

"[MSFT]" <Click here to reveal e-mail address> wrote in message
news:HQ$3%23Q%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
[MSFT] (VIP)
Hi David,

Have you received any feedback from your customer? If you need further
assistance on this issue, please feel free to post
here. I will continue to work with you.

Regards,

Luke

Reply to this message...
 
    
[MSFT] (VIP)
If you need further assistance on this issue, please feel free to post
here. I will continue to work with you.

Regards,

Luke

Reply to this message...
 
    
Steven Cheng[MSFT] (VIP)
Hi David

Thank you for posting. Regarding on the issue, I am
finding proper resource to assist you and we will update as soon as posible.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security(This posting is provided "AS IS",
with no warranties, and confers no rights.)

Reply to this message...
 
    
David Bartosik - MSFT MVP (VIP)
Thanks.
Could you additionally review my post called "
trying to use custom wsdl - .Net 1.1" - it's about 7 threads prior.

--
David Bartosik
Microsoft MVP
www.davidbartosik.com

"Steven Cheng[MSFT]" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 
System.Xml.XmlDataDocument
System.Xml.XmlElement
System.Xml.XmlNode




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com