You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Norio Sasagawa <n-...@ka2.so-net.ne.jp> on 2009/06/05 18:12:12 UTC

I can not resolve "DefaultNamespace" problem.

Dear All,

I want to send and receive my own class.
I tried, but it's failed according "DefaultNamespace".
I made two java files, and compiled them.
There's no problem.
WSAL2Java command was successfully done.
But when compiling four java files by javac, errors are occurred.
It says "DefaultNamespace is not defined".
What's wrong?
Reproduce process is as follows.

(1)Make two java files, TTest.java and RReturnInfo.java on %AXIS_HOME%.
(2)Compile them.
(3)Verify there's no problem.
(4)Copy them to %TOMCAT_HMOE%\webapps\axis.
(5)Compile them.
(6)Verify there's no problem.
(7)Launch TOMCAT server.
(8)Access to http://localhost:8080/axis/TTest.jws.
(9)Verify there's problems saying RReturnInfo not defined.
(10)Copy RReturnInfo.java to %TOMCAT_HOME%\webapps\axis\WEB-INF\classes.
(11)Compile it.
(12)Verify there's no problem.
(13)Again access to http://localhost:8080/axis/TTest.jws.
(14)Verify wsdl is displayed.
(15)Go back to %AXIS_HOME%.
(16)Run "java org.apache.axis.wsdl.Java2WSDL -o TTest.wsdl -l http://localhost:8080/axis/TTest.jws".
(17)Verify that RReturnInfo.java is created on %AXIS_HOME%\DefaultNamespace.
(18)Compile it.
(19)Verify there's no problem.
(20)Verify that four TTest*.java files are created on %AXIS_HOME%\ocalhost\axis\TTest_jws.
(21)Compile them.
(22)There's seven errors "DefaultNamespace is not defined".

Any help would be appreciated.
Thanks in advance.

Norio Sasagawa

-----<<<<<TTest.java Start>>>>>-----
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 Start>>>>>-----
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>>>>>-----
-----<<<<<http://localhost:8080/axis/TTest.jws?wsdl Start>>>>>-----
  <?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions targetNamespace="http://localhost:8080/axis/TTest.jws" 
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/axis/TTest.jws" 
xmlns:intf="http://localhost:8080/axis/TTest.jws" 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.2.1
Built on Jun 14, 2005 (09:15:57 EDT)によって生成されました / [en]-(WSDL created by Apache Axis version: 1.2.1
Built on Jun 14, 2005 (09:15:57 EDT))

  --> 
- <wsdl:types>
- <schema targetNamespace="http://localhost:8080/axis/TTest.jws" xmlns="http://www.w3.org/2001/XMLSchema">
  <import namespace="http://DefaultNamespace" /> 
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> 
- <complexType name="ArrayOf_xsd_string">
- <complexContent>
- <restriction base="soapenc:Array">
  <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]" /> 
  </restriction>
  </complexContent>
  </complexType>
  </schema>
- <schema targetNamespace="http://DefaultNamespace" xmlns="http://www.w3.org/2001/XMLSchema">
  <import namespace="http://localhost:8080/axis/TTest.jws" /> 
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> 
- <complexType name="RReturnInfo">
- <sequence>
  <element name="result" nillable="true" type="xsd:string" /> 
  <element name="returnDetail" nillable="true" type="impl:ArrayOf_xsd_string" /> 
  </sequence>
  </complexType>
  </schema>
  </wsdl:types>
- <wsdl:message name="TTestResponse">
  <wsdl:part name="TTestReturn" type="tns1:RReturnInfo" /> 
  </wsdl:message>
  <wsdl:message name="TTestRequest" /> 
- <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="http://DefaultNamespace" 
use="encoded" /> 
  </wsdl:input>
- <wsdl:output name="TTestResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://localhost:8080/axis/TTest.jws" 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>
-----<<<<<http://localhost:8080/axis/TTest.jws?wsdl End>>>>>-----