I'm sucessfully exposing a contract-first JAX-WS web service on a Tomcat servlet container with Jax-WS Spring support. I'm having troulbes with xs:idref
types though. The original XSD file contains a complex type
<xs:complexType name="DocumentScopeOptionalTypeReferenceIdentifier">
<xs:simpleContent>
<xs:extension base="DocumentScopeReferenceIdentifierContent">
...
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="DocumentScopeReferenceIdentifierContent">
<xs:restriction base="xs:IDREF">
<xs:minLength value="1"/>
<xs:maxLength value="64"/>
</xs:restriction>
</xs:simpleType>
which xjc correctly compiles to
public class DocumentScopeOptionalTypeReferenceIdentifier {
@XmlValue
@XmlIDREF
protected Object value;
...
}
When I deploy the webservice, however, the @XmlIDREF
annotation gets ignored and I end up with an xs:anyType
in the namespace declaration of the resulting WSDL
<xs:complexType name="DocumentScopeOptionalRoleReferenceIdentifier">
<xs:simpleContent>
<xs:extension base="xs:anyType">
...
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Clients of the webservice in question report, that they cannot generate Client stubs (using C#) with this anyType
present. How would I change that back to xs:idref
? Thanks.