Failed to contol SOAP encoding

O

Omri

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>
 
O

Omri

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top