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.
John Saunders - 28 Oct 2006 21:31 GMT
>I have a web service with four operations in it -
>add/amend/delete/retrieve. Not surprisingly, add and amend require the same
[quoted text clipped - 9 lines]
>
> 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
Nick Locke - 29 Oct 2006 01:01 GMT
Thanks John.
Naming the elements differently does not work, I have already tried that.
Wrapping the types was the pointer I needed.
Cheers
>>I have a web service with four operations in it -
>>add/amend/delete/retrieve. Not surprisingly, add and amend require the
[quoted text clipped - 28 lines]
>
> John