Soap Formatting

C

Caesar

Hello,
I have to build a webservice on .Net that answers to a java client, the java
client has already the specs and the xml specs, so my webservice have to
follow the java client.
I am facing the following problem:

The .net understand the following xml formatting
<q1:mymethod xmlns:q1="http://tempuri.org/">
<id xsi:type="xsd:int">int</id>
<originator xsi:type="xsd:string">string</originator>
</q1:mymethod>

But the java client is as follows :
<q2:mymethod xmlns:q1="http://tempuri.org/">
<soapenv:id xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
1070997772468</soapenv:id>
<soapenv:eek:riginator
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> 5213449
</soapenv:eek:riginator>
</q2:mymethod>

i already know that there is no problem in the namespace naming, "q1" and
"q2" ,
but i need to a way to let my webservice (.net ) understand the attribute
tags

Does anyone have a clue??
 
D

Dino Chiesa [Microsoft]

yes,

your Java client seems wrong, or at least wrongheaded. The
http://schemas.xmlsoap.org/soap/envelope/ namespace should probably NOT be
used by mymethod or any application-specific datatypes.

Can we see the WSDL?

What webservices stack are you using on the Java side?

When you say that the Java client is already generating a request, how did
you build that client? Is there already a service in place (possibly
implemented in Java) ?

-------

If you don't care to do the right thing, you could add an attribute to the
request in the .NET ASMX , and specify the namespace
http://schemas.xmlsoap.org/soap/envelope/ . You would do this with :
[ System.Xml.Serialization.XmlElementAttribute (ElementName="id",
Namespace=http://schemas.xmlsoap.org/soap/envelope/) ]

But as I said, this is wrong. You don't own the namespace
http://schemas.xmlsoap.org/soap/envelope/ and you should not be inserting
elements into that namespace. Apps should define their own namespaces.
like http://netiks.com/mytypes or something.


-Dino
 

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

Forum statistics

Threads
473,995
Messages
2,570,235
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top