I have an XFire service being consumed by a .net application which is
giving me grief. It seems to boil down to the minOccurs="0" attribute
being added to required elements of objects passed as parameters to my
service methods.
Here's a relevant section of the WSDL which shows the undesired
minOccurs="0" attribute (type names have changed for IP reasons)..
--BEGIN WSDL SNIPPET--
<xsd:complexType name="DataDto">
<xsd:sequence>
<xsd:element minOccurs="0" name="id" type="xsd:long" />
<xsd:element minOccurs="0" name="date" type="xsd:dateTime" />
<xsd:element minOccurs="0" name="someString" nillable="true"
type="xsd:string" />
<xsd:element minOccurs="0" name="anotherString" nillable="true"
type="ns1:AnotherType" />
</xsd:sequence>
</xsd:complexType>
--END--
The non-trivial model objects being accepted by the service, as well as
all fields of those objects, need to be set, so I'm pretty sure I don't
want 'minOccurs="0"' to be valid. When the .net guy generates his
classes, he ends up with "setIdSpecified" as well as "setId", for
example, since id is a primitive type and there isn't another way to
differentiate between 0 and null. (I don't think the .net generator
would do this if minOccurs was gone.) Is there an annotation I need to
add to fields of my DTOs which marks them as "required"? Help greatly
appreciated! Thanks,
Preston
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email