On Wednesday 16 March 2011 5:09:11 PM Sonam Nepali wrote:
> Right now, I can't post the wsdl because of privacy issues.  But I did try
> the wsdlLocation as in the following:
> 
> <jaxws:endpoint id="PersonEndpoint" implementor="a.b.PersonImpl"
>       endpointName="e:PersonEN" serviceName="s:PersonSN"
>              address="/Person"
> xmlns:e="http://service.jaxws.cxf.apache.org/endpoint";
> xmlns:s="http://service.jaxws.cxf.apache.org/service";
> wsdlLocation="WEB-INF/Person.wsdl"/>
> 
> On deployment on Weblogic, I get the following excpetions:

The xmlns:e and xmlns:s declarations need to match the namespaces in the WSDL.  
 
Most likely, you just need one of them and it should match the targetNamespace 
of the wsdl. 

Dan



> 
> ...
> Caused by: javax.xml.ws.WebServiceException:
> org.apache.cxf.service.factory.ServiceConstructionException: Could not
> find definition for service
> {http://service.jaxws.cxf.apache.org/service}Person. at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:343) at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239) at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:489)
> 
> 
> 
> I will try with a simple wsdl and see if it can be reproduced there as
> well.
> 
> thanks
> 
> Sonam Nepali
> 
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:[email protected]]
> Sent: Wednesday, March 16, 2011 3:02 PM
> To: [email protected]
> Cc: Sonam Nepali
> Subject: Re: Exposing the Original Wsdl instead of the implementation in
> Jaxws-endpoint
> 
> On Wednesday 16 March 2011 4:41:40 PM Sonam Nepali wrote:
> > Hi
> > 
> > I have generated Java stubs from a Person.wsdl.   I implemented the
> > interface and is exposed as Apache CXF web service.  However, I want to
> > expose the original Wsdl that I started from, Person.wsdl.  Is there a
> > way to do that?
> > 
> > Right now I have the following configuration:
> >       <jaxws:endpoint id="PersonEndpoint"
> >       
> >             implementor="a.b.PersonImpl"
> >             endpointName="e: PersonEN" serviceName="s:PersonSN"
> >             address="/Person"
> > 
> > xmlns:e="http://service.jaxws.cxf.apache.org/endpoint";
> > xmlns:s="http://service.jaxws.cxf.apache.org/service"/>
> 
> You likely need to add a wsdlLocation="/WEB-INF/wsdl/person.wsdl" attribute
> to that to have it grab the original wsdl and schemas.   Without that,
> it's likely generating a new WSDL/schema from the classes.
> 
> > But with this configuration, when I try to build a SoapUI project using
> > the hosted wsdl (http://localhost:7001/mywar/Person?wsdl) url I get the
> > following error on server-side:
> > 
> > 
> > Caused by: javax.wsdl.WSDLException: WSDLException:
> > faultCode=OTHER_ERROR: Can't find prefix for
> > 'http://www.w3.org/2007/05/addressing/metadata'. Namespace prefixes must
> > be set on the Definition object using the addNamespace(...) method.
> 
> How reproducible is that?   If you can create a small test case that shows
> that error, that would be great.
> 
> > I looked at the exposed Wsdl that's accessible at web-app context such as
> > http://localhost:7001/mywar/Person?wsdl and noticed that there are no
> > references to the internal XSD's that I have in the original wsdl.
> > 
> > 
> > Thanks
> > 
> > Sonam Nepali

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

Reply via email to