473,394 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

question: Soap encoding without "multi-reference" values?

Hi,

I have to create a web service client which uses SOAP encoding but does not use
"multi-reference" values (see
http://www.w3.org/TR/2000/NOTE-SOAP-...#_Toc478383513 item 10).

If I create SOAP client like this:

public class StockService : SoapHttpClientProtocol {
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute(Use=System.Web.Services.Description.SoapBi ndingUse.Encoded)]
public void MyMethod(MyClass[] myClasses) {
this.Invoke("MyMethod", new object[] {
myClasses});
}

I get SOAP request like that:

(envelope skipped)
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<types:MyMethod>
<myClasses href="#id1" /> <--------------- MULTI-REFERENCE VALUE :-(
</types:MyMethod>
<soapenc:Array id="id1" soapenc:arrayType="types:MyClass[2]">
<Item href="#id2" /> <--------------- MULTI-REFERENCE VALUE :-(
(other items skipped)
</soapenc:Array>
<types:MyClass id="id2" xsi:type="types:MyClass">
<SomeString xsi:type="xsd:string">First</SomeString>
<SomeInt xsi:type="xsd:int">1</SomeInt>
</types:MyClass>
(other items skipped)
</soap:Body>
If I use Literal encoding, I get nice "single-reference" values like that:

(envelope skipped)
<soap:Body>
<MyMethod xmlns="http://stockservice.contoso.com/wse/samples/2003/06">
<myClasses>
<MyClass>
<SomeString>First</SomeString>
<SomeInt>1</SomeInt>
</MyClass>
(other items skipped)
</myClasses>
</MyMethod>
</soap:Body>

Unfortunately this does not include the data type attributes.
My goal is to get following SOAP request:

(envelope skipped)
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<types:MyMethod>
<myClasses xsi:type="soapenc:Array" soapenc:arrayType="types:MyClass[2]">
<Item xsi:type="types:MyClass">
<SomeString xsi:type="xsd:string">First</SomeString>
<SomeInt xsi:type="xsd:int">1</SomeInt>
</Item>
(other items skipped)
</myClasses>
</types:MyMethod>
</soap:Body>
Is there any way to force the use of single-reference values? Otherwise it seems
I have to use the generic XML or XSL transformation to create required SOAP
request :(
All I have found is SoapFormatter class + attribute [SoapField(Embedded=true)].
That works great except for array types (MyClass[]).
Maybe somebody can suggest a suitable .NET library? Can WSE 2 solve these problems?

Thank you in advance

Kaimar
lo*******@hot.ee

Nov 23 '05 #1
0 1912

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: google | last post by:
Hello everyone, I am having an issue using the "Multi Select" option in a list box in MS Access 2003. I am making a form that users can fill out to add an issue to the database. Each issue can...
1
by: jj | last post by:
How do I programatically default the encoding of my "Notepad" into ANSI. My application uses notepad to save some text. Some of the client computers have UTF as the default encoding in their...
11
by: pmarisole | last post by:
I am using the following code to split/join values in a multi-select field. It is combining all the values in All the records into one long string in each record in recordset. Example: I have a...
30
by: josh | last post by:
Hi all, what does it meaning that strange sintax (look at the object :) ? if I have i.e. array.length I can use array. and is it IE/Firefox compatible??
1
by: Paul | last post by:
Below is the html and css. It works in Firefox but not IE. When you click on "Your Links", it should cause a new menu "system" to open up to the right of the "Your Links" with two menu options. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.