Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 36936 invoked from network); 15 Feb 2007 15:52:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Feb 2007 15:52:54 -0000 Received: (qmail 27361 invoked by uid 500); 15 Feb 2007 15:52:48 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 27351 invoked by uid 500); 15 Feb 2007 15:52:48 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 27340 invoked by uid 99); 15 Feb 2007 15:52:48 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Feb 2007 07:52:48 -0800 X-ASF-Spam-Status: No, hits=2.1 required=10.0 tests=HTML_MESSAGE,HTML_TAG_EXIST_TBODY,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of donaldyy@googlemail.com designates 64.233.184.233 as permitted sender) Received: from [64.233.184.233] (HELO wr-out-0506.google.com) (64.233.184.233) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Feb 2007 07:52:38 -0800 Received: by wr-out-0506.google.com with SMTP id i21so618281wra for ; Thu, 15 Feb 2007 07:52:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=YqwDKtSJrc//5NlKIkswNzbdfIE6spVfQLLCRyX1ThsG0aKG5bKiIszWgNSwH1iuWpyymVll4jumx+h3vZ9tO/O0lkudpSb/8hP1MGNnE5wcM2eakduMPWWU+VCOASwr5epMd1MykZWotS6pMb1j56f1nqgtsjbgtx6r9ZuyUpk= Received: by 10.114.200.2 with SMTP id x2mr1101523waf.1171554734900; Thu, 15 Feb 2007 07:52:14 -0800 (PST) Received: by 10.114.167.12 with HTTP; Thu, 15 Feb 2007 07:52:14 -0800 (PST) Message-ID: <55bf406d0702150752l145e4991v22e931c5e1cfdece@mail.gmail.com> Date: Thu, 15 Feb 2007 15:52:14 +0000 From: "donald yang" To: axis-user@ws.apache.org Subject: Re: AXIS2 map java byte[] to xml byte not base64Binary In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_34774_7196521.1171554734731" References: <55bf406d0702150450k645705dbm336f58d1f08d2f6d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_34774_7196521.1171554734731 Content-Type: text/plain; charset=ISO-2022-JP; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Ajith Many thanks for your reply. I have log the bug(ref number axis2-2192). Could you please have a look? cheers donald * * On 2/15/07, Ajith Ranabahu wrote: > > Hi, > this seems to be a bug in the Java2WSDL converter - we should be > having a switch to change the behavior. Please log a Jira. > > Ajith > > > On 2/15/07, donald yang wrote: > > Hi, It seems AXIS2 has a bug to map java byte[] to xml base64Binary. > When I > > declare a complex data structure, which have a byte[] member variable, > the > > data type of that variable in WSDL is xsd:byte, not xsd:base64Binary. > > However if the variable is not a member variable, AXIS2 map it to xml > > base64Binary. It is a very strange behaviour. Here is one example[1], > [2]. > > > > > > [1] java source code > > public class ComplexTestCaseService > > { > > public byte[] echoByteArray(byte[] test) > > { > > > > return test; > > } > > public Record echoRecord(Record record) > > { > > return record; > > } > > ......................... > > } > > > > public class Record implements Serializable > > { > > private double double_var; > > private byte[] byteArray_var; > > > > public byte[] getByteArray_var() { > > return byteArray_var; > > } > > public void setByteArray_var(byte[] byteArray_var) { > > this.byteArray_var = byteArray_var; > > } > > public double getDouble_var() { > > return double_var; > > } > > public void setDouble_var(double double_var) { > > this.double_var = double_var; > > } > > } > > > > [2] WSDL generated by AXIS2 > > > > > > 4GL Test Service > > > > − > > > > − > > > elementFormDefault="qualified" targetNamespace=" > > http://ws.apache.org/axis2/xsd"> > > − > > > > − > > > > − > > > > > > > > > > > > > > − > > > > − > > > > > > > > > > > > − > > > > − > > > > − > > > > > > > > > > > > − > > > > − > > > > − > > > > > > > > > > > > − > > > > − > > > > − > > > > > > > > > > > > > > > > − > > > > > > > > − > > > > > > > > − > > > > > > > > − > > > > > element="ns0:echoByteArrayResponse"/> > > > > − > > > > − > > > > > wsaw:Action="urn:echoRecord"/> > > > > > > − > > > > > wsaw:Action="urn:echoByteArray"/> > > > > > > > > − > > > name="ComplexTestCaseServiceSOAP11Binding" > > type="axis2:ComplexTestCaseServicePortType"> > > > transport="http://schemas.xmlsoap.org/soap/http" > > style="document"/> > > − > > > > > > − > > > > > > > > − > > > > > > > > > > − > > > > > > − > > > > > > > > − > > > > > > > > > > > > − > > > name="ComplexTestCaseServiceSOAP12Binding" > > type="axis2:ComplexTestCaseServicePortType"> > > > > − > > > > > > − > > > > > > > > − > > > > > > > > > > − > > > > > > − > > > > > > > > − > > > > > > > > > > > > − > > > type="axis2:ComplexTestCaseServicePortType"> > > > > − > > > > > > − > > > > > > > > − > > > > > > > > > > − > > > > > > − > > > > > > > > − > > > > > > > > > > > > − > > > > − > > > binding="axis2:ComplexTestCaseServiceSOAP11Binding"> > > > location="http://localhost:8080/axis2/services/ComplexTestCaseService"/> > > > > − > > > binding="axis2:ComplexTestCaseServiceSOAP12Binding"> > > > location="http://localhost:8080/axis2/services/ComplexTestCaseService"/> > > > > − > > > binding="axis2:ComplexTestCaseServiceHttpBinding"> > > > location="http://localhost:8080/axis2/rest/ComplexTestCaseService"/> > > > > > > > > > > > > > > > -- > Ajith Ranabahu > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-user-help@ws.apache.org > > ------=_Part_34774_7196521.1171554734731 Content-Type: text/html; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Ajith

      Many thanks for your reply. I have log the bug(ref number axis2-2192).

     Could you please have a look?

cheers
donald




On 2/15/07, Ajith Ranabahu <ajith.ranabahu@gmail.com> wrote:
Hi,
this seems to be a bug in the Java2WSDL converter - we should be
having a switch to change the behavior. Please log a Jira.

Ajith


On 2/15/07, donald yang < donaldyy@googlemail.com> wrote:
> Hi, It seems AXIS2 has a bug to map java byte[] to xml base64Binary. When I
> declare a complex data structure, which have a byte[] member variable, the
> data type of that variable in WSDL is xsd:byte, not xsd:base64Binary.
> However if the variable is not a member variable, AXIS2 map it to xml
> base64Binary. It is a very strange behaviour. Here is one example[1], [2].
>
>
> [1] java source code
> public class ComplexTestCaseService
> {
>     public byte[] echoByteArray(byte[] test)
>     {
>
>         return test;
>   }
>  public Record echoRecord(Record record)
>   {
>         return record;
>  }
> .........................
> }
>
> public class Record implements Serializable
> {
>     private double double_var;
>     private byte[] byteArray_var;
>
>     public byte[] getByteArray_var() {
>         return byteArray_var;
>     }
>     public void setByteArray_var(byte[] byteArray_var) {
>         this.byteArray_var = byteArray_var;
>     }
>     public double getDouble_var() {
>         return double_var;
>     }
>     public void setDouble_var(double double_var) {
>         this.double_var = double_var;
>     }
> }
>
> [2] WSDL generated by AXIS2
>     <wsdl:definitions targetNamespace=" http://ws.apache.org/axis2">
> <wsdl:documentation>
>         4GL Test Service
>     </wsdl:documentation>
> −
>     <wsdl:types>
> −
>     <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="
> http://ws.apache.org/axis2/xsd">
> −
>     <xs:element name="echoRecord">
> −
>     <xs:complexType>
> −
>     <xs:sequence>
> <xs:element name="record" nillable="true" type="ns:Record"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="Record" type="ns:Record"/>
> −
>     <xs:complexType name="Record">
> −
>     <xs:sequence>
> <xs:element maxOccurs="unbounded" name="byteArray_var" type="xs:byte"/>
> <xs:element name="double_var" type="xs:double"/>
> </xs:sequence>
> </xs:complexType>
> −
>     <xs:element name="echoRecordResponse">
> −
>     <xs:complexType>
> −
>     <xs:sequence>
> <xs:element name="return" nillable="true" type="ns:Record"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> −
>     <xs:element name="echoByteArray">
> −
>     <xs:complexType>
> −
>     <xs:sequence>
>  <xs:element name="test" nillable="true" type="xs:base64Binary"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> −
>     <xs:element name="echoByteArrayResponse">
> −
>     <xs:complexType>
> −
>     <xs:sequence>
> <xs:element name="return" nillable="true" type="xs:base64Binary"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> </wsdl:types>
> −
>     <wsdl:message name="echoRecordMessage">
> <wsdl:part name="part1" element="ns0:echoRecord"/>
> </wsdl:message>
> −
>     <wsdl:message name="echoRecordResponse">
> <wsdl:part name="part1" element="ns0:echoRecordResponse"/>
> </wsdl:message>
> −
>     <wsdl:message name="echoByteArrayMessage">
> <wsdl:part name="part1" element="ns0:echoByteArray"/>
> </wsdl:message>
> −
>     <wsdl:message name="echoByteArrayResponse">
> <wsdl:part name="part1"
> element="ns0:echoByteArrayResponse"/>
> </wsdl:message>
> −
>     <wsdl:portType name="ComplexTestCaseServicePortType">
> −
>     <wsdl:operation name="echoRecord">
> <wsdl:input message="axis2:echoRecordMessage"
> wsaw:Action="urn:echoRecord"/>
> <wsdl:output message="axis2:echoRecordResponse"/>
> </wsdl:operation>
> −
>     <wsdl:operation name="echoByteArray">
> <wsdl:input message="axis2:echoByteArrayMessage"
> wsaw:Action="urn:echoByteArray"/>
> <wsdl:output message="axis2:echoByteArrayResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> −
>     <wsdl:binding
> name="ComplexTestCaseServiceSOAP11Binding"
> type="axis2:ComplexTestCaseServicePortType">
> <soap:binding
> transport="http://schemas.xmlsoap.org/soap/http"
> style="document"/>
> −
>     <wsdl:operation name="echoRecord">
> <soap:operation soapAction="urn:echoRecord" style="document"/>
> −
>     <wsdl:input>
> <soap:body use="literal"/>
> </wsdl:input>
> −
>     <wsdl:output>
> <soap:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> −
>     <wsdl:operation name="echoByteArray">
> <soap:operation soapAction="urn:echoByteArray" style="document"/>
> −
>     <wsdl:input>
> <soap:body use="literal"/>
> </wsdl:input>
> −
>     <wsdl:output>
> <soap:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> −
>     <wsdl:binding
> name="ComplexTestCaseServiceSOAP12Binding"
> type="axis2:ComplexTestCaseServicePortType">
> <soap12:binding transport="
> http://schemas.xmlsoap.org/soap/http" style="document"/>
> −
>     <wsdl:operation name="echoRecord">
> <soap12:operation soapAction="urn:echoRecord" style="document"/>
> −
>     <wsdl:input>
> <soap12:body use="literal"/>
> </wsdl:input>
> −
>     <wsdl:output>
> <soap12:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> −
>     <wsdl:operation name="echoByteArray">
> <soap12:operation soapAction="urn:echoByteArray" style="document"/>
> −
>     <wsdl:input>
> <soap12:body use="literal"/>
> </wsdl:input>
> −
>     <wsdl:output>
> <soap12:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> −
>     <wsdl:binding name="ComplexTestCaseServiceHttpBinding"
> type="axis2:ComplexTestCaseServicePortType">
> <http:binding verb="POST"/>
> −
>     <wsdl:operation name="echoRecord">
> <http:operation location="echoRecord"/>
> −
>     <wsdl:input>
> <mime:content type="text/xml"/>
> </wsdl:input>
> −
>     <wsdl:output>
> <mime:content type="text/xml"/>
> </wsdl:output>
> </wsdl:operation>
> −
>     <wsdl:operation name="echoByteArray">
> <http:operation location="echoByteArray"/>
> −
>     <wsdl:input>
> <mime:content type="text/xml"/>
> </wsdl:input>
> −
>     <wsdl:output>
> <mime:content type="text/xml"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> −
>     <wsdl:service name="ComplexTestCaseService">
> −
>     <wsdl:port name="ComplexTestCaseServiceSOAP11port_http"
> binding="axis2:ComplexTestCaseServiceSOAP11Binding">
> <soap:address
> location="http://localhost:8080/axis2/services/ComplexTestCaseService"/>
> </wsdl:port>
> −
>     <wsdl:port name="ComplexTestCaseServiceSOAP12port_http"
> binding="axis2:ComplexTestCaseServiceSOAP12Binding">
> <soap12:address
> location=" http://localhost:8080/axis2/services/ComplexTestCaseService"/>
> </wsdl:port>
> −
>     <wsdl:port name="ComplexTestCaseServiceHttpport1"
> binding="axis2:ComplexTestCaseServiceHttpBinding">
> <http:address
> location="http://localhost:8080/axis2/rest/ComplexTestCaseService"/>
> </wsdl:port>
> </wsdl:service>
>  </wsdl:definitions>
>
>
>


--
Ajith Ranabahu

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


------=_Part_34774_7196521.1171554734731--