I think I see what the problem is in the code and will commit a fix
shortly. I'll do a new 2.1 snapshot this afternoon. If one of you
could try that at somepoint next week or something to make sure it
works, that would be great.
Dan
On May 7, 2008, at 2:11 PM, Carlos Eduardo Rodrigues de Almeida wrote:
I have a project that is running with CXF-incubator-2.0.6. I decided
to upgrade to the new CXF 2.1.
The project is a java first web service integrated with spring. I´m
able to start the CXFSevlet, list the web services but I´m not able to
make CXF create the WSDL when I access serviceName?WSDL.
I´ve made a small project that has the same issue:
My web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
<display-name>Test</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
WEB-INF/beans.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<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>/Services/*</url-pattern>
</servlet-mapping>
</web-app>
My beans.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<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" />
<bean id="testServiceTarget" class="test.TestServiceImpl"/>
<jaxws:endpoint
id="testService"
implementorClass="test.TestServiceImpl"
implementor="#testServiceTarget"
address="/TestService" />
</beans>
test.TestService:
package test;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService(name="testService", targetNamespace="http://testService"))
public interface TestService {
@WebMethod
public void test();
}
test.TestServiceImpl
package test;
public class TestServiceImpl implements TestService {
@Override
public void test() {
// TODO Auto-generated method stub
}
}
I´m able to deploy the project. The listing of services is shown in
http://localhost:8080/Test/Services but I get an exception while tryng
to get the WSDL in
http://localhost:8080/Test/Services/TestService?wsdl.
PWC1406: Servlet.service() for servlet CXFServlet threw exception
org.apache.cxf.transport.http.WSDLQueryException: Exception occurred
while trying to process
http://localhost:8080/Test/Services/TestService?wsdl
at
org
.apache
.cxf
.transport.http.WSDLQueryHandler.writeResponse(WSDLQueryHandler.java:
229)
at
org
.apache
.cxf
.transport.servlet.ServletController.invoke(ServletController.java:
137)
at
org
.apache
.cxf
.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:
170)
at
org
.apache
.cxf
.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:
152)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org
.apache
.catalina
.core
.ApplicationFilterChain.servletService(ApplicationFilterChain.java:
411)
at
org
.apache
.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
290)
at
org
.apache
.catalina
.core.StandardContextValve.invokeInternal(StandardContextValve.java:
271)
at
org
.apache
.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
202)
at
org
.apache
.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org
.apache
.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at
org
.apache
.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at
org
.apache
.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org
.apache
.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org
.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:
1080)
at
org
.apache
.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
150)
at
org
.apache
.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org
.apache
.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org
.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:
1080)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
272)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter
(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess
(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process
(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
(DefaultReadTask.java:341)
at
com
.sun
.enterprise
.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:
263)
at
com
.sun
.enterprise
.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:
214)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:
265)
at
com
.sun
.enterprise
.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:
106)
Caused by: javax.xml.stream.XMLStreamException: NamespaceURI cannot
be null
at
com
.sun
.xml
.stream
.writers.XMLStreamWriterImpl.writeAttribute(XMLStreamWriterImpl.java:
632)
at org.apache.cxf.staxutils.StaxUtils.writeElement(StaxUtils.java:
520)
at org.apache.cxf.staxutils.StaxUtils.writeElement(StaxUtils.java:
440)
at org.apache.cxf.staxutils.StaxUtils.writeDocument(StaxUtils.java:
421)
at org.apache.cxf.staxutils.StaxUtils.writeDocument(StaxUtils.java:
411)
at org.apache.cxf.staxutils.StaxUtils.writeNode(StaxUtils.java:560)
at
org
.apache
.cxf
.transport.http.WSDLQueryHandler.writeResponse(WSDLQueryHandler.java:
226)
... 31 more
Where can I set the NamesapceURI? Any clue?
Thank you,
Eduardo
Any clue where the problem is?
---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog