Hi,
few general suggestions, this does not seems a CXF issue at all, just a matter of proper integration configuration: - move to the latest available jbossws-cxf version (3.3.1.GA), also considering that has the latest fix/improvements released with Apache CXF 2.2.9 - yes, you're right in removing the cxf-*.jar from your deployment if jbossws-cxf stack is installed in JBoss AS - you do not need to provide any context listener configuration pointing to jbossws-cxf.xml, the integration layer automatically scans for jbossws-cxf.xml if available and uses that to enrich the cxf bus
- take a look at the testcases in the jbossws-cxf source distribution

Cheers
Alessio

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



--
Alessio Soldano
Web Service Lead, JBoss

Reply via email to