I'm testing our upgrade from XFire 1.2.6 to CXF 2.1-SNAPSHOT and it
seems there is some additional wrapping of the message body requests and
responses for our services.  Under XFire, a request coming from the
XFire client libraries (XFireProxyFactory using JaxbServiceFactory)
looks like such:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
        <soap:Body>
                <RetrRefTc
                        xmlns="http://taws.kronos.com/services/MobileService"; />
        </soap:Body>
</soap:Envelope>

Under CXF (using JaxWsProxyFactoryBean):

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
        <soap:Body>
                <ns1:retrRefTc
                        xmlns:ns1="http://mobile.services.taws.kronos.com/";>
                        <RetrRefTc
                                
xmlns="http://taws.kronos.com/services/MobileService"; />
                </ns1:retrRefTc>
        </soap:Body>
</soap:Envelope>

FYI, the actual java implementation's method name is retrRefTc, so I
think that's where this wrapping name is coming from.

The responses are such, first the XFire response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
        <soap:Body>
                <RetrRefTcResp
                        xmlns="http://taws.kronos.com/services/MobileService";>
                </RetrRefTcResp>
        </soap:Body>
</soap:Envelope>

Then the CXF response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
        <soap:Body>
                <ns1:RetrRefTcResponse
                        
xmlns:ns1="http://taws.kronos.com/services/MobileService";>
                        <RetrRefTcResp
                                
xmlns="http://taws.kronos.com/services/MobileService";>
                        </RetrRefTcResp>
                </ns1:RetrRefTcResponse>
        </soap:Body>
</soap:Envelope>

Again, you can see CXF is wrapping the response with a RetrRefTcResponse
element.

Here are the two Spring configurations.

First XFire:

        <bean id="tawsMobileService"
                class="org.codehaus.xfire.spring.ServiceBean">
                <property name="serviceBean" ref="tawsMobileServiceImpl" />
                <property name="serviceFactory" ref="xfire.jaxbServiceFactory" 
/>
                <property name="style" value="document" />
                <property name="inHandlers">
                        <list>
                                <ref bean="domInHandler" />
                                <ref bean="wss4jHandler" />
                                <ref bean="authenticationHandler" />
                        </list>
                </property>
                <property name="schemas">
                        <list>
                                
<value>com/kronos/taws/services/mobile/MobileService.xsd</value>
                        </list>
                </property>
        </bean>

Now CXF:

        <jaxws:endpoint id="tawsMobileService"
implementor="#tawsMobileServiceImpl" name="MobileService" 
                address="/MobileService">
                <jaxws:inInterceptors>
                        <ref bean="wss4jInterceptor"/>
                        <ref bean="saajInterceptor" />
                        <ref bean="wsAuthenticationInterceptor"/>
                </jaxws:inInterceptors>
                <jaxws:schemaLocations>

<jaxws:schemaLocation>classpath:com/kronos/taws/services/mobile/MobileService.xsd</jaxws:schemaLocation>
                </jaxws:schemaLocations>
        </jaxws:endpoint>

This wrapping behavior is not desired.  If there is configuration
somewhere to keep this from happening, please let me know.

As I've stated at the top of the post, we have not changed ANY of our
java code, merely the configuration in Spring.  

Reply via email to