Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.aspnet.webservices
Failed to contol SOAP encoding
omri.spector
7/24/2003 8:15:00 PM
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/XMLSc...
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-inst...
xmlns="
http://tempuri.org/literalTypes...
<nxt>
<nxt>
<name>C</name>
</nxt>
<name>B</name>
</nxt>
<name>A</name>
</Node>
1 Answer
omri.spector
8/3/2003 4:22:00 AM
0
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/XMLSc...
> xmlns:xsi="
http://www.w3.org/2001/XMLSchema-inst...
> xmlns="
http://tempuri.org/literalTypes...
> <nxt>
> <nxt>
> <name>C</name>
> </nxt>
> <name>B</name>
> </nxt>
> <name>A</name>
> </Node>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Failed to contol SOAP encoding
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password