Here's a question for the schema design gurus.
I have a document/literal wrapped WSDL which defines an operation
called SubmitBLAST. The corresponding element for the input message
looks like this:
<xsd:element name="SubmitBlast">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="query_data"
type="AminoAcidSeqData" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
AminoAcidSeqData is, in turn, an abstract type:
<xsd:complexType abstract="true" name="AminoAcidSeqData" />
which various concrete types extend, e.g.:
<xsd:complexType name="FastaRecord">
<xsd:complexContent>
<xsd:extension base="AminoAcidSeqData">
<xsd:sequence>
<xsd:element name="header"
type="xsd:string" />
<xsd:element name="sequence"
type="AminoAcidSeq" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
This passes WS-I compliance, and I've generated my service with
wsdl2java (using XMLBeans) with no problems. However, I've hit upon a
snag in testing the WSDL with SoapUI. It autogenerates messages from
the WSDL that look like this:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://ws.cathdb.info/Types">
<soapenv:Header/>
<soapenv:Body>
<typ:SubmitBlast>
<typ:query_data/>
</typ:SubmitBlast>
</soapenv:Body>
</soapenv:Envelope>
So there's no skeleton generated for any of the possible
instantiations of the abstractly-typed element query_data. And
anything I put in there fails XML Beans validation on the server side,
even if I know it matches the structure, with this error:
Document invalid: [error: cvc-elt.2: Element
'[EMAIL PROTECTED]://grid.cathdb.info/Types' is abstract and
cannot be used in an instance]
Am I barking up the wrong tree here, and expecting too much
'cleverness' from the code generators (in Axis2 or SoapUI)?
Ideally I'd like to be able to send different messages for each of the
concrete implementations of AminoAcidSeqData that are reconstructed on
the server side into the appropriate objects. Is there a better way to
do this?
Many thanks,
Andrew.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]