Turns out my whole approach was flawed and this is a lot easier than all of the googling I did led me to believe. For anyone else in the same boat, here is the simple version.
1. Look at the existing client code base for the existing, old web service. 2. Get all of the jar files from that project except the wsdl4j-X.X.X.jar and put them in your new project. 3. Generate the client code using the wsdl files from your services, old and new. The wsdl4j-1.6.X from ApacheCXF will be used in place of the older one for the older service and everything should just work. The older service will use the axis.jar and its supporting files and the new service will use what it needs from ApacheCXF. At least that's how it went for me using Eclipse with the ApacheCXF plugin. Not very happy it took 4 days and reading the wsdl and soap standards specs to figure that out, but maybe this will save someone else a whole lot of wasted time and effort. > -----Original Message----- > From: Edward W. Rouse [mailto:[email protected]] > Sent: Friday, May 11, 2012 3:48 PM > To: [email protected] > Subject: Could not find service named > > I have a web app that needs to connect to 2 web services. One is about > 8 years old and was written using Axis 1.0. The second is new and uses > CXF. I connect and consume the CXF web services fine, but am having a > problem with the Axis 1.0 service. Since I can't mix the 2 due to the > axis1 jar file conflicting with the wsdl4j-1.6.2 jar file, I have been > creating a new set of clients to use cxf. The 2 attachments are the > wsdl from the service > (SCLProxy.xml) and the final wsdl file that contains all of the changes > to remove the dependency on rpc encoding. > > I can generate the client code and it looks right to me, but when I try > to call the service I get the following error: > > javax.xml.ws.WebServiceException: Could not find service named > {http://www.comsquared.com/services/SCLProxy}ProxyService in wsdl > http://c2sprod.comsquared.com:8080/c2s-soap- > services/services/SCLProxy?wsdl > at > org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:160) > at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:148) > at > org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImp > l.jav > a:91) > at javax.xml.ws.Service.<init>(Service.java:56) > at > com.c2s.soap.clients.sclproxy.ProxyService.<init>(ProxyService.java:39) > at > com.c2s.fts.stripes.action.LoginActionBean.login(LoginActionBean.java:8 > 1) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja > va:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso > rImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > net.sourceforge.stripes.controller.DispatcherHelper$6.intercept(Dispatc > herHe > lper.java:467) > at > net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionCo > ntext > .java:158) > at > net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.interce > pt(Be > foreAfterMethodInterceptor.java:113) > at > net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionCo > ntext > .java:155) > at > net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionConte > xt.ja > va:74) > at > net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler( > Dispa > tcherHelper.java:465) > at > net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler > (Disp > atcherServlet.java:278) > at > net.sourceforge.stripes.controller.DispatcherServlet.service(Dispatcher > Servl > et.java:160) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic > ation > FilterChain.java:305) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil > terCh > ain.java:210) > at > net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter > .java > :247) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic > ation > FilterChain.java:243) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil > terCh > ain.java:210) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal > ve.ja > va:225) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal > ve.ja > va:169) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato > rBase > .java:472) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav > a:168 > ) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav > a:98) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:92 > 7) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve > .java > :118) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: > 407) > at > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11 > Proce > ssor.java:999) > at > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Ab > strac > tProtocol.java:565) > at > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint. > java: > 309) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut > or.ja > va:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j > ava:9 > 08) > at java.lang.Thread.run(Thread.java:662) > > I use tomcat 7.0, jdk1.6 and Apache cxf 2.5.2. > > I'm not sure how to proceed at this point. The wsdl file from the > service indicates that the service name is ProxyService and when I used > the eclipse web services explorer with that wsdl file, it connected as > I expected. In the new wsdl it uses the same name and yet, I still get > an error that the service was not found. > > Any help would be greatly appreciated. Especially if my whole approach > to getting my project to work with a combination of old and new > services is flawed. > > Edward W. Rouse > Comsquared System, Inc. >
