Failed to contol SOAP encoding

Discussion in 'ASP .Net Web Services' started by Omri, Jul 24, 2003.

  1. Omri

    Omri Guest

    Hi All,
    I have a webservice which I want to return messages in the encoded
    style.
    I used both
    SoapDocumentService(Use:=SoapBindingUse.Encoded)
    and
    SoapDocumentMethod(use:=SoapBindingUse.Encoded)
    but still it won't. What can I be missing?

    Here is my function signature:
    [WebMethod()]
    [SoapDocumentMethod(use:=SoapBindingUse.Encoded,
    ParameterStyle:=SoapParameterStyle.Default)]
    Public Node getLine()

    (Node is a simple linked list node)

    Here is the output XML (which is evidently not encoded)
    <?xml version="1.0" encoding="utf-8"?>
    <Node xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://tempuri.org/literalTypes">
    <nxt>
    <nxt>
    <name>C</name>
    </nxt>
    <name>B</name>
    </nxt>
    <name>A</name>
    </Node>
    Omri, Jul 24, 2003
    #1
    1. Advertising

  2. Omri

    Omri Guest

    For the benefit of others who encoutner this behaviour:
    It seems that when accessing the service using "GET" the XML returned
    is LITERAL, regardless of the attributes.
    This means that the default web pages that allow testing simple web
    services will not suffice - they use GET and will fail on circular
    references and such.
    Don't fret - accessing the service in SOAP _does_ return ENCODED
    format.

    > Hi All,
    > I have a webservice which I want to return messages in the encoded
    > style.
    > I used both
    > SoapDocumentService(Use:=SoapBindingUse.Encoded)
    > and
    > SoapDocumentMethod(use:=SoapBindingUse.Encoded)
    > but still it won't. What can I be missing?
    >
    > Here is my function signature:
    > [WebMethod()]
    > [SoapDocumentMethod(use:=SoapBindingUse.Encoded,
    > ParameterStyle:=SoapParameterStyle.Default)]
    > Public Node getLine()
    >
    > (Node is a simple linked list node)
    >
    > Here is the output XML (which is evidently not encoded)
    > <?xml version="1.0" encoding="utf-8"?>
    > <Node xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xmlns="http://tempuri.org/literalTypes">
    > <nxt>
    > <nxt>
    > <name>C</name>
    > </nxt>
    > <name>B</name>
    > </nxt>
    > <name>A</name>
    > </Node>
    Omri, Aug 3, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TW9lSm9l?=

    Button Contol

    =?Utf-8?B?TW9lSm9l?=, May 30, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    444
    Shaul Feldman
    May 30, 2004
  2. Jeff Gaines

    Contol Location on Webform

    Jeff Gaines, Nov 27, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    426
    Jeff Gaines
    Nov 27, 2004
  3. Dee
    Replies:
    2
    Views:
    295
  4. ad
    Replies:
    3
    Views:
    2,963
  5. Sosh123
    Replies:
    1
    Views:
    388
    Matt Dockerty
    May 20, 2005
Loading...

Share This Page