title: java.lang.ClassCastException: org.jboss.ws.core.soap.TextImpl cannot be cast to javax.xml.soap.SOAPElement
body: <p>I am working on <strong>IBM Sterling V 9.3</strong>. I have exposed an Service as <strong>JAX-WS web service</strong> using the steps provided in the knowledge center successfully on <strong>Jboss 4.2.3</strong> app server. EAR file got deployed successfully and app server started fine. I could see the generated WSDL file for the web service.</p>
  
  <p>When I tried to access the WSDL from <strong>soapUI tool (version 3.5.1)</strong>, I am getting the following error in the response message. I searched for the same and found out that we should have following jars under JBOSS_HOME\lib\endorsed folder:</p>
  
  <p>•   jboss-saaj.jar</p>
  
  <p>•   jboss-jaxws.jar</p>
  
  <p>•   jboss-jaxrpc.jar</p>
  
  <p>•   jaxb-api-2.1.9.jar</p>
  
  <p>•   xercesImpl.jar</p>
  
  <p>•   xalan.jar</p>
  
  <p>•   serializer.jar</p>
  
  <p>I have added above jars but still getting the same error. Can share the more details if required. Please help.</p>
  
  <p><strong>Error message:</strong></p>
  
  <pre><code>&lt;env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"&gt;
     &lt;env:Header/&gt;
     &lt;env:Body&gt;
        &lt;env:Fault&gt;
           &lt;faultcode&gt;env:Server&lt;/faultcode&gt;
           &lt;faultstring&gt;java.lang.ClassCastException: org.jboss.ws.core.soap.TextImpl cannot be cast to javax.xml.soap.SOAPElement&lt;/faultstring&gt;
        &lt;/env:Fault&gt;
     &lt;/env:Body&gt;
  &lt;/env:Envelope&gt;
  </code></pre>
  
  <p><strong>WSDL file:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;definitions name="SearsBeansService"
      targetNamespace="http://webservices.sears.com/"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:tns="http://webservices.sears.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;types&gt;
          &lt;xsd:schema&gt;
              &lt;xsd:import
                  namespace="http://webservices.sears.com/documentation/SearsGetOrderListForWSCService/searsGetOrderListForWSCService/output" schemaLocation="SearsBeansService_schema1.xsd"/&gt;
          &lt;/xsd:schema&gt;
          &lt;xsd:schema&gt;
              &lt;xsd:import
                  namespace="http://webservices.sears.com/documentation/SearsGetOrderListForWSCService/searsGetOrderListForWSCService/input" schemaLocation="SearsBeansService_schema2.xsd"/&gt;
          &lt;/xsd:schema&gt;
          &lt;xsd:schema&gt;
              &lt;xsd:import
                  namespace="http://webservices.sears.com/documentation/SearsGetOrderDetailsForWSCService/searsGetOrderDetailsForWSCService/output" schemaLocation="SearsBeansService_schema3.xsd"/&gt;
          &lt;/xsd:schema&gt;
          &lt;xsd:schema&gt;
              &lt;xsd:import
                  namespace="http://webservices.sears.com/documentation/SearsGetOrderDetailsForWSCService/searsGetOrderDetailsForWSCService/input" schemaLocation="SearsBeansService_schema4.xsd"/&gt;
          &lt;/xsd:schema&gt;
          &lt;xsd:schema&gt;
              &lt;xsd:import namespace="http://webservices.sears.com/" schemaLocation="SearsBeansService_schema5.xsd"/&gt;
          &lt;/xsd:schema&gt;
          &lt;xsd:schema&gt;
              &lt;xsd:import
                  namespace="http://www.sterlingcommerce.com/documentation/types" schemaLocation="yfctype.xsd"/&gt;
          &lt;/xsd:schema&gt;
      &lt;/types&gt;
      &lt;message name="searsGetOrderDetailsForWSCService"&gt;
          &lt;part element="tns:searsGetOrderDetailsForWSCService" name="parameters"/&gt;
      &lt;/message&gt;
      &lt;message name="searsGetOrderDetailsForWSCServiceResponse"&gt;
          &lt;part element="tns:searsGetOrderDetailsForWSCServiceResponse" name="parameters"/&gt;
      &lt;/message&gt;
      &lt;message name="XBeanWSException"&gt;
          &lt;part element="tns:XBeanWSException" name="fault"/&gt;
      &lt;/message&gt;
      &lt;message name="searsGetOrderListForWSCService"&gt;
          &lt;part element="tns:searsGetOrderListForWSCService" name="parameters"/&gt;
      &lt;/message&gt;
      &lt;message name="searsGetOrderListForWSCServiceResponse"&gt;
          &lt;part element="tns:searsGetOrderListForWSCServiceResponse" name="parameters"/&gt;
      &lt;/message&gt;
      &lt;portType name="SearsBeans"&gt;
          &lt;operation name="searsGetOrderDetailsForWSCService"&gt;
              &lt;input message="tns:searsGetOrderDetailsForWSCService"/&gt;
              &lt;output message="tns:searsGetOrderDetailsForWSCServiceResponse"/&gt;
              &lt;fault message="tns:XBeanWSException" name="XBeanWSException"/&gt;
          &lt;/operation&gt;
          &lt;operation name="searsGetOrderListForWSCService"&gt;
              &lt;input message="tns:searsGetOrderListForWSCService"/&gt;
              &lt;output message="tns:searsGetOrderListForWSCServiceResponse"/&gt;
              &lt;fault message="tns:XBeanWSException" name="XBeanWSException"/&gt;
          &lt;/operation&gt;
      &lt;/portType&gt;
      &lt;binding name="SearsBeansPortBinding" type="tns:SearsBeans"&gt;
          &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
          &lt;operation name="searsGetOrderDetailsForWSCService"&gt;
              &lt;soap:operation soapAction=""/&gt;
              &lt;input&gt;
                  &lt;soap:body use="literal"/&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body use="literal"/&gt;
              &lt;/output&gt;
              &lt;fault name="XBeanWSException"&gt;
                  &lt;soap:fault name="XBeanWSException" use="literal"/&gt;
              &lt;/fault&gt;
          &lt;/operation&gt;
          &lt;operation name="searsGetOrderListForWSCService"&gt;
              &lt;soap:operation soapAction=""/&gt;
              &lt;input&gt;
                  &lt;soap:body use="literal"/&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body use="literal"/&gt;
              &lt;/output&gt;
              &lt;fault name="XBeanWSException"&gt;
                  &lt;soap:fault name="XBeanWSException" use="literal"/&gt;
              &lt;/fault&gt;
          &lt;/operation&gt;
      &lt;/binding&gt;
      &lt;service name="SearsBeansService"&gt;
          &lt;port binding="tns:SearsBeansPortBinding" name="SearsBeansPort"&gt;
              &lt;soap:address location="REPLACE_WITH_ACTUAL_URL"/&gt;
          &lt;/port&gt;
      &lt;/service&gt;
  &lt;/definitions&gt;
  </code></pre>