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
