Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 1631 invoked from network); 13 Aug 2007 14:00:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Aug 2007 14:00:04 -0000 Received: (qmail 73053 invoked by uid 500); 13 Aug 2007 14:00:01 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 72985 invoked by uid 500); 13 Aug 2007 14:00:01 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 72974 invoked by uid 99); 13 Aug 2007 14:00:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2007 07:00:01 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of amilasuriarachchi@gmail.com designates 64.233.162.237 as permitted sender) Received: from [64.233.162.237] (HELO nz-out-0506.google.com) (64.233.162.237) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2007 13:59:53 +0000 Received: by nz-out-0506.google.com with SMTP id l1so437538nzf for ; Mon, 13 Aug 2007 06:59:32 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=qne+2XudppB9pdFDHbzRXBT+MsO1haMsJuRUIUroIL/C9EsKD1D9WkI/Q3hhRDh9Gc5bHA512e71FLLLDleNiMuRSHc9rAO+a9pEGQVsuAfiGuaIkrbUSW0qoM7Avf2H9sD9tUBmuk6N9Ndkuk36Rp/r8mZB3NG2tjI/GHm7bEQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=q/FUsFY1IX6ZQH7T5Vdz2ZJ8P4d+BUZEYLR7Z5Ijqem50G6quEbeQtQQh2gdP9608W8HztYd28MjL92TXVKR/XJN5QXWJPOdMq1xtbM5qKgC7Mn1sloXzoTxL5R25YIxbzwN/+Wr8VZqjbQxnFDFKXujGPl3AUqrhCBbpH5Yyfw= Received: by 10.142.177.7 with SMTP id z7mr655495wfe.1187013571056; Mon, 13 Aug 2007 06:59:31 -0700 (PDT) Received: by 10.143.33.10 with HTTP; Mon, 13 Aug 2007 06:59:30 -0700 (PDT) Message-ID: <60708f4b0708130659h122210d5k51383e5fd6da3654@mail.gmail.com> Date: Mon, 13 Aug 2007 19:29:31 +0530 From: "Amila Suriarachchi" To: axis-dev@ws.apache.org Subject: Re: Bug? SimpleType enumeration output is incorrect. In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_47825_29760772.1187013571014" References: <60708f4b0708092110j7f9937a8i5f49a2e433f0f999@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_47825_29760772.1187013571014 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. } } } Test out a Amila. On 8/10/07, Kevin TierOne 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 is > incorrect. The name of the element should be . > > Let me know if you need any other info. > > Kevin > > On 8/10/07, Amila Suriarachchi 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 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 "c", this element should > > > > be c > > > > > > > > REQUEST: > > > > > > > > > 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"> > > > > > > > > > > > > www > > > > c > > > > > > > > > > > > > > > > > > > > RESPONSE: > > > > > encoding="http://schemas.xmlsoap.org/soap/envelope/"?> > > > > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > > > > > > > > > > > > www > > > > c > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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/"> > > > > > > > > > > > elementFormDefault="qualified" > > > > targetNamespace=" http://localhost:8080/wsdlfile/"> > > > > > > > > > > > > > > > > > > > > > > > type="tns:Type_T"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > type="tns:Type_T"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > transport="http://schemas.xmlsoap.org/soap/http" /> > > > > > > > > > > > > > soapAction="http://localhost:8080/wsdlfile/GetLink" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /> > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > 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. ------=_Part_47825_29760772.1187013571014 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 <kevin.tierone@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. ------=_Part_47825_29760772.1187013571014--