I use CXF 2.7 and tomcat 7. I have create a web project with eclipse Juno that expose some web services. After deployment on tomcat i get wsdl from browser and all looks fine.
Then i create a second web project that is the consumer and i deploy it on tomcat. When i try to call any web service from consumer i get the following error:
javax.xml.ws.WebServiceException: Could not find service named {http://service.example.com/}UserSrvImpl in wsdl http://xxxx:8088/TaxisNetTestUI/services/UserSrvImplPort?wsdl
My service call example is:
UserSrvImpl service = new UserSrvImpl();
UserSrvImplPortType client = service.getUserSrvImplPort();
client.register(ObjetValue);
What going wrong ?
My wsdl is: WSDL FILE
I guess you need
UserSrv service = new UserSrvImpl();
UserSrvImplPortType client = service.getUserSrvImplPort();
client.register(ObjetValue);
Use interfase instead of implementation class as link
I create again the web services, but this time i create manually my interface. I create a class that iplements this interface and then i create the web service and all works fine!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.