Hi I have a series of wsdls which I have run through wsdl2java. For example, the following would be generated:
TransformationPort.java <-- Service Interface GeomService.java <-- class that implements "Service" and for client access to the service TransformationPort_GeomService_Server.java <-- Publishes the TransformationPort to an endpoint. Then I would create a TransformationPortImpl.java and flesh out my service, and have the TransformationPort_GeomService_Server.java use that to publish. Now, the GeomService has the @WebServiceClient annotation with a wsdlLocation attribute pointing at the right wsdl. However, TransformationPort lacks the wsdlLocation annotation and thus when the TransformationPort_GeomService_Server publishes it, and someone goes to http://localhost:8080/services/geom/transformation?wsdl, cfx will generate the wsdl based off the annotations on the TransformationPort. I do not want this, I want the original wsdl to be served up to the client. So, if I add the wsdlLocation attribute to the @WebService annotation on TransformationPort that should work right? It does, but with an error because on line 112 of org.apache.cxf.wsdl11.WSDLServiceFactory we have: //and definition is the imported wsdl from the wsdlLocation attribute javax.wsdl.Service wsdlService = definition.getService(serviceName); Which returns null because the serviceName is deemed to be TransformationPortImplService and this throws: throw new ServiceConstructionException(new Message("NO_SUCH_SERVICE_EXC", LOG, serviceName)); An abridged version of the wsdl is: <wsdl:portType name="TransformationPort"> . . . </wsdl:portType> <wsdl:binding name="TransformBinding" type="TransformationPort"> </wsdl:binding> <wsdl:service name="GeomService"> <wsdl:port name="TransformationPort" binding="TransformBinding"> <soap:address location="http://localhost:8080/services/geom/transformation"/> </wsdl:port> </wsdl:service> If anyone can lead me to where I have gone astray that would be great. What would I have to do to get this up and running without cxf generating my wsdl when a user requests from ?wsdl ? Thanks. Craig.
