On Tuesday 26 October 2010 3:23:40 pm slocum wrote:
> Daniel  Kulp wrote:
> > Check the wsdl to make sure it defines a Service with that name and
> > targetNamespace.    You definitely need to make sure that the wsdl
> > service and
> > port match the names that are used in the @WebService annotation. (and
> > the namespace as well)
> 
> Yes it does.

Not quite:

WSDL:
targetNamespace="http://ws.ppp.abc.com";>


Annotation:
targetNamespace = "http://ws.ppp.abc.com/";)
 
Note the / on the end.  The namespaces are thus considered different.

Dan



> 
> WSDL (ppp-1.0.wsdl):
> 
> <wsdl:definitions
>       name="PPPWebService"
>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>       xmlns:tns="http://ws.cmps.digitalriver.com";
>       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>       xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>       targetNamespace="http://ws.ppp.abc.com";>
> 
>    <wsdl:types>
>               <xsd:schema xmlns="http://ws.ppp.abc.com/";
>                       attributeFormDefault="qualified" 
> elementFormDefault="qualified"
>                       targetNamespace="http://ws.ppp.abc.com";>
> . . .
>               </xsd:schema>
>    </wsdl:types>
> 
> ... message and operation definitions ...
> 
>       <wsdl:service name="PPPWebService">
>               <wsdl:port name="PPPWebServiceHttpPort"
> binding="tns:PPPWebServiceHttpBinding">
>                       <soap:address
> location="http://localhost:8080/ppp-1.0/services/PPPWebService"; />
>               </wsdl:port>
>       </wsdl:service>
> </wsdl:definitions>
> 
> Implementation annotation:
> 
> @WebService(name = "PPPServiceImpl",
>                       serviceName = "PPPWebService",
>                       portName = "PPPWebServiceHttpPort",
>                       wsdlLocation="classpath:ppp-1.0.wsdl",
>                       endpointInterface = 
> "com.abc.ppp.ws.PPPWebServicePortType",
>                       targetNamespace = "http://ws.ppp.abc.com/";)
> public class PPPServiceImpl implements PPPWebServicePortType {
> 
> ...
> 
> }

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to