Basic Profile 1.1

N

Nick Locke

I have a web service with four operations in it - add/amend/delete/retrieve.
Not surprisingly, add and amend require the same data; with delete and
retrieve each requiring just a key field. Concepts of re-use tell me that
my XSD should define the data once and the key field once, then in my WSDL I
should use each definition twice. In other words, my types should get
re-used in different WSDL messages.

However, wsdl.exe complains, citing "R2710 - ....must result in wire
signatures that are different.....". It's only a warning, but I am trying
to get this right (not almost right). I have read up on why this happens
and why it is in the standard.

BUT is there a way out that does not mean defining identical types twice?

Thanks, Nick.
 
J

John Saunders

Nick Locke said:
I have a web service with four operations in it -
add/amend/delete/retrieve. Not surprisingly, add and amend require the same
data; with delete and retrieve each requiring just a key field. Concepts
of re-use tell me that my XSD should define the data once and the key field
once, then in my WSDL I should use each definition twice. In other words,
my types should get re-used in different WSDL messages.

However, wsdl.exe complains, citing "R2710 - ....must result in wire
signatures that are different.....". It's only a warning, but I am trying
to get this right (not almost right). I have read up on why this happens
and why it is in the standard.

BUT is there a way out that does not mean defining identical types twice?

Are you wrapping the common type in a "message" type?

<xsd:complexType name="Shared"> ... </xsd:complexType>
<xsd:complexType name="AddMessage">
<xsd:sequence>
<xsd:element name="shared1" type="tns:Shared"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="AmendMessage">
<xsd:sequence>
<xsd:element name="shared2" type="tns:Shared"/>
</xsd:sequence>
</xsd:complexType>

I believe you might get away without the wrappers if you simply named your
elements differently, but I'm not sure. I'd have to see your schema.

John
 
N

Nick Locke

Thanks John.

Naming the elements differently does not work, I have already tried that.
Wrapping the types was the pointer I needed.

Cheers
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top