Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 76517 invoked from network); 19 Apr 2007 09:53:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Apr 2007 09:53:41 -0000 Received: (qmail 46612 invoked by uid 500); 19 Apr 2007 09:53:37 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 46593 invoked by uid 500); 19 Apr 2007 09:53:37 -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 46582 invoked by uid 99); 19 Apr 2007 09:53:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2007 02:53:37 -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 (herse.apache.org: domain of arnold.maderthaner@gmail.com designates 66.249.82.225 as permitted sender) Received: from [66.249.82.225] (HELO wx-out-0506.google.com) (66.249.82.225) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2007 02:53:30 -0700 Received: by wx-out-0506.google.com with SMTP id h28so512684wxd for ; Thu, 19 Apr 2007 02:53:09 -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:mime-version:content-type; b=MxCsMBD/2F/lIoKLNFIKDfGTKASr5v2Ullqh6pbafnAhMPxUXZ7u3SgPjjS70FV7xk+FpVX6ACMbJO0w5H54H6IyaT3uyNP6l/mglS0QsUSPP/II+cYU9M4JAEVVLIkqIFHgGzGQPuI6ZfzWTLraceB586E5xTYD7lCqCb6Gd5c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=NB+HurY6q1n1I+BdXH+1I3GEi9lg9wmUern4RSSJUMCiJ8r6h2sx3sC2CgA0vnnHXQVaZ02eRDhh3ZUOynPHZY6wlUICwSVnC4loA67A3YVeSg3PaTlOc1jxV/YyntbYLU56YH22MucidbhiaWmXgamhkzT4qUCTBzVEP9pE/gc= Received: by 10.70.69.11 with SMTP id r11mr3049560wxa.1176976388386; Thu, 19 Apr 2007 02:53:08 -0700 (PDT) Received: by 10.100.119.16 with HTTP; Thu, 19 Apr 2007 02:53:08 -0700 (PDT) Message-ID: <239a76380704190253u27e4e34ah60cb39055e43c8d2@mail.gmail.com> Date: Thu, 19 Apr 2007 11:53:08 +0200 From: "Arnold Maderthaner" To: axis-user@ws.apache.org Subject: [Axis2] Some questions about Axis2 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_91280_183337.1176976388338" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_91280_183337.1176976388338 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi ! I have to write some webservices (client and server) and want to use Axis2 so I wrote some test classes: Data classes: public class Data1 { List array = new ArrayList(); public List getArray() { return array; } public void setArray(List array) { this.array = array; } } public class Data2 { String a,b,c; public String getA() { return a; } public void setA(String a) { this.a = a; } public String getB() { return b; } public void setB(String b) { this.b = b; } public String getC() { return c; } public void setC(String c) { this.c = c; } } WebService: package com.spirit.axis.webservice; import java.util.Iterator; import java.util.List; import com.spirit.axis.data.Data1; import com.spirit.axis.data.Data2; public class Webservice { public List getData(Data1 data) { List array = data.getArray(); for(Iterator it = array.iterator();it.hasNext();) { Data2 data2 = it.next(); System.out.println("A:" + data2.getA() + " B:" + data2.getB() + " C:" + data2.getC()); } return array; } } Generated WSDL with java2wsdl: The problem is that axis2 uses anyType for the Array and for the return type of my webservice. Can I just change it to ax21:Data2 or do I have to modify my sourcecode. The wsdl was generate via commandline: ./java2wsdl.sh -cp . -cn com.spirit.axis.webservice.Webservice -of Test.wsdl anyone can help me or where is the right place to post questions about axis2 ? yours ------=_Part_91280_183337.1176976388338 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi !

I have to write some webservices (client and server) and want to use Axis2 so I wrote some test classes:

Data classes:
public class Data1
{
    List<Data2> array = new ArrayList<Data2>();

    public List<Data2> getArray() {
        return array;
    }

    public void setArray(List<Data2> array) {
        this.array = array;
    }
   

}
public class Data2
{
    String a,b,c;

    public String getA() {
        return a;
    }

    public void setA(String a) {
        this.a = a;
    }

    public String getB() {
        return b;
    }

    public void setB(String b) {
        this.b = b;
    }

    public String getC() {
        return c;
    }

    public void setC(String c) {
        this.c = c;
    }
}


WebService:
package com.spirit.axis.webservice;

import java.util.Iterator;
import java.util.List;

import com.spirit.axis.data.Data1;
import com.spirit.axis.data.Data2;

public class Webservice
{
    public List<Data2> getData(Data1 data)
    {
        List<Data2> array = data.getArray();
        for(Iterator<Data2> it = array.iterator();it.hasNext();)
        {
            Data2 data2 = it.next();
            System.out.println("A:" + data2.getA() + " B:" + data2.getB() + " C:" + data2.getC());
        }
        return array;
    }
}


Generated WSDL with java2wsdl:
<wsdl:definitions xmlns:axis2="http://webservice.axis.spirit.com"
    xmlns:soap12=" http://schemas.xmlsoap.org/wsdl/soap12/ "
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime=" http://schemas.xmlsoap.org/wsdl/mime/ "
    xmlns:ns="http://webservice.axis.spirit.com/xsd"
    xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/ " xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    targetNamespace=" http://webservice.axis.spirit.com ">
    <wsdl:types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema "
            xmlns:ns0=" http://data.axis.spirit.com/xsd" attributeFormDefault="qualified
"
            elementFormDefault="qualified" targetNamespace=" http://webservice.axis.spirit.com/xsd ">
            <xs:element name="getData">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="data" nillable="true" type="ns0:Data1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="getDataResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="return" nillable="true" type="xs:anyType"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
        <xs:schema xmlns:xs=" http://www.w3.org/2001/XMLSchema"
            xmlns:ax21=" http://data.axis.spirit.com/xsd" attributeFormDefault="qualified"
            elementFormDefault="qualified" targetNamespace=" http://data.axis.spirit.com/xsd">
            <xs:element name="Data1" type="ax21:Data1"/>
            <xs:complexType name="Data1">
                <xs:sequence>
                    <xs:element name="array" type="xs:anyType"/>
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="getDataMessage">
        <wsdl:part name="part1" element="ns:getData"/>
    </wsdl:message>
    <wsdl:message name="getDataResponseMessage">
        <wsdl:part name="part1" element="ns:getDataResponse"/>
    </wsdl:message>
    <wsdl:portType name="WebservicePortType">
        <wsdl:operation name="getData">
            <wsdl:input message="axis2:getDataMessage"/>
            <wsdl:output message="axis2:getDataResponseMessage"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="WebserviceSOAP11Binding" type="axis2:WebservicePortType">
        <soap:binding transport=" http://schemas.xmlsoap.org/soap/http " style="document"/>
        <wsdl:operation name="getData">
            <soap:operation soapAction="urn:getData" style="document"/>
            <wsdl:input>
                <soap:body use="literal" namespace="http://webservice.axis.spirit.com "/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" namespace="http://webservice.axis.spirit.com "/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="WebserviceSOAP12Binding" type="axis2:WebservicePortType">
        <soap12:binding transport=" http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="getData">
            <soap12:operation soapAction="urn:getData" style="document"/>
            <wsdl:input>
                <soap12:body use="literal" namespace=" http://webservice.axis.spirit.com"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal" namespace=" http://webservice.axis.spirit.com"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="Webservice">
        <wsdl:port name="WebserviceSOAP11port" binding="axis2:WebserviceSOAP11Binding">
            <soap:address location="http://localhost:8080/axis2/services/Webservice "/>
        </wsdl:port>
        <wsdl:port name="WebserviceSOAP12port" binding="axis2:WebserviceSOAP12Binding">
            <soap12:address location="http://localhost:8080/axis2/services/Webservice "/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>


The problem is that axis2 uses anyType for the Array and for the return type of my webservice.
Can I just change it to ax21:Data2 or do I have to modify my sourcecode.
The wsdl was generate via commandline:

./java2wsdl.sh -cp . -cn com.spirit.axis.webservice.Webservice -of Test.wsdl

anyone can help me or where is the right place to post questions about axis2 ?

yours

------=_Part_91280_183337.1176976388338--