You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Kevin TierOne <ke...@gmail.com> on 2007/08/09 20:15:14 UTC

Bug? SimpleType enumeration output is incorrect.

The XML tags in the response messsage of an enumerated element uses
the simpleType name.  It should use the element name.  For example,
using the wsdl below I get the following request and response.

Look at the output "<ns4:Type_T>c</ns4:Type_T>", this element should
be <ns4:type>c</ns4:type>

REQUEST:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:q0="http://localhost:8080/wsdlfile/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<q0:Get>
<q0:in>www</q0:in>
<q0:type>c</q0:type>
</q0:Get>
</soapenv:Body>
</soapenv:Envelope>

RESPONSE:
<?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns4:GetResponse xmlns:ns4="http://localhost:8080/wsdlfile/">
<out xmlns="http://localhost:8080/wsdlfile/">www</out>
<ns4:Type_T>c</ns4:Type_T>
</ns4:GetResponse>
</soapenv:Body>
</soapenv:Envelope>




<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://localhost:8080/wsdlfile/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl" name="wsdlfile"
    targetNamespace="http://localhost:8080/wsdlfile/">
    <wsdl:types>
        <xsd:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://localhost:8080/wsdlfile/">
            <xsd:element name="Get">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="in" type="xsd:string" />
                        <xsd:element name="type"
type="tns:Type_T"></xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="GetResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="out" type="xsd:string" />
                        <xsd:element name="type"
                            type="tns:Type_T">
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:simpleType name="Type_T">
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="a"></xsd:enumeration>
                    <xsd:enumeration value="b"></xsd:enumeration>
                    <xsd:enumeration value="c"></xsd:enumeration>
                    <xsd:enumeration value="d"></xsd:enumeration>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="GetRequest">
        <wsdl:part element="tns:Get" name="parameters" />
    </wsdl:message>
    <wsdl:message name="GetResponse">
        <wsdl:part element="tns:GetResponse" name="parameters" />
    </wsdl:message>
    <wsdl:portType name="wsdlfile">
        <wsdl:operation name="Get" wsaw:Action="tns:GetLink">
            <wsdl:input message="tns:GetRequest" />
            <wsdl:output message="tns:GetResponse" />
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="wsdlfileSOAP" type="tns:wsdlfile">
        <soap:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="Get">
            <soap:operation
                soapAction="http://localhost:8080/wsdlfile/GetLink" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="wsdlfile">
        <wsdl:port binding="tns:wsdlfileSOAP" name="wsdlfileSOAP">
            <soap:address location="http://localhost:8080/wsdlfile" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Bug? SimpleType enumeration output is incorrect.

Posted by dd du <da...@gmail.com>.
test

On 8/9/07, Kevin TierOne <ke...@gmail.com> wrote:
>
> The XML tags in the response messsage of an enumerated element uses
> the simpleType name.  It should use the element name.  For example,
> using the wsdl below I get the following request and response.
>
> Look at the output "<ns4:Type_T>c</ns4:Type_T>", this element should
> be <ns4:type>c</ns4:type>
>
> REQUEST:
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:q0="http://localhost:8080/wsdlfile/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <q0:Get>
> <q0:in>www</q0:in>
> <q0:type>c</q0:type>
> </q0:Get>
> </soapenv:Body>
> </soapenv:Envelope>
>
> RESPONSE:
> <?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
> <soapenv:Body>
> <ns4:GetResponse xmlns:ns4="http://localhost:8080/wsdlfile/">
> <out xmlns="http://localhost:8080/wsdlfile/">www</out>
> <ns4:Type_T>c</ns4:Type_T>
> </ns4:GetResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>    xmlns:tns="http://localhost:8080/wsdlfile/"
>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>    xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl" name="wsdlfile"
>    targetNamespace="http://localhost:8080/wsdlfile/">
>    <wsdl:types>
>        <xsd:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://localhost:8080/wsdlfile/">
>            <xsd:element name="Get">
>                <xsd:complexType>
>                    <xsd:sequence>
>                        <xsd:element name="in" type="xsd:string" />
>                        <xsd:element name="type"
> type="tns:Type_T"></xsd:element>
>                    </xsd:sequence>
>                </xsd:complexType>
>            </xsd:element>
>            <xsd:element name="GetResponse">
>                <xsd:complexType>
>                    <xsd:sequence>
>                        <xsd:element name="out" type="xsd:string" />
>                        <xsd:element name="type"
>                            type="tns:Type_T">
>                        </xsd:element>
>                    </xsd:sequence>
>                </xsd:complexType>
>            </xsd:element>
>
>            <xsd:simpleType name="Type_T">
>                <xsd:restriction base="xsd:string">
>                    <xsd:enumeration value="a"></xsd:enumeration>
>                    <xsd:enumeration value="b"></xsd:enumeration>
>                    <xsd:enumeration value="c"></xsd:enumeration>
>                    <xsd:enumeration value="d"></xsd:enumeration>
>                </xsd:restriction>
>            </xsd:simpleType>
>        </xsd:schema>
>    </wsdl:types>
>    <wsdl:message name="GetRequest">
>        <wsdl:part element="tns:Get" name="parameters" />
>    </wsdl:message>
>    <wsdl:message name="GetResponse">
>        <wsdl:part element="tns:GetResponse" name="parameters" />
>    </wsdl:message>
>    <wsdl:portType name="wsdlfile">
>        <wsdl:operation name="Get" wsaw:Action="tns:GetLink">
>            <wsdl:input message="tns:GetRequest" />
>            <wsdl:output message="tns:GetResponse" />
>        </wsdl:operation>
>    </wsdl:portType>
>    <wsdl:binding name="wsdlfileSOAP" type="tns:wsdlfile">
>        <soap:binding style="document"
>            transport="http://schemas.xmlsoap.org/soap/http" />
>        <wsdl:operation name="Get">
>            <soap:operation
>                soapAction="http://localhost:8080/wsdlfile/GetLink" />
>            <wsdl:input>
>                <soap:body use="literal" />
>            </wsdl:input>
>            <wsdl:output>
>                <soap:body use="literal" />
>            </wsdl:output>
>        </wsdl:operation>
>    </wsdl:binding>
>    <wsdl:service name="wsdlfile">
>        <wsdl:port binding="tns:wsdlfileSOAP" name="wsdlfileSOAP">
>            <soap:address location="http://localhost:8080/wsdlfile" />
>        </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: Bug? SimpleType enumeration output is incorrect.

Posted by WJ Krpelan <kr...@yahoo.com>.
Right. I'd never bet on living in a perfect world,
however :-)
Wolfgang

--- Anne Thomas Manes <at...@gmail.com> wrote:

> That's an inappropriate restriction. XML has no such
> "reserved words"
> constraints. If Axis2 has a problem dealing with a
> valid local name,
> it's a bug.
> 
> Anne
> 
> On 8/16/07, WJ Krpelan <kr...@yahoo.com> wrote:
> > Hi
> > Methinks you shouldn't use "type" as element name,
> and
> > neither "element" nor "attribute" etc. as these
> are
> > kind of "reserved words". Use "type1" or something
> and
> > it should work imho.
> > Cheers
> > Wolfgang Krpelan
> >
> >
> > --- Amila Suriarachchi
> <am...@gmail.com>
> > wrote:
> >
> > > Can you please test this for Axis2 1.3 release.
> > >
> > > And run this sample code which gives me the
> correct
> > > out put
> > >
> > > public class TestClass extends TestCase {
> > >
> > >     public void testGetResponse(){
> > >         GetResponse getResponse = new
> GetResponse();
> > >         getResponse.setOut("Test out");
> > >         getResponse.setType(Type_T.a);
> > >
> > >         try {
> > >             OMElement omElement =
> > > getResponse.getOMElement(
> > > GetResponse.MY_QNAME,
> > > OMAbstractFactory.getOMFactory());
> > >             System.out.println("OM Element ==> "
> +
> > > omElement.toStringWithConsume());
> > >         } catch (ADBException e) {
> > >             e.printStackTrace();  //To change
> body
> > > of catch statement use
> > > File | Settings | File Templates.
> > >         } catch (XMLStreamException e) {
> > >             e.printStackTrace();  //To change
> body
> > > of catch statement use
> > > File | Settings | File Templates.
> > >         }
> > >     }
> > > }
> > >
> > > <ns1:GetResponse
> > > xmlns:ns1="http://localhost:8080/wsdlfile/">
> > >     <ns1:out>Test out</ns1:out>
> > >     <ns1:type>a</ns1:type>
> > > </ns1:GetResponse>
> > >
> > > Amila.
> > >
> > >
> > > On 8/10/07, Kevin TierOne
> <ke...@gmail.com>
> > > wrote:
> > > >
> > > > 1 - If I run the wsdl through the code
> generator,
> > > I get the file
> > > > WsdlfileSkeleton.java.
> > > >
> > > > 2 - I implement this method:
> > > >   public localhost.wsdlfile.GetResponse
> > > Get(localhost.wsdlfile.Get get0)
> > > >   {
> > > >     localhost.wsdlfile.GetResponse resp=new
> > > localhost.wsdlfile.GetResponse
> > > > ();
> > > >     resp.setOut(get0.getIn());
> > > >     resp.setType(get0.getType());
> > > >     return resp;
> > > >   }
> > > >
> > > > 3 - After deploying the webservice, I send the
> > > request as shown in the
> > > > original post.
> > > >
> > > > 4 - In the TCP monitor, I see the response
> shown
> > > the original post.  I
> > > > expect that the response should echo the same
> > > values and structure as
> > > > in the request.  However, in the response, the
> > > Element <ns4:Type_T> is
> > > > incorrect.  The name of the element should be
> > > <type>.
> > > >
> > > > Let me know if you need any other info.
> > > >
> > > > Kevin
> > > >
> > > > On 8/10/07, Amila Suriarachchi
> > > <am...@gmail.com> wrote:
> > > > > Can you please describe your qestion bit?
> > > > >
> > > > > in other words How can I regenerate your
> issue?
> > > > >
> > > > > Amila.
> > > > >
> > > > >
> > > > > On 8/9/07, Kevin TierOne <
> > > kevin.tierone@gmail.com> wrote:
> > > > > >
> > > > > > Sorry, I forgot to mention that I'm using
> > > Axis2 1.2.
> > > > > >
> > > > > > Kevin
> > > > > >
> > > > > > On 8/9/07, Kevin TierOne
> > > <ke...@gmail.com> wrote:
> > > > > > > The XML tags in the response messsage of
> an
> > > enumerated element uses
> > > > > > > the simpleType name.  It should use the
> > > element name.  For example,
> > > > > > > using the wsdl below I get the following
> > > request and response.
> > > > > > >
> > > > > > > Look at the output
> > > "<ns4:Type_T>c</ns4:Type_T>", this element
> should
> > > > > > > be <ns4:type>c</ns4:type>
> > > > > > >
> > > > > > > REQUEST:
> > > > > > > <soapenv:Envelope
> > > > > > >
> > > > >
> > >
> >
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > > > > > > xmlns:q0="
> http://localhost:8080/wsdlfile/"
> > > > > > >
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > > > > > xmlns:xsi="
> > > http://www.w3.org/2001/XMLSchema-instance">
> > > > > > > <soapenv:Body>
> > > > > > > <q0:Get>
> > > > > > > <q0:in>www</q0:in>
> > > > > > > <q0:type>c</q0:type>
> > > > > > > </q0:Get>
> > > > > > > </soapenv:Body>
> > > > > > > </soapenv:Envelope>
> > > > > > >
> > > > > > > RESPONSE:
> > > > > > > <?xml version="1.0"
> > > > >
> > >
> >
>
encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
> > > > > > > <soapenv:Envelope
> > > > >
> > >
> >
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> > > > > > > <soapenv:Body>
> > > > > > > <ns4:GetResponse xmlns:ns4="
> > > http://localhost:8080/wsdlfile/">
> > > > > > > <out
> > >
> xmlns="http://localhost:8080/wsdlfile/">www</out>
> > > > > > > <ns4:Type_T>c</ns4:Type_T>
> > > > > > > </ns4:GetResponse>
> > > > > > > </soapenv:Body>
> > > > > > > </soapenv:Envelope>
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > > <wsdl:definitions
> > > > >
> > >
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > > > > >
> > > xmlns:tns="http://localhost:8080/wsdlfile/ "
> > > > > > >
> > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > > > >
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > > > > > >
> > > > >
> 
=== message truncated ===



      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Bug? SimpleType enumeration output is incorrect.

Posted by Anne Thomas Manes <at...@gmail.com>.
That's an inappropriate restriction. XML has no such "reserved words"
constraints. If Axis2 has a problem dealing with a valid local name,
it's a bug.

Anne

On 8/16/07, WJ Krpelan <kr...@yahoo.com> wrote:
> Hi
> Methinks you shouldn't use "type" as element name, and
> neither "element" nor "attribute" etc. as these are
> kind of "reserved words". Use "type1" or something and
> it should work imho.
> Cheers
> Wolfgang Krpelan
>
>
> --- Amila Suriarachchi <am...@gmail.com>
> wrote:
>
> > Can you please test this for Axis2 1.3 release.
> >
> > And run this sample code which gives me the correct
> > out put
> >
> > public class TestClass extends TestCase {
> >
> >     public void testGetResponse(){
> >         GetResponse getResponse = new GetResponse();
> >         getResponse.setOut("Test out");
> >         getResponse.setType(Type_T.a);
> >
> >         try {
> >             OMElement omElement =
> > getResponse.getOMElement(
> > GetResponse.MY_QNAME,
> > OMAbstractFactory.getOMFactory());
> >             System.out.println("OM Element ==> " +
> > omElement.toStringWithConsume());
> >         } catch (ADBException e) {
> >             e.printStackTrace();  //To change body
> > of catch statement use
> > File | Settings | File Templates.
> >         } catch (XMLStreamException e) {
> >             e.printStackTrace();  //To change body
> > of catch statement use
> > File | Settings | File Templates.
> >         }
> >     }
> > }
> >
> > <ns1:GetResponse
> > xmlns:ns1="http://localhost:8080/wsdlfile/">
> >     <ns1:out>Test out</ns1:out>
> >     <ns1:type>a</ns1:type>
> > </ns1:GetResponse>
> >
> > Amila.
> >
> >
> > On 8/10/07, Kevin TierOne <ke...@gmail.com>
> > wrote:
> > >
> > > 1 - If I run the wsdl through the code generator,
> > I get the file
> > > WsdlfileSkeleton.java.
> > >
> > > 2 - I implement this method:
> > >   public localhost.wsdlfile.GetResponse
> > Get(localhost.wsdlfile.Get get0)
> > >   {
> > >     localhost.wsdlfile.GetResponse resp=new
> > localhost.wsdlfile.GetResponse
> > > ();
> > >     resp.setOut(get0.getIn());
> > >     resp.setType(get0.getType());
> > >     return resp;
> > >   }
> > >
> > > 3 - After deploying the webservice, I send the
> > request as shown in the
> > > original post.
> > >
> > > 4 - In the TCP monitor, I see the response shown
> > the original post.  I
> > > expect that the response should echo the same
> > values and structure as
> > > in the request.  However, in the response, the
> > Element <ns4:Type_T> is
> > > incorrect.  The name of the element should be
> > <type>.
> > >
> > > Let me know if you need any other info.
> > >
> > > Kevin
> > >
> > > On 8/10/07, Amila Suriarachchi
> > <am...@gmail.com> wrote:
> > > > Can you please describe your qestion bit?
> > > >
> > > > in other words How can I regenerate your issue?
> > > >
> > > > Amila.
> > > >
> > > >
> > > > On 8/9/07, Kevin TierOne <
> > kevin.tierone@gmail.com> wrote:
> > > > >
> > > > > Sorry, I forgot to mention that I'm using
> > Axis2 1.2.
> > > > >
> > > > > Kevin
> > > > >
> > > > > On 8/9/07, Kevin TierOne
> > <ke...@gmail.com> wrote:
> > > > > > The XML tags in the response messsage of an
> > enumerated element uses
> > > > > > the simpleType name.  It should use the
> > element name.  For example,
> > > > > > using the wsdl below I get the following
> > request and response.
> > > > > >
> > > > > > Look at the output
> > "<ns4:Type_T>c</ns4:Type_T>", this element should
> > > > > > be <ns4:type>c</ns4:type>
> > > > > >
> > > > > > REQUEST:
> > > > > > <soapenv:Envelope
> > > > > >
> > > >
> >
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > > > > > xmlns:q0=" http://localhost:8080/wsdlfile/"
> > > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > > > > xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance">
> > > > > > <soapenv:Body>
> > > > > > <q0:Get>
> > > > > > <q0:in>www</q0:in>
> > > > > > <q0:type>c</q0:type>
> > > > > > </q0:Get>
> > > > > > </soapenv:Body>
> > > > > > </soapenv:Envelope>
> > > > > >
> > > > > > RESPONSE:
> > > > > > <?xml version="1.0"
> > > >
> >
> encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
> > > > > > <soapenv:Envelope
> > > >
> >
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> > > > > > <soapenv:Body>
> > > > > > <ns4:GetResponse xmlns:ns4="
> > http://localhost:8080/wsdlfile/">
> > > > > > <out
> > xmlns="http://localhost:8080/wsdlfile/">www</out>
> > > > > > <ns4:Type_T>c</ns4:Type_T>
> > > > > > </ns4:GetResponse>
> > > > > > </soapenv:Body>
> > > > > > </soapenv:Envelope>
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > <wsdl:definitions
> > > >
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > > > >
> > xmlns:tns="http://localhost:8080/wsdlfile/ "
> > > > > >
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > > >
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > > > > >
> > > >
> >
> xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
> > > > name="wsdlfile"
> > > > > >     targetNamespace="
> > http://localhost:8080/wsdlfile/">
> > > > > >     <wsdl:types>
> > > > > >         <xsd:schema
> > attributeFormDefault="qualified"
> > > > > > elementFormDefault="qualified"
> > > > > > targetNamespace="
> > http://localhost:8080/wsdlfile/">
> > > > > >             <xsd:element name="Get">
> > > > > >                 <xsd:complexType>
> > > > > >                     <xsd:sequence>
> > > > > >                         <xsd:element
> > name="in" type="xsd:string" />
> > > > > >                         <xsd:element
> > name="type"
> > > > > > type="tns:Type_T"></xsd:element>
> > > > > >                     </xsd:sequence>
> > > > > >                 </xsd:complexType>
> > > > > >             </xsd:element>
> > > > > >             <xsd:element name="GetResponse">
> > > > > >                 <xsd:complexType>
> > > > > >                     <xsd:sequence>
> > > > > >                         <xsd:element
> > name="out" type="xsd:string" />
> > > > > >                         <xsd:element
> > name="type"
> > > > > >
> > type="tns:Type_T">
> > > > > >                         </xsd:element>
> > > > > >                     </xsd:sequence>
> > > > > >                 </xsd:complexType>
> > > > > >             </xsd:element>
> > > > > >
> > > > > >             <xsd:simpleType name="Type_T">
> > > > > >                 <xsd:restriction
> > base="xsd:string">
> > > > > >                     <xsd:enumeration
> > value="a"></xsd:enumeration>
> > > > > >                     <xsd:enumeration
> > value="b"></xsd:enumeration>
> > > > > >                     <xsd:enumeration
> > value="c"></xsd:enumeration>
> > > > > >                     <xsd:enumeration
> > value="d"></xsd:enumeration>
> >
> === message truncated ===
>
>
>
>       ____________________________________________________________________________________
> Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
> http://autos.yahoo.com/green_center/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Bug? SimpleType enumeration output is incorrect.

Posted by Kevin TierOne <ke...@gmail.com>.
Thanks, it is working correctly for the 1.3 release.

Kevin


On 8/13/07, Amila Suriarachchi <am...@gmail.com> wrote:
> Can you please test this for Axis2 1.3 release.
>
> And run this sample code which gives me the correct out put
>
> public class TestClass extends TestCase {
>
>     public void testGetResponse(){
>         GetResponse getResponse = new GetResponse();
>         getResponse.setOut("Test out");
>         getResponse.setType(Type_T.a);
>
>         try {
>             OMElement omElement =
> getResponse.getOMElement(GetResponse.MY_QNAME,
> OMAbstractFactory.getOMFactory ());
>             System.out.println("OM Element ==> " +
> omElement.toStringWithConsume());
>         } catch (ADBException e) {
>             e.printStackTrace();  //To change body of catch statement use
> File | Settings | File Templates.
>         } catch (XMLStreamException e) {
>             e.printStackTrace();  //To change body of catch statement use
> File | Settings | File Templates.
>         }
>     }
> }
>
> <ns1:GetResponse xmlns:ns1=" http://localhost:8080/wsdlfile/">
>     <ns1:out>Test out</ns1:out>
>     <ns1:type>a</ns1:type>
> </ns1:GetResponse>
>
> Amila.
>
>
>
> On 8/10/07, Kevin TierOne <ke...@gmail.com> wrote:
> > 1 - If I run the wsdl through the code generator, I get the file
> > WsdlfileSkeleton.java.
> >
> > 2 - I implement this method:
> >   public localhost.wsdlfile.GetResponse Get(localhost.wsdlfile.Get get0)
> >   {
> >     localhost.wsdlfile.GetResponse resp=new
> localhost.wsdlfile.GetResponse();
> >     resp.setOut(get0.getIn());
> >     resp.setType(get0.getType());
> >     return resp;
> >   }
> >
> > 3 - After deploying the webservice, I send the request as shown in the
> > original post.
> >
> > 4 - In the TCP monitor, I see the response shown the original post.  I
> > expect that the response should echo the same values and structure as
> > in the request.  However, in the response, the Element <ns4:Type_T> is
> > incorrect.  The name of the element should be <type>.
> >
> > Let me know if you need any other info.
> >
> > Kevin
> >
> > On 8/10/07, Amila Suriarachchi <amilasuriarachchi@gmail.com > wrote:
> > > Can you please describe your qestion bit?
> > >
> > > in other words How can I regenerate your issue?
> > >
> > > Amila.
> > >
> > >
> > > On 8/9/07, Kevin TierOne < kevin.tierone@gmail.com> wrote:
> > > >
> > > > Sorry, I forgot to mention that I'm using Axis2 1.2.
> > > >
> > > > Kevin
> > > >
> > > > On 8/9/07, Kevin TierOne < kevin.tierone@gmail.com> wrote:
> > > > > The XML tags in the response messsage of an enumerated element uses
> > > > > the simpleType name.  It should use the element name.  For example,
> > > > > using the wsdl below I get the following request and response.
> > > > >
> > > > > Look at the output "<ns4:Type_T>c</ns4:Type_T>", this element should
> > > > > be <ns4:type>c</ns4:type>
> > > > >
> > > > > REQUEST:
> > > > > <soapenv:Envelope
> > > > >
> > >
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > > > > xmlns:q0=" http://localhost:8080/wsdlfile/"
> > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > > > xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
> > > > > <soapenv:Body>
> > > > > <q0:Get>
> > > > > <q0:in>www</q0:in>
> > > > > <q0:type>c</q0:type>
> > > > > </q0:Get>
> > > > > </soapenv:Body>
> > > > > </soapenv:Envelope>
> > > > >
> > > > > RESPONSE:
> > > > > <?xml version=" 1.0"
> > > encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
> > > > > <soapenv:Envelope
> > > xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/">
> > > > > <soapenv:Body>
> > > > > <ns4:GetResponse xmlns:ns4=" http://localhost:8080/wsdlfile/ ">
> > > > > <out xmlns="http://localhost:8080/wsdlfile/">www</out>
> > > > > <ns4:Type_T>c</ns4:Type_T>
> > > > > </ns4:GetResponse>
> > > > > </soapenv:Body>
> > > > > </soapenv:Envelope>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > <wsdl:definitions
> > > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > > >     xmlns:tns=" http://localhost:8080/wsdlfile/ "
> > > > >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > >     xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
> > > > >
> > > xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
> > > name="wsdlfile"
> > > > >     targetNamespace=" http://localhost:8080/wsdlfile/">
> > > > >     <wsdl:types>
> > > > >         <xsd:schema
> attributeFormDefault="qualified"
> > > > > elementFormDefault="qualified"
> > > > > targetNamespace=" http://localhost:8080/wsdlfile/">
> > > > >             <xsd:element name="Get">
> > > > >                 <xsd:complexType>
> > > > >                     <xsd:sequence>
> > > > >                         <xsd:element name="in" type="xsd:string" />
> > > > >                         <xsd:element name="type"
> > > > > type="tns:Type_T"></xsd:element>
> > > > >                     </xsd:sequence>
> > > > >                 </xsd:complexType>
> > > > >             </xsd:element>
> > > > >             <xsd:element name="GetResponse">
> > > > >                 <xsd:complexType>
> > > > >                     <xsd:sequence>
> > > > >                         <xsd:element name="out" type="xsd:string" />
> > > > >                         <xsd:element name="type"
> > > > >                             type="tns:Type_T">
> > > > >                         </xsd:element>
> > > > >                     </xsd:sequence>
> > > > >                 </xsd:complexType>
> > > > >             </xsd:element>
> > > > >
> > > > >             <xsd:simpleType name="Type_T">
> > > > >                 <xsd:restriction base="xsd:string">
> > > > >                     <xsd:enumeration value="a"></xsd:enumeration>
> > > > >                     <xsd:enumeration value="b"></xsd:enumeration>
> > > > >                     <xsd:enumeration value="c"></xsd:enumeration>
> > > > >                     <xsd:enumeration value="d"></xsd:enumeration>
> > > > >                 </xsd:restriction>
> > > > >             </xsd:simpleType>
> > > > >         </xsd:schema>
> > > > >     </wsdl:types>
> > > > >     <wsdl:message name="GetRequest">
> > > > >         <wsdl:part element="tns:Get" name="parameters" />
> > > > >     </wsdl:message>
> > > > >     <wsdl:message name="GetResponse">
> > > > >         <wsdl:part element="tns:GetResponse" name="parameters" />
> > > > >     </wsdl:message>
> > > > >     <wsdl:portType name="wsdlfile">
> > > > >         <wsdl:operation name="Get" wsaw:Action="tns:GetLink">
> > > > >             <wsdl:input message="tns:GetRequest" />
> > > > >             <wsdl:output message="tns:GetResponse" />
> > > > >         </wsdl:operation>
> > > > >     </wsdl:portType>
> > > > >     <wsdl:binding name="wsdlfileSOAP" type="tns:wsdlfile">
> > > > >         <soap:binding style="document"
> > > > >
> > > transport="http://schemas.xmlsoap.org/soap/http" />
> > > > >         <wsdl:operation name="Get">
> > > > >             <soap:operation
> > > > >
> > > soapAction="http://localhost:8080/wsdlfile/GetLink" />
> > > > >             <wsdl:input>
> > > > >                 <soap:body use="literal" />
> > > > >             </wsdl:input>
> > > > >             <wsdl:output>
> > > > >                 <soap:body use="literal" />
> > > > >             </wsdl:output>
> > > > >         </wsdl:operation>
> > > > >     </wsdl:binding>
> > > > >     <wsdl:service name="wsdlfile">
> > > > >         <wsdl:port binding="tns:wsdlfileSOAP" name="wsdlfileSOAP">
> > > > >             <soap:address location="http://localhost:8080/wsdlfile"
> />
> > > > >         </wsdl:port>
> > > > >     </wsdl:service>
> > > > > </wsdl:definitions>
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > axis-dev-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Amila Suriarachchi,
> > > WSO2 Inc.
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Bug? SimpleType enumeration output is incorrect.

Posted by WJ Krpelan <kr...@yahoo.com>.
Hi
Methinks you shouldn't use "type" as element name, and
neither "element" nor "attribute" etc. as these are
kind of "reserved words". Use "type1" or something and
it should work imho.
Cheers
Wolfgang Krpelan


--- Amila Suriarachchi <am...@gmail.com>
wrote:

> Can you please test this for Axis2 1.3 release.
> 
> And run this sample code which gives me the correct
> out put
> 
> public class TestClass extends TestCase {
> 
>     public void testGetResponse(){
>         GetResponse getResponse = new GetResponse();
>         getResponse.setOut("Test out");
>         getResponse.setType(Type_T.a);
> 
>         try {
>             OMElement omElement =
> getResponse.getOMElement(
> GetResponse.MY_QNAME,
> OMAbstractFactory.getOMFactory());
>             System.out.println("OM Element ==> " +
> omElement.toStringWithConsume());
>         } catch (ADBException e) {
>             e.printStackTrace();  //To change body
> of catch statement use
> File | Settings | File Templates.
>         } catch (XMLStreamException e) {
>             e.printStackTrace();  //To change body
> of catch statement use
> File | Settings | File Templates.
>         }
>     }
> }
> 
> <ns1:GetResponse
> xmlns:ns1="http://localhost:8080/wsdlfile/">
>     <ns1:out>Test out</ns1:out>
>     <ns1:type>a</ns1:type>
> </ns1:GetResponse>
> 
> Amila.
> 
> 
> On 8/10/07, Kevin TierOne <ke...@gmail.com>
> wrote:
> >
> > 1 - If I run the wsdl through the code generator,
> I get the file
> > WsdlfileSkeleton.java.
> >
> > 2 - I implement this method:
> >   public localhost.wsdlfile.GetResponse
> Get(localhost.wsdlfile.Get get0)
> >   {
> >     localhost.wsdlfile.GetResponse resp=new
> localhost.wsdlfile.GetResponse
> > ();
> >     resp.setOut(get0.getIn());
> >     resp.setType(get0.getType());
> >     return resp;
> >   }
> >
> > 3 - After deploying the webservice, I send the
> request as shown in the
> > original post.
> >
> > 4 - In the TCP monitor, I see the response shown
> the original post.  I
> > expect that the response should echo the same
> values and structure as
> > in the request.  However, in the response, the
> Element <ns4:Type_T> is
> > incorrect.  The name of the element should be
> <type>.
> >
> > Let me know if you need any other info.
> >
> > Kevin
> >
> > On 8/10/07, Amila Suriarachchi
> <am...@gmail.com> wrote:
> > > Can you please describe your qestion bit?
> > >
> > > in other words How can I regenerate your issue?
> > >
> > > Amila.
> > >
> > >
> > > On 8/9/07, Kevin TierOne <
> kevin.tierone@gmail.com> wrote:
> > > >
> > > > Sorry, I forgot to mention that I'm using
> Axis2 1.2.
> > > >
> > > > Kevin
> > > >
> > > > On 8/9/07, Kevin TierOne
> <ke...@gmail.com> wrote:
> > > > > The XML tags in the response messsage of an
> enumerated element uses
> > > > > the simpleType name.  It should use the
> element name.  For example,
> > > > > using the wsdl below I get the following
> request and response.
> > > > >
> > > > > Look at the output
> "<ns4:Type_T>c</ns4:Type_T>", this element should
> > > > > be <ns4:type>c</ns4:type>
> > > > >
> > > > > REQUEST:
> > > > > <soapenv:Envelope
> > > > >
> > >
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > > > > xmlns:q0=" http://localhost:8080/wsdlfile/"
> > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > > > xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
> > > > > <soapenv:Body>
> > > > > <q0:Get>
> > > > > <q0:in>www</q0:in>
> > > > > <q0:type>c</q0:type>
> > > > > </q0:Get>
> > > > > </soapenv:Body>
> > > > > </soapenv:Envelope>
> > > > >
> > > > > RESPONSE:
> > > > > <?xml version="1.0"
> > >
>
encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
> > > > > <soapenv:Envelope
> > >
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> > > > > <soapenv:Body>
> > > > > <ns4:GetResponse xmlns:ns4="
> http://localhost:8080/wsdlfile/">
> > > > > <out
> xmlns="http://localhost:8080/wsdlfile/">www</out>
> > > > > <ns4:Type_T>c</ns4:Type_T>
> > > > > </ns4:GetResponse>
> > > > > </soapenv:Body>
> > > > > </soapenv:Envelope>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > <wsdl:definitions
> > >
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > > >    
> xmlns:tns="http://localhost:8080/wsdlfile/ "
> > > > >    
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > >    
> xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > > > >
> > >
>
xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
> > > name="wsdlfile"
> > > > >     targetNamespace="
> http://localhost:8080/wsdlfile/">
> > > > >     <wsdl:types>
> > > > >         <xsd:schema
> attributeFormDefault="qualified"
> > > > > elementFormDefault="qualified"
> > > > > targetNamespace="
> http://localhost:8080/wsdlfile/">
> > > > >             <xsd:element name="Get">
> > > > >                 <xsd:complexType>
> > > > >                     <xsd:sequence>
> > > > >                         <xsd:element
> name="in" type="xsd:string" />
> > > > >                         <xsd:element
> name="type"
> > > > > type="tns:Type_T"></xsd:element>
> > > > >                     </xsd:sequence>
> > > > >                 </xsd:complexType>
> > > > >             </xsd:element>
> > > > >             <xsd:element name="GetResponse">
> > > > >                 <xsd:complexType>
> > > > >                     <xsd:sequence>
> > > > >                         <xsd:element
> name="out" type="xsd:string" />
> > > > >                         <xsd:element
> name="type"
> > > > >                            
> type="tns:Type_T">
> > > > >                         </xsd:element>
> > > > >                     </xsd:sequence>
> > > > >                 </xsd:complexType>
> > > > >             </xsd:element>
> > > > >
> > > > >             <xsd:simpleType name="Type_T">
> > > > >                 <xsd:restriction
> base="xsd:string">
> > > > >                     <xsd:enumeration
> value="a"></xsd:enumeration>
> > > > >                     <xsd:enumeration
> value="b"></xsd:enumeration>
> > > > >                     <xsd:enumeration
> value="c"></xsd:enumeration>
> > > > >                     <xsd:enumeration
> value="d"></xsd:enumeration>
> 
=== message truncated ===



      ____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Bug? SimpleType enumeration output is incorrect.

Posted by Amila Suriarachchi <am...@gmail.com>.
Can you please test this for Axis2 1.3 release.

And run this sample code which gives me the correct out put

public class TestClass extends TestCase {

    public void testGetResponse(){
        GetResponse getResponse = new GetResponse();
        getResponse.setOut("Test out");
        getResponse.setType(Type_T.a);

        try {
            OMElement omElement = getResponse.getOMElement(
GetResponse.MY_QNAME, OMAbstractFactory.getOMFactory());
            System.out.println("OM Element ==> " +
omElement.toStringWithConsume());
        } catch (ADBException e) {
            e.printStackTrace();  //To change body of catch statement use
File | Settings | File Templates.
        } catch (XMLStreamException e) {
            e.printStackTrace();  //To change body of catch statement use
File | Settings | File Templates.
        }
    }
}

<ns1:GetResponse xmlns:ns1="http://localhost:8080/wsdlfile/">
    <ns1:out>Test out</ns1:out>
    <ns1:type>a</ns1:type>
</ns1:GetResponse>

Amila.


On 8/10/07, Kevin TierOne <ke...@gmail.com> wrote:
>
> 1 - If I run the wsdl through the code generator, I get the file
> WsdlfileSkeleton.java.
>
> 2 - I implement this method:
>   public localhost.wsdlfile.GetResponse Get(localhost.wsdlfile.Get get0)
>   {
>     localhost.wsdlfile.GetResponse resp=new localhost.wsdlfile.GetResponse
> ();
>     resp.setOut(get0.getIn());
>     resp.setType(get0.getType());
>     return resp;
>   }
>
> 3 - After deploying the webservice, I send the request as shown in the
> original post.
>
> 4 - In the TCP monitor, I see the response shown the original post.  I
> expect that the response should echo the same values and structure as
> in the request.  However, in the response, the Element <ns4:Type_T> is
> incorrect.  The name of the element should be <type>.
>
> Let me know if you need any other info.
>
> Kevin
>
> On 8/10/07, Amila Suriarachchi <am...@gmail.com> wrote:
> > Can you please describe your qestion bit?
> >
> > in other words How can I regenerate your issue?
> >
> > Amila.
> >
> >
> > On 8/9/07, Kevin TierOne < kevin.tierone@gmail.com> wrote:
> > >
> > > Sorry, I forgot to mention that I'm using Axis2 1.2.
> > >
> > > Kevin
> > >
> > > On 8/9/07, Kevin TierOne <ke...@gmail.com> wrote:
> > > > The XML tags in the response messsage of an enumerated element uses
> > > > the simpleType name.  It should use the element name.  For example,
> > > > using the wsdl below I get the following request and response.
> > > >
> > > > Look at the output "<ns4:Type_T>c</ns4:Type_T>", this element should
> > > > be <ns4:type>c</ns4:type>
> > > >
> > > > REQUEST:
> > > > <soapenv:Envelope
> > > >
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > > > xmlns:q0=" http://localhost:8080/wsdlfile/"
> > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
> > > > <soapenv:Body>
> > > > <q0:Get>
> > > > <q0:in>www</q0:in>
> > > > <q0:type>c</q0:type>
> > > > </q0:Get>
> > > > </soapenv:Body>
> > > > </soapenv:Envelope>
> > > >
> > > > RESPONSE:
> > > > <?xml version="1.0"
> > encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
> > > > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> > > > <soapenv:Body>
> > > > <ns4:GetResponse xmlns:ns4=" http://localhost:8080/wsdlfile/">
> > > > <out xmlns="http://localhost:8080/wsdlfile/">www</out>
> > > > <ns4:Type_T>c</ns4:Type_T>
> > > > </ns4:GetResponse>
> > > > </soapenv:Body>
> > > > </soapenv:Envelope>
> > > >
> > > >
> > > >
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <wsdl:definitions
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > >     xmlns:tns="http://localhost:8080/wsdlfile/ "
> > > >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > >     xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > > >
> > xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
> > name="wsdlfile"
> > > >     targetNamespace=" http://localhost:8080/wsdlfile/">
> > > >     <wsdl:types>
> > > >         <xsd:schema attributeFormDefault="qualified"
> > > > elementFormDefault="qualified"
> > > > targetNamespace=" http://localhost:8080/wsdlfile/">
> > > >             <xsd:element name="Get">
> > > >                 <xsd:complexType>
> > > >                     <xsd:sequence>
> > > >                         <xsd:element name="in" type="xsd:string" />
> > > >                         <xsd:element name="type"
> > > > type="tns:Type_T"></xsd:element>
> > > >                     </xsd:sequence>
> > > >                 </xsd:complexType>
> > > >             </xsd:element>
> > > >             <xsd:element name="GetResponse">
> > > >                 <xsd:complexType>
> > > >                     <xsd:sequence>
> > > >                         <xsd:element name="out" type="xsd:string" />
> > > >                         <xsd:element name="type"
> > > >                             type="tns:Type_T">
> > > >                         </xsd:element>
> > > >                     </xsd:sequence>
> > > >                 </xsd:complexType>
> > > >             </xsd:element>
> > > >
> > > >             <xsd:simpleType name="Type_T">
> > > >                 <xsd:restriction base="xsd:string">
> > > >                     <xsd:enumeration value="a"></xsd:enumeration>
> > > >                     <xsd:enumeration value="b"></xsd:enumeration>
> > > >                     <xsd:enumeration value="c"></xsd:enumeration>
> > > >                     <xsd:enumeration value="d"></xsd:enumeration>
> > > >                 </xsd:restriction>
> > > >             </xsd:simpleType>
> > > >         </xsd:schema>
> > > >     </wsdl:types>
> > > >     <wsdl:message name="GetRequest">
> > > >         <wsdl:part element="tns:Get" name="parameters" />
> > > >     </wsdl:message>
> > > >     <wsdl:message name="GetResponse">
> > > >         <wsdl:part element="tns:GetResponse" name="parameters" />
> > > >     </wsdl:message>
> > > >     <wsdl:portType name="wsdlfile">
> > > >         <wsdl:operation name="Get" wsaw:Action="tns:GetLink">
> > > >             <wsdl:input message="tns:GetRequest" />
> > > >             <wsdl:output message="tns:GetResponse" />
> > > >         </wsdl:operation>
> > > >     </wsdl:portType>
> > > >     <wsdl:binding name="wsdlfileSOAP" type="tns:wsdlfile">
> > > >         <soap:binding style="document"
> > > >
> > transport="http://schemas.xmlsoap.org/soap/http" />
> > > >         <wsdl:operation name="Get">
> > > >             <soap:operation
> > > >
> > soapAction="http://localhost:8080/wsdlfile/GetLink" />
> > > >             <wsdl:input>
> > > >                 <soap:body use="literal" />
> > > >             </wsdl:input>
> > > >             <wsdl:output>
> > > >                 <soap:body use="literal" />
> > > >             </wsdl:output>
> > > >         </wsdl:operation>
> > > >     </wsdl:binding>
> > > >     <wsdl:service name="wsdlfile">
> > > >         <wsdl:port binding="tns:wsdlfileSOAP" name="wsdlfileSOAP">
> > > >             <soap:address location="http://localhost:8080/wsdlfile"
> />
> > > >         </wsdl:port>
> > > >     </wsdl:service>
> > > > </wsdl:definitions>
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: Bug? SimpleType enumeration output is incorrect.

Posted by Kevin TierOne <ke...@gmail.com>.
1 - If I run the wsdl through the code generator, I get the file
WsdlfileSkeleton.java.

2 - I implement this method:
  public localhost.wsdlfile.GetResponse Get(localhost.wsdlfile.Get get0)
  {
    localhost.wsdlfile.GetResponse resp=new localhost.wsdlfile.GetResponse();
    resp.setOut(get0.getIn());
    resp.setType(get0.getType());
    return resp;
  }

3 - After deploying the webservice, I send the request as shown in the
original post.

4 - In the TCP monitor, I see the response shown the original post.  I
expect that the response should echo the same values and structure as
in the request.  However, in the response, the Element <ns4:Type_T> is
incorrect.  The name of the element should be <type>.

Let me know if you need any other info.

Kevin

On 8/10/07, Amila Suriarachchi <am...@gmail.com> wrote:
> Can you please describe your qestion bit?
>
> in other words How can I regenerate your issue?
>
> Amila.
>
>
> On 8/9/07, Kevin TierOne < kevin.tierone@gmail.com> wrote:
> >
> > Sorry, I forgot to mention that I'm using Axis2 1.2.
> >
> > Kevin
> >
> > On 8/9/07, Kevin TierOne <ke...@gmail.com> wrote:
> > > The XML tags in the response messsage of an enumerated element uses
> > > the simpleType name.  It should use the element name.  For example,
> > > using the wsdl below I get the following request and response.
> > >
> > > Look at the output "<ns4:Type_T>c</ns4:Type_T>", this element should
> > > be <ns4:type>c</ns4:type>
> > >
> > > REQUEST:
> > > <soapenv:Envelope
> > >
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > > xmlns:q0=" http://localhost:8080/wsdlfile/"
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
> > > <soapenv:Body>
> > > <q0:Get>
> > > <q0:in>www</q0:in>
> > > <q0:type>c</q0:type>
> > > </q0:Get>
> > > </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > > RESPONSE:
> > > <?xml version="1.0"
> encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
> > > <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> > > <soapenv:Body>
> > > <ns4:GetResponse xmlns:ns4=" http://localhost:8080/wsdlfile/">
> > > <out xmlns="http://localhost:8080/wsdlfile/">www</out>
> > > <ns4:Type_T>c</ns4:Type_T>
> > > </ns4:GetResponse>
> > > </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > >
> > >
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <wsdl:definitions
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > >     xmlns:tns="http://localhost:8080/wsdlfile/ "
> > >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > >     xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > >
> xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
> name="wsdlfile"
> > >     targetNamespace=" http://localhost:8080/wsdlfile/">
> > >     <wsdl:types>
> > >         <xsd:schema attributeFormDefault="qualified"
> > > elementFormDefault="qualified"
> > > targetNamespace=" http://localhost:8080/wsdlfile/">
> > >             <xsd:element name="Get">
> > >                 <xsd:complexType>
> > >                     <xsd:sequence>
> > >                         <xsd:element name="in" type="xsd:string" />
> > >                         <xsd:element name="type"
> > > type="tns:Type_T"></xsd:element>
> > >                     </xsd:sequence>
> > >                 </xsd:complexType>
> > >             </xsd:element>
> > >             <xsd:element name="GetResponse">
> > >                 <xsd:complexType>
> > >                     <xsd:sequence>
> > >                         <xsd:element name="out" type="xsd:string" />
> > >                         <xsd:element name="type"
> > >                             type="tns:Type_T">
> > >                         </xsd:element>
> > >                     </xsd:sequence>
> > >                 </xsd:complexType>
> > >             </xsd:element>
> > >
> > >             <xsd:simpleType name="Type_T">
> > >                 <xsd:restriction base="xsd:string">
> > >                     <xsd:enumeration value="a"></xsd:enumeration>
> > >                     <xsd:enumeration value="b"></xsd:enumeration>
> > >                     <xsd:enumeration value="c"></xsd:enumeration>
> > >                     <xsd:enumeration value="d"></xsd:enumeration>
> > >                 </xsd:restriction>
> > >             </xsd:simpleType>
> > >         </xsd:schema>
> > >     </wsdl:types>
> > >     <wsdl:message name="GetRequest">
> > >         <wsdl:part element="tns:Get" name="parameters" />
> > >     </wsdl:message>
> > >     <wsdl:message name="GetResponse">
> > >         <wsdl:part element="tns:GetResponse" name="parameters" />
> > >     </wsdl:message>
> > >     <wsdl:portType name="wsdlfile">
> > >         <wsdl:operation name="Get" wsaw:Action="tns:GetLink">
> > >             <wsdl:input message="tns:GetRequest" />
> > >             <wsdl:output message="tns:GetResponse" />
> > >         </wsdl:operation>
> > >     </wsdl:portType>
> > >     <wsdl:binding name="wsdlfileSOAP" type="tns:wsdlfile">
> > >         <soap:binding style="document"
> > >
> transport="http://schemas.xmlsoap.org/soap/http" />
> > >         <wsdl:operation name="Get">
> > >             <soap:operation
> > >
> soapAction="http://localhost:8080/wsdlfile/GetLink" />
> > >             <wsdl:input>
> > >                 <soap:body use="literal" />
> > >             </wsdl:input>
> > >             <wsdl:output>
> > >                 <soap:body use="literal" />
> > >             </wsdl:output>
> > >         </wsdl:operation>
> > >     </wsdl:binding>
> > >     <wsdl:service name="wsdlfile">
> > >         <wsdl:port binding="tns:wsdlfileSOAP" name="wsdlfileSOAP">
> > >             <soap:address location="http://localhost:8080/wsdlfile" />
> > >         </wsdl:port>
> > >     </wsdl:service>
> > > </wsdl:definitions>
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Bug? SimpleType enumeration output is incorrect.

Posted by Amila Suriarachchi <am...@gmail.com>.
Can you please describe your qestion bit?

in other words How can I regenerate your issue?

Amila.

On 8/9/07, Kevin TierOne <ke...@gmail.com> wrote:
>
> Sorry, I forgot to mention that I'm using Axis2 1.2.
>
> Kevin
>
> On 8/9/07, Kevin TierOne <ke...@gmail.com> wrote:
> > The XML tags in the response messsage of an enumerated element uses
> > the simpleType name.  It should use the element name.  For example,
> > using the wsdl below I get the following request and response.
> >
> > Look at the output "<ns4:Type_T>c</ns4:Type_T>", this element should
> > be <ns4:type>c</ns4:type>
> >
> > REQUEST:
> > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:q0="http://localhost:8080/wsdlfile/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > <soapenv:Body>
> > <q0:Get>
> > <q0:in>www</q0:in>
> > <q0:type>c</q0:type>
> > </q0:Get>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > RESPONSE:
> > <?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/
> "?>
> > <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/">
> > <soapenv:Body>
> > <ns4:GetResponse xmlns:ns4="http://localhost:8080/wsdlfile/">
> > <out xmlns="http://localhost:8080/wsdlfile/">www</out>
> > <ns4:Type_T>c</ns4:Type_T>
> > </ns4:GetResponse>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >     xmlns:tns="http://localhost:8080/wsdlfile/"
> >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >     xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
> name="wsdlfile"
> >     targetNamespace="http://localhost:8080/wsdlfile/">
> >     <wsdl:types>
> >         <xsd:schema attributeFormDefault="qualified"
> > elementFormDefault="qualified"
> > targetNamespace="http://localhost:8080/wsdlfile/">
> >             <xsd:element name="Get">
> >                 <xsd:complexType>
> >                     <xsd:sequence>
> >                         <xsd:element name="in" type="xsd:string" />
> >                         <xsd:element name="type"
> > type="tns:Type_T"></xsd:element>
> >                     </xsd:sequence>
> >                 </xsd:complexType>
> >             </xsd:element>
> >             <xsd:element name="GetResponse">
> >                 <xsd:complexType>
> >                     <xsd:sequence>
> >                         <xsd:element name="out" type="xsd:string" />
> >                         <xsd:element name="type"
> >                             type="tns:Type_T">
> >                         </xsd:element>
> >                     </xsd:sequence>
> >                 </xsd:complexType>
> >             </xsd:element>
> >
> >             <xsd:simpleType name="Type_T">
> >                 <xsd:restriction base="xsd:string">
> >                     <xsd:enumeration value="a"></xsd:enumeration>
> >                     <xsd:enumeration value="b"></xsd:enumeration>
> >                     <xsd:enumeration value="c"></xsd:enumeration>
> >                     <xsd:enumeration value="d"></xsd:enumeration>
> >                 </xsd:restriction>
> >             </xsd:simpleType>
> >         </xsd:schema>
> >     </wsdl:types>
> >     <wsdl:message name="GetRequest">
> >         <wsdl:part element="tns:Get" name="parameters" />
> >     </wsdl:message>
> >     <wsdl:message name="GetResponse">
> >         <wsdl:part element="tns:GetResponse" name="parameters" />
> >     </wsdl:message>
> >     <wsdl:portType name="wsdlfile">
> >         <wsdl:operation name="Get" wsaw:Action="tns:GetLink">
> >             <wsdl:input message="tns:GetRequest" />
> >             <wsdl:output message="tns:GetResponse" />
> >         </wsdl:operation>
> >     </wsdl:portType>
> >     <wsdl:binding name="wsdlfileSOAP" type="tns:wsdlfile">
> >         <soap:binding style="document"
> >             transport="http://schemas.xmlsoap.org/soap/http" />
> >         <wsdl:operation name="Get">
> >             <soap:operation
> >                 soapAction="http://localhost:8080/wsdlfile/GetLink" />
> >             <wsdl:input>
> >                 <soap:body use="literal" />
> >             </wsdl:input>
> >             <wsdl:output>
> >                 <soap:body use="literal" />
> >             </wsdl:output>
> >         </wsdl:operation>
> >     </wsdl:binding>
> >     <wsdl:service name="wsdlfile">
> >         <wsdl:port binding="tns:wsdlfileSOAP" name="wsdlfileSOAP">
> >             <soap:address location="http://localhost:8080/wsdlfile" />
> >         </wsdl:port>
> >     </wsdl:service>
> > </wsdl:definitions>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: Bug? SimpleType enumeration output is incorrect.

Posted by Kevin TierOne <ke...@gmail.com>.
Sorry, I forgot to mention that I'm using Axis2 1.2.

Kevin

On 8/9/07, Kevin TierOne <ke...@gmail.com> wrote:
> The XML tags in the response messsage of an enumerated element uses
> the simpleType name.  It should use the element name.  For example,
> using the wsdl below I get the following request and response.
>
> Look at the output "<ns4:Type_T>c</ns4:Type_T>", this element should
> be <ns4:type>c</ns4:type>
>
> REQUEST:
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:q0="http://localhost:8080/wsdlfile/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <q0:Get>
> <q0:in>www</q0:in>
> <q0:type>c</q0:type>
> </q0:Get>
> </soapenv:Body>
> </soapenv:Envelope>
>
> RESPONSE:
> <?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Body>
> <ns4:GetResponse xmlns:ns4="http://localhost:8080/wsdlfile/">
> <out xmlns="http://localhost:8080/wsdlfile/">www</out>
> <ns4:Type_T>c</ns4:Type_T>
> </ns4:GetResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:tns="http://localhost:8080/wsdlfile/"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl" name="wsdlfile"
>     targetNamespace="http://localhost:8080/wsdlfile/">
>     <wsdl:types>
>         <xsd:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://localhost:8080/wsdlfile/">
>             <xsd:element name="Get">
>                 <xsd:complexType>
>                     <xsd:sequence>
>                         <xsd:element name="in" type="xsd:string" />
>                         <xsd:element name="type"
> type="tns:Type_T"></xsd:element>
>                     </xsd:sequence>
>                 </xsd:complexType>
>             </xsd:element>
>             <xsd:element name="GetResponse">
>                 <xsd:complexType>
>                     <xsd:sequence>
>                         <xsd:element name="out" type="xsd:string" />
>                         <xsd:element name="type"
>                             type="tns:Type_T">
>                         </xsd:element>
>                     </xsd:sequence>
>                 </xsd:complexType>
>             </xsd:element>
>
>             <xsd:simpleType name="Type_T">
>                 <xsd:restriction base="xsd:string">
>                     <xsd:enumeration value="a"></xsd:enumeration>
>                     <xsd:enumeration value="b"></xsd:enumeration>
>                     <xsd:enumeration value="c"></xsd:enumeration>
>                     <xsd:enumeration value="d"></xsd:enumeration>
>                 </xsd:restriction>
>             </xsd:simpleType>
>         </xsd:schema>
>     </wsdl:types>
>     <wsdl:message name="GetRequest">
>         <wsdl:part element="tns:Get" name="parameters" />
>     </wsdl:message>
>     <wsdl:message name="GetResponse">
>         <wsdl:part element="tns:GetResponse" name="parameters" />
>     </wsdl:message>
>     <wsdl:portType name="wsdlfile">
>         <wsdl:operation name="Get" wsaw:Action="tns:GetLink">
>             <wsdl:input message="tns:GetRequest" />
>             <wsdl:output message="tns:GetResponse" />
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="wsdlfileSOAP" type="tns:wsdlfile">
>         <soap:binding style="document"
>             transport="http://schemas.xmlsoap.org/soap/http" />
>         <wsdl:operation name="Get">
>             <soap:operation
>                 soapAction="http://localhost:8080/wsdlfile/GetLink" />
>             <wsdl:input>
>                 <soap:body use="literal" />
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal" />
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="wsdlfile">
>         <wsdl:port binding="tns:wsdlfileSOAP" name="wsdlfileSOAP">
>             <soap:address location="http://localhost:8080/wsdlfile" />
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org