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 Harm de Laat <ha...@ciber.nl> on 2005/01/19 15:13:40 UTC

Java2Wsdl issue

Hi Guys,
 
I have used Java2WSDL to generate my .wsdl file. 
 
I have succesfully deployed my WSDL, using deploy.wsdd. And I have copied my classes to the WEB-INF/classes dir. 
 
If I call: http://localhost:8080/axis/services/PersonService?wsdl
 
I get the following output:
 
  

Sorry, something seems to have gone wrong... here are the details:

Fault - ; nested exception is: 
	WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 'http://nl.ciber.test.person'. Namespace prefixes must be set on the Definition object using the addNamespace(...) method.: 

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 'http://nl.ciber.test.person'. Namespace prefixes must be set on the Definition object using the addNamespace(...) method.: 
 faultActor: 
 faultNode: 
 faultDetail: 

This is the WSDL I'm using:
 
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://nl.ciber.ws" 
 xmlns="http://schemas.xmlsoap.org/wsdl/" 
 xmlns:apachesoap="http://xml.apache.org/xml-soap" 
 xmlns:impl="http://nl.ciber.ws" 
 xmlns:intf="http://nl.ciber.ws" 
 xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
 xmlns:tns1="http://nl.ciber.test.person" 
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
 xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 >
 <wsdl:types>
 <schema targetNamespace="http://nl.ciber.test.person" 
  xmlns="http://www.w3.org/2001/XMLSchema">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
  <complexType name="Person">
   <sequence>
    <element name="address" nillable="true" type="xsd:string"/>
    <element name="country" nillable="true" type="xsd:string"/>
    <element name="name" nillable="true" type="xsd:string"/>
    <element name="city" nillable="true" type="xsd:string"/>
    <element name="zipcode" nillable="true" type="xsd:string"/>
   </sequence>
  </complexType>
 </schema>
 </wsdl:types>
   <wsdl:message name="addPersonRequest">
      <wsdl:part name="in0" type="tns1:Person"/>
   </wsdl:message>
   <wsdl:message name="addPersonResponse">
   </wsdl:message>
   <wsdl:portType name="PersonService">
      <wsdl:operation name="addPerson" parameterOrder="in0">
         <wsdl:input message="impl:addPersonRequest" name="addPersonRequest"/>
         <wsdl:output message="impl:addPersonResponse" name="addPersonResponse"/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="PersonServiceSoapBinding" type="impl:PersonService">
      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="addPerson">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="addPersonRequest">
            <wsdlsoap:body namespace="http://nl.ciber.ws" use="literal"/>
         </wsdl:input>
         <wsdl:output name="addPersonResponse">
            <wsdlsoap:body namespace="http://nl.ciber.ws" use="literal"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="PersonServiceService">
      <wsdl:port binding="impl:PersonServiceSoapBinding" name="PersonService">
         <wsdlsoap:address location="http://localhost:8080/axis/services/PersonService"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>

Any help would be greatly appreciated.
 
Regards,
 
 
Harm de Laat
Ciber Java Consultant
The Netherlands