On Thu February 18 2010 8:39:44 am eax wrote:
> Hi everybody,
> 
> I am new in CXF (but the topic of the web service is not new for me). I am
> trying to write a CXF-WS with wsdl-first mode using CXFNonSpringServlet
> based servlet.
> I started from a wsdl, then I generated the classes. My first problem how
> to set wsdllocation (actually this location is in WebContent/WEB-INF/wsdl
> directory), because this set
> 
> factory.setWsdlLocation(getServletContext().getRealPath("/WEB-INF/wsdl/Echo
> .wsdl")); failed.
> It is very interesting the tns in the starting wsdl is
> targetNamespace="http://ws.test.bme.hu/"; - while the tns gained from the
> working service is targetNamespace="http://service.echo.bme.hu/";  - where
> the packagename of the class implementing the service is
> "hu.bme.echo.service".
> 
> Some help is highly appreciated, thanks.  A.

It sounds like the call to getServletContext().getRealPath(...) is returning 
null and thus the service is being created as a "java first" case and 
generating a new wsdl.   The first thing I would do is debug that part.   Add 
something like:

System.out.println(getServletContext().getRealPath("/WEB-INF/wsdl/Echo.wsdl"))
or something to see that it's finding and such.


-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to