title: JAXWS in Websphere
body: <p>I wrote a simple Webservice as below in Netbeans.</p>
  
  <pre class="lang-java prettyprint-override"><code>@WebService()
  public class CRSEncryptString {
  
  /**
   * Web service operation
   */
  @WebMethod(operationName = "encryptString")
  public String encryptString(@WebParam(name = "plainText")
  String plainText) {
      System.out.println("************* ");
      String cipher = plainText;
      System.out.println("***************************");
      return cipher;
  }
  
  }
  </code></pre>
  
  <p>Added jars with are related to <strong>JAX-WS</strong> like:
  activation.jar,FastInfoset.jar,http.jar,jaxb jars, jaxws jars, saaj jars, etc</p>
  
  <p>Its working fine in Tomcat and Weblogic.</p>
  
  <p>But, while running in <code>Websphere 6.1</code> its giving error.</p>
  
  <p>Following is serverlog:</p>
  
  <pre><code>[2/17/12 17:22:53:421 IST] 0000003c AdminHelper   A   ADMN1009I: An attempt is made to start the JAXWS-Test1_war application.
  [2/17/12 17:22:54:390 IST] 0000003c ApplicationMg A   WSVR0200I: Starting application: JAXWS-Test1_war
  [2/17/12 17:22:54:452 IST] 0000003c ApplicationMg A   WSVR0204I: Application: JAXWS-Test1_war  Application build level: Unknown
  [2/17/12 17:22:54:624 IST] 0000003c WebGroup      A   SRVE0169I: Loading Web Module: JAXWS-Test1.war.
  [2/17/12 17:22:54:936 IST] 0000003c http          I   WSSERVLET12: JAX-WS context listener initializing
  
  [2/17/12 17:22:55:264 IST] 0000003c http          E   WSSERVLET11: failed to parse runtime descriptor: java.lang.LinkageError: You are loading old SAAJ from jar:file:/E:/Program%20Files/Websphere6_1/lib/j2ee.jar!/javax/xml/soap/MessageFactory.class
                               java.lang.LinkageError: You are loading old SAAJ from jar:file:/E:/Program%20Files/Websphere6_1/lib/j2ee.jar!/javax/xml/soap/MessageFactory.class
      at com.sun.xml.ws.api.SOAPVersion.&lt;init&gt;(SOAPVersion.java:184)
      at com.sun.xml.ws.api.SOAPVersion.&lt;clinit&gt;(SOAPVersion.java:83)
      at java.lang.J9VMInternals.initializeImpl(Native Method)
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
      at com.sun.xml.ws.api.BindingID.&lt;clinit&gt;(BindingID.java:318)
      at java.lang.J9VMInternals.initializeImpl(Native Method)
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
      at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.createBinding(DeploymentDescriptorParser.java:302)
      at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:243)
      at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
      at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)
      at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:605)
      at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:265)
      at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271)
      at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
      at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
      at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653)
      at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:606)
      at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333)
      at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1295)
      at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
      at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:567)
      at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:814)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:948)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1478)
      at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:3731)
      at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:3813)
      at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1483)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
      at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
      at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
      at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
      at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
      at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
      at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1055)
      at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
      at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:948)
      at com.ibm.ws.management.application.AppManagementImpl._startApplication(AppManagementImpl.java:1285)
      at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.java:1184)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
      at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
      at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
      at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
      at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
      at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
      at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1055)
      at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
      at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:948)
      at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:139)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:338)
      at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:206)
      at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:55)
      at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:680)
      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:484)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
  Caused by: java.lang.NoSuchMethodError: javax/xml/soap/MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
      at com.sun.xml.ws.api.SOAPVersion.&lt;init&gt;(SOAPVersion.java:178)
      ... 78 more
  
  [2/17/12 17:22:55:467 IST] 0000003c WebApp        E   WSSERVLET11: failed to parse runtime descriptor: java.lang.LinkageError: You are loading old SAAJ from jar:file:/E:/Program%20Files/Websphere6_1/lib/j2ee.jar!/javax/xml/soap/MessageFactory.class
   [2/17/12 17:22:55:514 IST] 0000003c ServletWrappe I   SRVE0242I: [JAXWS-Test1_war] [/JAXWS-Test1] [CRSEncryptString]: Initialization successful.
  [2/17/12 17:22:55:530 IST] 0000003c VirtualHost   I   SRVE0250I: Web Module &lt;null&gt; has been bound to default_host[*:9080,*:80,*:9443,*:5060,*:5061,*:443].
  [2/17/12 17:22:55:561 IST] 0000003c ApplicationMg A   WSVR0221I: Application started: JAXWS-Test1_war
  [2/17/12 17:23:05:714 IST] 00000048 ServletWrappe I   SRVE0242I: [JAXWS-Test1_war] [/JAXWS-Test1] [/index.jsp]: Initialization successful.
  </code></pre>
  
  <p>Please suggest me further.</p>
  
  <p>Thanks in advance..........</p>