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