This works for me with spring and latest cxf under jboss 4.3 EAP:

applicationContext.xml:
....
 <jaxws:server 
      id="tmfService" 
      start="true"
      serviceClass="com.bskyb.tmf.services.core.TmfCorePort"
      serviceBean="#tmfBean"
      serviceName="tmf-services-core:estaskService"
      transportId=""
      address="/estask"
      xmlns:tmf-services-core="http://tmf.bskyb.com/services/core";
      wsdlLocation="classpath:estask.wsdl"
      bus="cxf">
       <jaxws:properties>
                         <entry key="schema-validation-enabled" value="true"/>
                </jaxws:properties>
      </jaxws:server>
...

web.xml:

  <listener>
       
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>
                        /WEB-INF/applicationContext.xml
      </param-value>
</context-param>
        <servlet>
                <servlet-name>CXFServlet</servlet-name>
                <servlet-class>
org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
                <servlet-name>CXFServlet</servlet-name>
                <url-pattern>/*</url-pattern>
        </servlet-mapping>
....

However, If you deploy your own libraries to jboss, they are likely to be
conflicting with those already bundled. Which is a case with cxf. You need
properly isolate classloader of your application form the jboss system one. 


cvora wrote:
> 
> Hi all
> 
> I'm trying to get the sample application from 
> http://www.ibm.com/developerworks/java/library/j-jws13.html here  to work
> on JBoss ESB 5.0.0RC1 with Apache CXF integration (jbossws-cxf-3.2.2.GA).  
> 
> I could get it to work using CXF servlet (after a few tweaks which took me
> some time to figure out).
> 
> But when I try to use jbossws-cxf.xml to configure the webservice, I get
> the error:
> 
> org.springframework.beans.TypeMismatchException: Failed to convert
> property value of type [org.jboss.wsf.stack.cxf.InvokerJSE] to required
> type [org.apache.cxf.service.invoker.Invoker] for property 'invoker';
> nested exception is java.lang.IllegalArgumentException: Cannot convert
> value of type [org.jboss.wsf.stack.cxf.InvokerJSE] to required type
> [org.apache.cxf.service.invoker.Invoker] for property 'invoker': no
> matching editors or conversion strategy found
> 
> These are the changes I made to use the JBoss-CXF integration.
> 
> * removed cxf-servlet.xml from war WEB-INF and replaced with
> jbossws-cxf.xml
> 
> * changed web.xml to point to jbossws-cxf.xml thus
> 
>   <listener>
>    
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>   </listener>
>   <context-param>
>     <param-name>contextConfigLocation</param-name>
>     <param-value>WEB-INF/jbossws-cxf.xml</param-value>
>   </context-param>
> 
> 
> * commented out all references to CxfServlet from web.xml
> 
> 
> Here is the jbossws-cxf.xml file:
> 
> <beans
>   xmlns='http://www.springframework.org/schema/beans'
>   xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>   xmlns:beans='http://www.springframework.org/schema/beans'
>   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'>
> 
>   <!-- one or more jaxws:endpoint POJO declarations -->
>   <jaxws:endpoint
>     id='Processor'
>     address='http://localhost:8080/cxf-library-username'
>     wsdlLocation="WEB-INF/wsdl/library-username.wsdl"
>     implementor='com.sosnoski.ws.library.cxf.CXFLibraryImpl'>
>       <jaxws:properties>
>         <entry key="ws-security.callback-handler"
>             value="com.sosnoski.ws.library.cxf.ServerCallback"/>
>       </jaxws:properties>
> 
>     <jaxws:invoker>
>       <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
>     </jaxws:invoker>
>   </jaxws:endpoint>
> 
> </beans>
> 
> 
> Would appreciate any help as I can't figure out why this is not working.
> 
> Note: I also tried one other thing: I removed all the spring*.jar and
> cxf*.jar from the lib directory of the war figuring the CXF layer should
> take care of that. That resulted in a different error:
> javax.xml.ws.WebServiceException:
> org.apache.cxf.service.factory.ServiceConstructionException: Failed to
> create service
> 
> Caused by: javax.wsdl.WSDLException: WSDLException:
> faultCode=PARSER_ERROR: java.lang.IllegalArgumentException: InputSource
> must have a ByteStream or CharacterStream
> 
> 
> Thanks in advance for any help!
> CV
> 
> 

-- 
View this message in context: 
http://old.nabble.com/JBoss-CXF-integration-%3A-org.springframework.beans.TypeMismatchException-in-sample-webservice-tp28879980p28887053.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to