title: how to deploy apachel cxf to websphere application server
body: <p>i created a sample apache cxf SOAP webservices, following the tutorial <a href="http://camel.apache.org/tutorial-example-reportincident.html" rel="nofollow noreferrer">here</a></p>
  
  <p>i'm able to run on tomcat 9 via eclipse neon and access it at <a href="http://localhost:8080/camel-example-reportincident/webservices/incident?wsdl" rel="nofollow noreferrer">http://localhost:8080/camel-example-reportincident/webservices/incident?wsdl</a>.</p>
  
  <p>i installed and started it on websphere, but i can't access it on the same url. i also tried all other ports listed in default host alias.</p>
  
  <p>my maven libraries:
  <a href="https://i.stack.imgur.com/VSCUL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VSCUL.png" alt="enter image description here"></a></p>
  
  <p>here is my wsdl:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"    xmlns:tns="http://reportincident.example.camel.apache.org" xmlns:xs="http://www.w3.org/2001/XMLSchema"  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"    targetNamespace="http://reportincident.example.camel.apache.org"&gt;
  
      &lt;!-- Type definitions for input- and output parameters for webservice
  --&gt;     &lt;wsdl:types&gt;        &lt;xs:schema targetNamespace="http://reportincident.example.camel.apache.org"&gt;            &lt;xs:element name="inputReportIncident"&gt;
                  &lt;xs:complexType&gt;
                      &lt;xs:sequence&gt;
                          &lt;xs:element type="xs:string" name="incidentId" /&gt;
                          &lt;xs:element type="xs:string" name="incidentDate" /&gt;
                          &lt;xs:element type="xs:string" name="givenName" /&gt;
                          &lt;xs:element type="xs:string" name="familyName" /&gt;
                          &lt;xs:element type="xs:string" name="summary" /&gt;
                          &lt;xs:element type="xs:string" name="details" /&gt;
                          &lt;xs:element type="xs:string" name="email" /&gt;
                          &lt;xs:element type="xs:string" name="phone" /&gt;
                      &lt;/xs:sequence&gt;
                  &lt;/xs:complexType&gt;           &lt;/xs:element&gt;           &lt;xs:element name="outputReportIncident"&gt;
                  &lt;xs:complexType&gt;
                      &lt;xs:sequence&gt;
                          &lt;xs:element type="xs:string" name="code" /&gt;
                      &lt;/xs:sequence&gt;
                  &lt;/xs:complexType&gt;           &lt;/xs:element&gt;       &lt;/xs:schema&gt;    &lt;/wsdl:types&gt;
  
      &lt;!-- Message definitions for input and output --&gt;   &lt;wsdl:message name="inputReportIncident"&gt;       &lt;wsdl:part name="parameters" element="tns:inputReportIncident" /&gt;   &lt;/wsdl:message&gt;     &lt;wsdl:message name="outputReportIncident"&gt;      &lt;wsdl:part name="parameters" element="tns:outputReportIncident" /&gt;  &lt;/wsdl:message&gt;
  
      &lt;!-- Port (interface) definitions --&gt;   &lt;wsdl:portType name="ReportIncidentEndpoint"&gt;       &lt;wsdl:operation name="ReportIncident"&gt;          &lt;wsdl:input message="tns:inputReportIncident" /&gt;            &lt;wsdl:output message="tns:outputReportIncident" /&gt;      &lt;/wsdl:operation&gt;   &lt;/wsdl:portType&gt;
  
      &lt;!-- Port bindings to transports and encoding - HTTP, document literal encoding         is used --&gt;     &lt;wsdl:binding name="ReportIncidentBinding" type="tns:ReportIncidentEndpoint"&gt;       &lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http" /&gt;       &lt;wsdl:operation name="ReportIncident"&gt;          &lt;soap:operation
                  soapAction="http://reportincident.example.camel.apache.org/ReportIncident"
                  style="document" /&gt;             &lt;wsdl:input&gt;
                  &lt;soap:body parts="parameters" use="literal" /&gt;          &lt;/wsdl:input&gt;           &lt;wsdl:output&gt;
                  &lt;soap:body parts="parameters" use="literal" /&gt;          &lt;/wsdl:output&gt;      &lt;/wsdl:operation&gt;   &lt;/wsdl:binding&gt;
  
      &lt;!-- Service definition --&gt;     &lt;wsdl:service name="ReportIncidentService"&gt;         &lt;wsdl:port name="ReportIncidentPort" binding="tns:ReportIncidentBinding"&gt;           &lt;soap:address location="http://reportincident.example.camel.apache.org" /&gt;      &lt;/wsdl:port&gt;    &lt;/wsdl:service&gt;
  
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>here is my ibm-web-bnd.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-bnd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://websphere.ibm.com/xml/ns/javaee"
      xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_0.xsd" version="1.0"&gt;   &lt;virtual-host name="default_host"/&gt; &lt;/web-bnd&gt;
  </code></pre>
  
  <p>here is my cxf-config.xml:</p>
  
  <pre><code>&lt;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"&gt;
  
      &lt;import resource="classpath:META-INF/cxf/cxf.xml" /&gt;
      &lt;import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /&gt;
      &lt;import resource="classpath:META-INF/cxf/cxf-servlet.xml" /&gt;
  
      &lt;!-- implementation of the webservice --&gt;
      &lt;bean id="reportIncidentEndpoint"
          class="org.apache.camel.example.reportincident.impl.ReportIncidentEndpointImpl" /&gt;
  
      &lt;!-- export the webservice using jaxws --&gt;
      &lt;jaxws:endpoint id="reportIncident" implementor="#reportIncidentEndpoint"
          address="/incident" wsdlLocation="/WEB-INF/wsdl/report_incident.wsdl"
          endpointName="s:ReportIncidentPort" serviceName="s:ReportIncidentService"
          xmlns:s="http://reportincident.example.camel.apache.org" /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>here is my web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      version="2.5"&gt;
  
      &lt;display-name&gt;Archetype Created Web Application&lt;/display-name&gt;
  
      &lt;!-- the listener that kick-starts Spring --&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;!-- CXF servlet --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.apache.cxf.transport.servlet.CXFServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;!-- all our webservices are mapped under this URI pattern --&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/webservices/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;!-- location of spring xml files --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;classpath:cxf-config.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>====================</p>
  
  <h1>Update</h1>
  
  <p>strangely, the last update for SystemOut.log and SystemErr.log were two days ago. i found some logs in C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc
  logs:</p>
  
  <pre><code>FFDC Exception:org.springframework.beans.factory.BeanCreationException SourceId:com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated ProbeId:1341 Reporter:com.ibm.ws.webcontainer.webapp.WebAppImpl@bdd2e142
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw exception; nested exception is org.apache.cxf.bus.extension.ExtensionException
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1039)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:985)
  .....
  
  
  Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw exception; nested exception is org.apache.cxf.bus.extension.ExtensionException
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1032)
  
  
  Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/apache/camel/component/cxf/transport/CamelTransportFactory, offset=6
      at java.lang.ClassLoader.defineClassImpl(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:273)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
  
  
  com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_24638c34_17.05.05_01.11.23.0597458986526819616127.txt com.ibm.ws.webcontainer.servlet.ServletInstance.init 181
  
      com.ibm.ws.webcontainer.VirtualHostImpl addWebApplication SRVE0250I: Web Module Archetype Created Web Application has been bound to default_host[*:9080,*:80,*:9443,*:5060,*:5061,*:443].
  
  WSVR0221I: Application started: camel-example-reportincident_war
  
  WSVR0191I: Composition unit WebSphere:cuname=camel-example-reportincident_war in BLA WebSphere:blaname=camel-example-reportincident_war started.
  </code></pre>