Hi everybody.
I'm trying to expose a leacy rpc/literal ws via Spring+Xfire.
I started with just exposing the web service, and everything went fine.
I followed the configuration steps shown by various available tutorials and books and ended up with the following configuration.
web.xml:
spring-ws-servlet.xml:Code:<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>spring-ws</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>spring-ws</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:org/codehaus/xfire/spring/xfire.xml </param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> </web-app>
With the above configuration, the ws is exposed as a document/literal wrapped ws (default XfireExporter's conf.).Code:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oxm="http://www.springframework.org/schema/oxm" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="retailerEndpoint" class="com.mycompany.hr.retailer.ws.RetailerEndpoint"> <constructor-arg ref="retailerService"/> </bean> <bean id="retailerService" class="com.mycompany.hr.retailer.RetailerService_Impl"/> <bean name="/RetailerService" class="org.codehaus.xfire.spring.remoting.XFireExporter"> <property name="xfire" ref="xfire" /> <property name="serviceBean" ref="retailerEndpoint" /> <property name="serviceInterface" value="com.mycompany.hr.retailer.RetailerPortType" /> </bean> </beans>
In XFireExporter's javadoc, I found that there are setter methods for style and use, so I modified "/RetailerService" to show:
but still the WSDL was document/literal wrapped.Code:... <bean name="/RetailerService" class="org.codehaus.xfire.spring.remoting.XFireExporter"> <property name="xfire" ref="xfire" /> <property name="style" value="rpc" /> <property name="use" value="literal" /> <property name="serviceBean" ref="retailerEndpoint" /> <property name="serviceInterface" value="com.mycompany.hr.retailer.RetailerPortType" /> </bean> ...
I googled around and found that there is a "wsdlURL" property in which to specify a pre-existent WSDL file (with the file:///location/to/wsdl format), but this property is also being ignored.
I would like to specify the wsdl for XFire to use, but I would also like to know why are the style and use properties being ignored.
Can anyone give me any pointers on this?.
Thanks in advance.


Reply With Quote