Announcement Announcement Module
Collapse
No announcement yet.
Setting style to XFireExporter not working? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting style to XFireExporter not working?

    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:

    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>
    spring-ws-servlet.xml:
    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>
    With the above configuration, the ws is exposed as a document/literal wrapped ws (default XfireExporter's conf.).

    In XFireExporter's javadoc, I found that there are setter methods for style and use, so I modified "/RetailerService" to show:
    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>
    ...
    but still the WSDL was document/literal wrapped.
    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.

  • #2
    Well, I managed to make a rpc-style ws with spring and CXF by following this post:
    http://joemorrison.org/blog/2008/10/23/cxf-wsdl-first/

    I wasn't able, however, to set the style and use as asked in the post.
    Regards,
    JP

    Comment

    Working...
    X