Professional Web Applications Themes

duplicated soap response - ASP.NET Web Services

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 XmlDataDoent(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> ...

  1. #1

    Default duplicated soap response

    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 XmlDataDoent(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
    [url]www.publishermvps.com[/url]






    David Bartosik MSFT MVP Guest

  2. #2

    Default RE: duplicated soap response

    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! [url]www.microsoft.com/security(This[/url] posting is provided "AS IS",
    with no warranties, and confers no rights.)

    Steven Cheng[MSFT] Guest

  3. #3

    Default Re: duplicated soap response

    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
    [url]www.davidbartosik.com[/url]

    "Steven Cheng[MSFT]" <v-schangonline.microsoft.com> wrote in message
    news:YYYYlClkEHA.1968cpmsftngxa10.phx.gbl...
    > 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! [url]www.microsoft.com/security(This[/url] posting is provided "AS IS",
    > with no warranties, and confers no rights.)
    >

    David Bartosik - MSFT MVP Guest

  4. #4

    Default RE: duplicated soap response

    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

    [MSFT] Guest

  5. #5

    Default Re: duplicated soap response

    I don't "think" it's a problem either.
    Still awaiting a response from the client doing the consuming.

    --
    David Bartosik
    Microsoft MVP
    [url]www.davidbartosik.com[/url]

    "[MSFT]" <lukezhanonline.microsoft.com> wrote in message
    news:HQ$3%23Q%23kEHA.2792cpmsftngxa10.phx.gbl...
    > 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
    >

    David Bartosik - MSFT MVP Guest

  6. #6

    Default Re: duplicated soap response

    If you need further assistance on this issue, please feel free to post
    here. I will continue to work with you.

    Regards,

    Luke

    [MSFT] Guest

  7. #7

    Default Re: duplicated soap response

    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

    [MSFT] Guest

Similar Threads

  1. How to log raw SOAP response msg?
    By Bob in forum ASP.NET Web Services
    Replies: 3
    Last Post: May 5th, 03:37 AM
  2. Customizing the SOAP response
    By Paul K in forum ASP.NET Web Services
    Replies: 1
    Last Post: March 25th, 04:07 PM
  3. SOAP Response
    By Random in forum ASP.NET Web Services
    Replies: 1
    Last Post: September 9th, 01:57 AM
  4. Html encoding SOAP response
    By Casper Hornstrup in forum ASP.NET Web Services
    Replies: 1
    Last Post: December 15th, 08:29 PM
  5. Response.Redirect in Soap Extension
    By Kevin Cunningham in forum ASP.NET Web Services
    Replies: 1
    Last Post: August 1st, 02:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139