Title: RE: next issue: mixed content type (was: Re: wsdl2java returns invalid characters in

Here is a simple WSDL and XSD that produces the wsdl2java invalid character.

WSDL is as follows

<definitions targetNamespace="http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl"
        xmlns="http://schemas.xmlsoap.org/wsdl/"
        xmlns:tns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:types="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"
        >

        <import namespace="http://w3.ibm.com/schemas/services/2002/11/15/stockquote" location="StockQuote.xsd" />

        <message name="getStockQuoteReq">
                <part name="parameters" element="types:getStockQuote" />
        </message>

        <message name="getStockQuoteResp">
                <part name="parameters" element="types:getStockQuoteResponse" />
        </message>

        <portType name="StockQuotePortType">
                <operation name="getStockQuote">
                        <input message="tns:getStockQuoteReq" />
                        <output message="tns:getStockQuoteResp" />
                </operation>
        </portType>

        <binding name="StockQuoteSOAPBinding" type="tns:StockQuotePortType">
                <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
                <operation name="getStockQuote">
                        <soap:operation style="document" soapAction="getStockQuote" />
                        <input>
                                <soap:body use="literal" />
                        </input>
                        <output>
                                <soap:body use="literal" />
                        </output>
                </operation>
        </binding>

        <service name="StockQuoteService">
                <port name="StockQuoteSOAPPort" binding="tns:StockQuoteSOAPBinding">
                        <soap:address location="http://localhost:9081/AxisWeb/services/StockQuoteSOAPPort" />
                </port>
        </service>

</definitions>


Corresponding XSD is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        targetNamespace="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"
        xmlns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"
>
       
        <xsd:element name="quote">
                <xsd:complexType>
                        <xsd:sequence>
                                <xsd:element name="symbol" type="xsd:string"/>
                                <xsd:element name="volume" type="xsd:integer"/>
                                <xsd:element name="lastTrade" type="lastTradeType"/>
                                <xsd:element name="change" type="changeType"/>
                        </xsd:sequence>
                </xsd:complexType>
        </xsd:element>

        <xsd:complexType name="changeType">
                <xsd:sequence>
                        <xsd:element name="dollar" type="xsd:float"/>  
                        <xsd:element name="percent" type="xsd:float"/>
                        <xsd:element name="positive" type="xsd:boolean"/>      
                </xsd:sequence>
        </xsd:complexType>

        <xsd:complexType name="lastTradeType">
                <xsd:sequence>
                        <xsd:element name="price" type="xsd:float"/>
                        <xsd:element name="date" type="xsd:long"/>
                </xsd:sequence>
        </xsd:complexType>

        <!-- Methods signatures -->
        <xsd:element name="getStockQuote">
                <xsd:complexType>
                        <xsd:sequence>
                                <xsd:element name="symbol" type="xsd:string"/>
                        </xsd:sequence>
                </xsd:complexType>
        </xsd:element>
        <xsd:element name="getStockQuoteResponse">
                <xsd:complexType>
                        <xsd:sequence>
                                <xsd:element ref="quote" />
                        </xsd:sequence>
                </xsd:complexType>
        </xsd:element>

</xsd:schema>

Hope this helps.

AJ

-----Original Message-----
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 17, 2003 9:33 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: next issue: mixed content type (was: Re: wsdl2java returns
invalid characters in


Dan,

The patch is now in latest CVS as well. So yes, please try latest CVS, reproduce the problem in a
small wsdl/xsd and submit it as a bug report [http://ws.apache.org/axis/bugs.html]. If you can
work up a patch, that would be even better :)
[http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages/SubmitPatches]

Thanks,
dims

> Date: Sun, 16 Nov 2003 12:27:08 -0600
> From: Dan Christopherson <[EMAIL PROTECTED]>
> Subject: next issue: mixed content type (was: Re: wsdl2java returns invalid characters in
> Content-Type: text/plain; charset=us-ascii; format=flowed
>
>
> OK, getting a little further, it looks like when mixed content type is
> specified in an xsd (via 'mixed="true"' in complexType), the code
> wsdl2java generates provides no way of getting or setting the text
> content. I didn't find a bug out there on this, but I have to confess
> that I think the Bugzilla search is about the worst UI i've ever seen.
>
> Should I work up a simple reproduction and submit this as a bug?
>
> thanks again,
> danch
>
> Dan Christopherson wrote:
>
> > That generates code that compiles at least - right now I'm building some
> > tests to see if it also works, but this is better.
> >
> > The leading underscores are aesthetically ugly, though. Is there any
> > thought of introducing a binding override file to allow declarative
> > resolution of such name collisions, ala JAXB or Castor? Possibly
> > introducing a feature so that JAXB or Castor source generators could be
> > delegated to? There is already the capability of using Castor as a
> > binding framework, isn't there?
> >
> > thanks for all your work,
> > danch

=====
Davanum Srinivas - http://webservices.apache.org/~dims/

Reply via email to