use org.codehaus.xfire.spring.remoting.XFireExporter to expose webservice, use org.codehaus.xfire.spring.remoting.XFireClientFactoryBean as client,
when the service being invoked, the follow exception thrown:
ERROR-[2006-05-19 00:20:31,562] Fault occurred!
java.lang.IllegalArgumentException: prefix cannot be "null" when creating a QName
at javax.xml.namespace.QName.<init>(QName.java:170)
at com.bea.xml.stream.MXParser.getName(MXParser.java:1439)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:104)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98)
at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:61)
at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:278)
at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:144)
at org.codehaus.xfire.spring.remoting.XFireServletControllerAdapter.handleRequest(XFireServletControllerAdapter.java:63)
at org.codehaus.xfire.spring.remoting.XFireExporter.handleRequest(XFireExporter.java:44)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:723)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:394)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:358)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:154)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
at java.lang.Thread.run(Thread.java:595)
The generated wsdl is as below:
<wsdl:definitions targetNamespace="http://my" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://my" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://holders.rpc.xml.javax" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/">
<wsdl:types>
<xsd:schema targetNamespace="http://my" elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:element name="JustInput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in0" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1"/>
<xsd:element name="in1" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<xsd:element name="in2" type="xsd:float" minOccurs="1" maxOccurs="1"/>
<xsd:element name="in3" type="xsd:double" minOccurs="1" maxOccurs="1"/>
<xsd:element name="in4" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="JustInputResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="InputOutput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in0" type="ns1:StringHolder" nillable="true" minOccurs="1" maxOccurs="1"/>
<xsd:element name="in1" type="ns1:IntHolder" nillable="true" minOccurs="1" maxOccurs="1"/>
<xsd:element name="in2" type="ns1:FloatHolder" nillable="true" minOccurs="1" maxOccurs="1"/>
<xsd:element name="in3" type="ns1:DoubleHolder" nillable="true" minOccurs="1" maxOccurs="1"/>
<xsd:element name="in4" type="ns1:BooleanHolder" nillable="true" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="InputOutputResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xsd:schema targetNamespace="http://holders.rpc.xml.javax" elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:complexType name="StringHolder"/>
<xsd:complexType name="IntHolder"/>
<xsd:complexType name="FloatHolder"/>
<xsd:complexType name="DoubleHolder"/>
<xsd:complexType name="BooleanHolder"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="InputOutputRequest">
<wsdl:part name="parameters" element="tns:InputOutput"/>
</wsdl:message>
<wsdl:message name="JustInputResponse">
<wsdl:part name="parameters" element="tns:JustInputResponse"/>
</wsdl:message>
<wsdl:message name="InputOutputResponse">
<wsdl:part name="parameters" element="tns:InputOutputResponse"/>
</wsdl:message>
<wsdl:message name="JustInputRequest">
<wsdl:part name="parameters" element="tns:JustInput"/>
</wsdl:message>
<wsdl:portType name="MyServicePortType">
<wsdl:operation name="JustInput">
<wsdl:input name="JustInputRequest" message="tns:JustInputRequest"/>
<wsdl:output name="JustInputResponse" message="tns:JustInputResponse"/>
</wsdl:operation>
<wsdl:operation name="InputOutput">
<wsdl:input name="InputOutputRequest" message="tns:InputOutputRequest"/>
<wsdl:output name="InputOutputResponse" message="tns:InputOutputResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyServiceHttpBinding" type="tns:MyServicePortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="JustInput">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="JustInputRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="JustInputResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="InputOutput">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="InputOutputRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="InputOutputResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="MyServiceHttpPort" binding="tns:MyServiceHttpBinding">
<wsdlsoap:address location="http://localhost:8080/TestXFire/service/MyService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Source code are in the attachment.
We'll definitely take a look into this issue. It appears to be due to differences in the stax reference implementation and the woodstox stax implementation we normally use. Please try removing the stax-1.1.x-dev jar from your classpath and adding the woodstox jar from the distribution instead.