Hi,

I have a document-oriented SOAP request that returns a response which contains mixed content. Now it seems that this is not really well supported by Axis at the moment, can anybody please confirm/deny this?

I'm using this SOAP server with a client generated with WSDL2Java.
When I have only text content I get a method String getValue() generated in the corresponding Stub class.
If I have a tag inside e.g. <seq> I get correct methods to get objects Seq.
But I could not make it that WSDL2Java would generate me a String
getValue() and the getSeq() methods when I have mixed content with <seq>-Tags declared in the WSDL. This is how I tried to declere it in the WSDL XML-Schema part:


<xsd:complexType name="attributeValue" mixed="true">
  [<xsd:complexContent>]
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="lang" type="xsd:string" use="optional"/>
    <xsd:attribute name="errorNumber" type="xsd:string" use="optional"/>
    <xsd:choice>
      <xsd:sequence>
        <xsd:element name="seq" type="omi:seq" maxOccurs="unbound"/>
      </xsd:sequence>
    </xsd:choice>
  [</xsd:complexContent>]
</xsd:complexType>

Either I'm doing something wrong in declaring the mixed content XSD or
WSDL2Java has a problem with this.
When I have the <xsd:complextContent> nothing is generated, without all
is generated but not getValue(). With simpleContent nothing is generated
again, but would also be wrong IMHO.

The XML to be described is

<attributeValue>somet txt</attributeValue>

or

<attributeValue><seq>sometext</seq><seq>more text</seq></attributeValue>

I definitely need a function getValue() to get the normal CDATA text in
case it has no sub-tags but this is just not generated by WSDL2Java.

The problem seems to be that when one has CDATA element a SimpleSerializer/SimpleDeserializer is used and with elements which include tags a BeanSerializer/Deserializer is used. But mixed content needs both and there does not exist a serializer/deserializer that can handle mixed content.

So please there must be somebody that had mixed content in SOAP and has used Axis and can tell me whether it can work or what to do about it?


Thanks, Peter




Reply via email to