You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kashif Ahmed Qazi <ka...@etilizepak.com> on 2008/05/13 08:50:41 UTC

Migrating services from Xfire to CXF

Hi,

I 'm migrating my services from XFire to CXF and facing some the service 
is generating the wsdl but webservice client are unable to use it
i have tested it with soapui but it is also unable to use it with soapui.

below is given service.xml and cxf.xml can any one point me where i'm 
making mistake to convert service.xml to cxf.xml

*Service.xml*

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
   <bean id="AccountManagementService" 
class="com.etilize.spexlive.service.account.AccountManagementImpl" />
   
    <bean id="CatalogManagementService" 
class="com.etilize.spexlive.service.catalog.CatalogManagementImpl" />

    <service>
        <serviceBean>#AccountManagementService</serviceBean>
        <serviceFactory>#jaxbServiceFactory</serviceFactory>
        <schemas>
            <schema>META-INF/schema/account.xsd</schema>
        </schemas>
        <style>document</style>
    </service>
   
    <service>
        <serviceBean>#CatalogManagementService</serviceBean>
        <serviceFactory>#jaxbServiceFactory</serviceFactory>
        <schemas>
            <schema>META-INF/schema/catalog.xsd</schema>
        </schemas>
        <style>document</style>
    </service>

    <bean name="jaxbServiceFactory"
        class="org.codehaus.xfire.jaxb2.JaxbServiceFactory">
        <constructor-arg ref="xfire.transportManager" />
    </bean>
</beans>

*cxf.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="dataBinding" class="org.apache.cxf.jaxb.JAXBDataBinding"/>
   
  <bean id="serviceFactory" 
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
         <property name="dataBinding" ref="dataBinding" />
         <property name="serviceConfigurations">
             <list>
                 <bean 
class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
                 <bean 
class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration" />
                 <bean 
class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
             </list>
         </property>
     </bean> 

  <jaxws:endpoint id="AMService"
                  
implementor="com.etilize.spexlive.service.account.AccountManagementImpl"
                  address="/AccountConsoleService">

    <jaxws:schemaLocations>
         <jaxws:schemaLocation>
             classpath:META-INF/schema/account.xsd
         </jaxws:schemaLocation>
     </jaxws:schemaLocations>
      <!--
     <jaxws:dataBinding>
      <bean class="org.apache.cxf.jaxb.JAXBDataBinding">
       <property name="contextProperties">
            <map>
               <entry>
                  
<key><value>com.sun.xml.bind.defaultNamespaceRemap</value></key>
                  <value>uri:ultima:thule</value>
               </entry>
              </map>
        </property>
        
      </bean>
     
      </jaxws:dataBinding>
      -->
      <jaxws:serviceFactory>
             <ref bean="serviceFactory" />
      </jaxws:serviceFactory>
     <!--
    <jaxws:inInterceptors>
      <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
      <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
        <constructor-arg>
          <map>
            <entry key="action" value="UsernameToken" />
            <entry key="passwordType" value="PasswordDigest" />
            <entry key="passwordCallbackClass" 
value="com.etilize.spexlive.service.security.ServerPasswordCallback" />
          </map>
        </constructor-arg>
      </bean>
    </jaxws:inInterceptors>
     -->

  </jaxws:endpoint>

</beans>

*