Perhaps a WSDL-first tutorial[1] would be better for you first time around. Note #3 at the bottom of [1] gives more information on WSDL URLs from servlet containers.
HTH, Glen [1] http://www.jroller.com/gmazza/date/20080417 On Tue, 2008-07-08 at 16:39 -0700, Sven Haiges wrote: > Hi all, > > I would like to use CXF to export a SOAP-based endpoint and was using the > Spring HowTo to get started. Unfortunately I am hitting some issues and > would be very thankful if some epxerienced users could come up with some > potential problems / what I am doing wrong. > > I followed this Tutorial: > > http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html > > My service interface is this: > > package com.yahoo.cl.madness.api; > > import javax.jws.WebParam; > import javax.jws.WebService; > > @WebService > public interface HelloWorld { > String sayHi(@WebParam(name="text") String text); > } > > > The implementation: > > package com.yahoo.cl.madness.api; > > import javax.jws.WebService; > > @WebService(endpointInterface = "com.yahoo.cl.madness.api.HelloWorld", > serviceName = "HelloWorld") > public class HelloWorldImpl implements HelloWorld { > > public String sayHi(String text) { > return "Hello " + text; > } > } > > The endpoint CXF servlet is configured to listen to /soap/*: > in web.xml > > <servlet> > <servlet-name>CXFServlet</servlet-name> > <servlet-class> > org.apache.cxf.transport.servlet.CXFServlet > </servlet-class> > <load-on-startup>1</load-on-startup> > </servlet> > > <servlet-mapping> > <servlet-name>CXFServlet</servlet-name> > <url-pattern>/soap/*</url-pattern> > </servlet-mapping> > > In one of the spring config xml files I the specify an endpoint like this: > > <!-- WS --> > <import resource="classpath:META-INF/cxf/cxf.xml" /> > <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> > <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> > > <jaxws:endpoint > id="helloWorld" > implementor="com.yahoo.cl.madness.api.HelloWorldImpl" > address="/HelloWorld" /> > > As per documentation /HelloWorld will dynamically be configured to the > server's host name and the webapp name. So the url of the endpoint should > be: > http://localhost:8080/madness/soap/HelloWorld > > When I call this, I can see this in the logs: > > Jul 8, 2008 4:10:58 PM org.apache.cxf.transport.servlet.ServletController > invoke > WARNING: Can't find the the request for > http://localhost:8080/madness/soap/HelloWorld's Observer > > I was trying to get to the WSDL of the service by adding ?wsdl to the URL > above, but it does not work. > > --- > > I was further trying to create a client for that service in the same > application just for testing. I assume because the URL to the service is > wrong, this failed. > > Can anyone help me to figure out what part I have done wrong? How would I > then test the basic service without a service client? Append ?wsdl to see if > a wsdl can be generated? > > Thanx, > Sven > > >
