Dear All, I've done. I've received my own class from Web server. Reproduce process is as follows. Is this a correct behavior? I want to have the evidence. Any document or home page would be appreciated. Thanks in advance.
-----<<<<<Reproduce Process>>>>>----- (1)make D:\WT-T6TEST folder. (2)make src and classes folder under it. (3)make two java files into src foler, TTest.java and RReturnInfo.java. (4)go to src folder. (6)compile them by "javac -d ../classes -encoding utf-8 TTest.java". (7)verify that two class files are made in classes folder. (8)go to classes folder. (9)make wsdl by "java org.apache.axis.wsdl.Java2WSDL -o ..\TTest.wsdl -n urn:myCompany.co.jp -l http://localhost:8080/axis/TTest.jws TTest". (10)verify that the TTest.wsdl is made on D:\WT-T6TEST folder. (11)go to D:\WT-T6TEST floder. (12)make java files by "java org.apache.axis.wsdl.WSDL2Java -o src -p jp.co.myCompany -s TTest.wsdl". (13)verify that eight fiels are made on src\jp\co\myCompany folder. (14)go to src folder. (15)compile them by "javac -d ../classes -encoding utf-8 jp\co\myCompany\*.java". (16)verify that six files are made on classes\jp\co\myCompany foler. (17)make one java files into src folder, TTestClient.java. (18)compile it by "javac -d ../classes -encoding utf-8 TTestClient.java". (19)verify that the TTestClient.class is made on classes folder. (20)copy jp folder in the classes folder. (21)paste it to %TOMCAT_HOME%\webapps\axis\WEB-INF\classes folder. (22)copy TTest.java on src folder. (23)paste it to %TOMCAT_HOME%\webapps\axis. (24)rename TTest.java to TTest.jws. (25)open the TTest.jws by a text editor. (26)put "import jp.co.myCompany.RReturnInfo;" into the TTest.jws head. (27)launch the TOMCAT. (28)go back to classes folder. (29)run "java TTestClient". (30)verify that the return values are displayed correctly. -----<<<<<Reproduce Process End>>>>>----- -----<<<<<TTest.java>>>>>----- public class TTest { public RReturnInfo TTest(){ String rretString1 = new String("success"); String[] rretString2 = new String[2]; rretString2[0] = new String("detail-1"); rretString2[1] = new String("detail-2"); RReturnInfo rReturnInfo = new RReturnInfo(rretString1, rretString2); return rReturnInfo; } } -----<<<<<TTest.java End>>>>>----- -----<<<<<RReturnInfo.java>>>>>----- public class RReturnInfo implements java.io.Serializable { private java.lang.String result; private java.lang.String[] returnDetail; public RReturnInfo() { } public RReturnInfo( java.lang.String result, java.lang.String[] returnDetail) { this.result = result; this.returnDetail = returnDetail; } /** * Gets the result value for this RReturnInfo. * * @return result */ public java.lang.String getResult() { return result; } /** * Sets the result value for this RReturnInfo. * * @param result */ public void setResult(java.lang.String result) { this.result = result; } /** * Gets the returnDetail value for this RReturnInfo. * * @return returnDetail */ public java.lang.String[] getReturnDetail() { return returnDetail; } /** * Sets the returnDetail value for this RReturnInfo. * * @param returnDetail */ public void setReturnDetail(java.lang.String[] returnDetail) { this.returnDetail = returnDetail; } } -----<<<<<RReturnInfo.java End>>>>>----- -----<<<<<TTestClient.java>>>>>----- import jp.co.myCompany.RReturnInfo; import jp.co.myCompany.TTest_PortType; import jp.co.myCompany.TTestService; import jp.co.myCompany.TTestServiceLocator; public class TTestClient { public static void main(String[] args) throws Exception { TTestService service = new TTestServiceLocator(); TTest_PortType test = service.getTTest(); RReturnInfo receRReturnInfo = test.TTest(); System.out.println("receRReturnInfo.getResult = " + receRReturnInfo.getResult()); System.out.println("receRReturnInfo.getReturnDetail().length = " + receRReturnInfo.getReturnDetail().length); for(int i = 0; i < receRReturnInfo.getReturnDetail().length; i++){ System.out.println("receRReturnInfo.getReturnDetail()[i] = " + receRReturnInfo.getReturnDetail()[i]); } } } -----<<<<<TTestClient.java End>>>>>----- -----<<<<<TTest.wsdl>>>>>----- <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="urn:myCompany.co.jp" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:myCompany.co.jp" xmlns:intf="urn:myCompany.co.jp" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://DefaultNamespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!--WSDLはApache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)によって生成されました / [en]-(WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT))--> <wsdl:types> <schema targetNamespace="urn:myCompany.co.jp" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://DefaultNamespace"/> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="ArrayOf_soapenc_string"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:string[]"/> </restriction> </complexContent> </complexType> </schema> <schema targetNamespace="http://DefaultNamespace" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="urn:myCompany.co.jp"/> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="RReturnInfo"> <sequence> <element name="result" nillable="true" type="soapenc:string"/> <element name="returnDetail" nillable="true" type="impl:ArrayOf_soapenc_string"/> </sequence> </complexType> </schema> </wsdl:types> <wsdl:message name="TTestRequest"> </wsdl:message> <wsdl:message name="TTestResponse"> <wsdl:part name="TTestReturn" type="tns1:RReturnInfo"/> </wsdl:message> <wsdl:portType name="TTest"> <wsdl:operation name="TTest"> <wsdl:input message="impl:TTestRequest" name="TTestRequest"/> <wsdl:output message="impl:TTestResponse" name="TTestResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="TTestSoapBinding" type="impl:TTest"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="TTest"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="TTestRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:myCompany.co.jp" use="encoded"/> </wsdl:input> <wsdl:output name="TTestResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:myCompany.co.jp" use="encoded"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="TTestService"> <wsdl:port binding="impl:TTestSoapBinding" name="TTest"> <wsdlsoap:address location="http://localhost:8080/axis/TTest.jws"/> </wsdl:port> </wsdl:service> </wsdl:definitions> -----<<<<<TTest.wsdl End>>>>>-----