0 Replies Latest reply: Feb 20, 2013 2:01 AM by 932874 RSS

    oracle.apps.fnd.wf.bes.InvokerException: java.lang.ClassCastException

    932874
      Dear all expert,

      We are trying to use BES to invoke external webservice, and get the java class cast exception, anybody can help us please?


      steps:

      1. we need to call a webserivce with following wsdl :

      <?xml version="1.0" encoding="UTF-8" ?>
      - <wsdl:definitions name="BizStringWebServiceSkeletonService" targetNamespace="www.wisdom.sh.cn" xmlns:ns1="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="www.wisdom.sh.cn" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      - <wsdl:types>
      - <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="www.wisdom.sh.cn" xmlns:tns="www.wisdom.sh.cn" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:element name="xfire" type="tns:xfire" />
      - <xsd:complexType name="xfire">
      - <xsd:sequence>
      <xsd:element minOccurs="0" name="arg0" type="xsd:string" />
      </xsd:sequence>
      </xsd:complexType>
      <xsd:element name="xfireResponse" type="tns:xfireResponse" />
      - <xsd:complexType name="xfireResponse">
      - <xsd:sequence>
      <xsd:element minOccurs="0" name="return" type="xsd:string" />
      </xsd:sequence>
      </xsd:complexType>
      </xsd:schema>
      </wsdl:types>
      - <wsdl:message name="xfire">
      <wsdl:part element="tns:xfire" name="parameters" />
      </wsdl:message>
      - <wsdl:message name="xfireResponse">
      <wsdl:part element="tns:xfireResponse" name="parameters" />
      </wsdl:message>
      - <wsdl:portType name="BizStringWebService">
      - <wsdl:operation name="xfire">
      <wsdl:input message="tns:xfire" name="xfire" />
      <wsdl:output message="tns:xfireResponse" name="xfireResponse" />
      </wsdl:operation>
      </wsdl:portType>
      - <wsdl:binding name="BizStringWebServiceSkeletonServiceSoapBinding" type="tns:BizStringWebService">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
      - <wsdl:operation name="xfire">
      <soap:operation soapAction="" style="document" />
      - <wsdl:input name="xfire">
      <soap:body use="literal" />
      </wsdl:input>
      - <wsdl:output name="xfireResponse">
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      - <wsdl:service name="BizStringWebServiceSkeletonService">
      - <wsdl:port binding="tns:BizStringWebServiceSkeletonServiceSoapBinding" name="BizStringWebServiceSkeletonPort">
      <soap:address location="http://192.168.50.145:8080/wsdframework/services/biz/bizStringService.ws" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

      it works fine when using the SOAPUI to test with payload:
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wis="www.wisdom.sh.cn">
      <soapenv:Header/>
      <soapenv:Body>
      <wis:xfire>
      <arg0>100</arg0>
      </wis:xfire>
      </soapenv:Body>
      </soapenv:Envelope>


      2. we create a business event and subscription to invoice above webservice

      3. when we try to test this business event with RAISE in PL/SQL given event data (Write XML) as the same from soapui:
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wis="www.wisdom.sh.cn">
      <soapenv:Header/>
      <soapenv:Body>
      <wis:xfire>
      <arg0>100</arg0>
      </wis:xfire>
      </soapenv:Body>
      </soapenv:Envelope>

      or :

      <ns1:xfire xmlns:ns1="www.wisdom.sh.cn">
      <arg0>100</arg0>
      </ns1:xfire>


      or:
      <xfire xmlns="www.wisdom.sh.cn">
      <arg0>100</arg0>
      </xfire>

      it both get error out:
      Error Message oracle.apps.fnd.wf.bes.InvokerException: java.lang.ClassCastException: org.apache.wsif.schema.ElementType cannot be cast to org.apache.wsif.schema.ComplexType

      Error Stack oracle.apps.fnd.wf.bes.InvokerException: java.lang.ClassCastException: org.apache.wsif.schema.ElementType cannot be cast to org.apache.wsif.schema.ComplexType at oracle.apps.fnd.wf.bes.WebServiceInvokerSubscription.invokeService(WebServiceInvokerSubscription.java:645) at oracle.apps.fnd.wf.bes.WebServiceInvokerSubscription.onBusinessEvent(WebServiceInvokerSubscription.java:241) at oracle.apps.fnd.wf.bes.EventDispatcher.executeSubscription(EventDispatcher.java:870) at oracle.apps.fnd.wf.bes.EventDispatcher.processSubscription(EventDispatcher.java:556) at oracle.apps.fnd.wf.bes.EventDispatcher.dispatch(EventDispatcher.java:335) at oracle.apps.fnd.wf.bes.AgentListenerProcessorNew.processMessage(AgentListenerProcessorNew.java:373) at oracle.apps.fnd.cp.gsc.SvcComponentProcessor.process(SvcComponentProcessor.java:659) at oracle.apps.fnd.cp.gsc.Processor.run(Processor.java:283) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassCastException: org.apache.wsif.schema.ElementType cannot be cast to org.apache.wsif.schema.ComplexType at org.apache.wsif.util.WSIFUtils.findComplexType(WSIFUtils.java:1438) at org.apache.wsif.util.WSIFUtils.unWrapPart(WSIFUtils.java:1387) at com.oracle.oc4j.wsif.providers.jaxrpc.WSIFOperation_JaxRpc.unwrapSOAPParts(WSIFOperation_JaxRpc.java:920) at com.oracle.oc4j.wsif.providers.jaxrpc.WSIFOperation_JaxRpc.prepare(WSIFOperation_JaxRpc.java:1909) at com.oracle.oc4j.wsif.providers.jaxrpc.WSIFOperation_JaxRpc.invokeRequestResponseOperation(WSIFOperation_JaxRpc.java:1383) at com.oracle.oc4j.wsif.providers.jaxrpc.WSIFOperation_JaxRpc.executeRequestResponseOperation(WSIFOperation_JaxRpc.java:1177) at oracle.apps.fnd.wf.bes.WebServiceInvokerSubscription.invokeService(WebServiceInvokerSubscription.java:622) ... 8 more


      Any idea with what kind of event data should I give with this webservice call?

      Many thanks!

      Edited by: 929871 on 2013-2-19 下午11:58