4 Replies Latest reply on Apr 19, 2015 7:35 PM by seayfhzl

    org.apache.xerces.dom.ElementNSImpl cannot be cast to demo.flight.bpms.flightproject.Flights

    shephc01

      Hi All,

       

      I learning how to use BPMS.

       

      I am trying to invoke a simple soap web service from JBoss BPMS 6.0.1 running on EAP 6.1.1.

       

      The concept is to send an object (travelDetails), which has 2 variables (flyFrom, flyTo). The web service then calculates and returns List<Flight>, which are 2 flights (outbound and inbound).

       

      I used the xjh tool to create client classes, which I then packaged into a jar. I then placed the jar in Business-Central/WEB-INF/lib (importing it into the project was not working for me).

      I also created another class using Data Modeler (demo.flight.bpms.flightproject.Flights) with one field of type List<Flight> (acme.flight.soap.service.acmeairline.Flight[0..N]) - PS: Flight is in the jar.

       

      (please note: I have attached the client classes jar)

       

      The BPMN process is now in a state where I can successfully invoke the web service with the travelDetails object but I get the error message ($subject) for the returned object. The data output object (Result) has type (GetFlightListResponse) which is the equivalent of List<Flight>. the variable (flights) I have mapped to the Result is of type demo.flight.bpms.flightproject.Flights (i.e. the class I created in Data Modeler).

       

      One side note, the process runs successfully (invoke and return data from WS) if I change the data output object type to java.lang.Object and set the same for the (flights) variable. However,when I print i.e. System.out.println("["+flights+"]") I get the following:- [ns2:getFlightListResponse: null]. I do not know how to interpret what that object means.

       

      StackTrace

       

      09:14:54,029 INFO [org.drools.compiler.kie.builder.impl.KieRepositoryImpl] (pool-13-thread-1) KieModule was added:MemoryKieModule[ ReleaseId=demo.flight.bpms:FlightProject:1.0]
      09:15:09,441 INFO [org.drools.compiler.kie.builder.impl.KieRepositoryImpl] (http-localhost.localdomain/127.0.0.1:8380-7) KieModule was added:MemoryKieModule[ ReleaseId=demo.flight.bpms:FlightProject:1.0]
      09:15:22,186 INFO [stdout] (http-localhost.localdomain/127.0.0.1:8380-7) Initializing the service variables: [null]
      09:15:22,187 INFO [stdout] (http-localhost.localdomain/127.0.0.1:8380-7) testVar value before = demo.flight.bpms.flightproject.Flights@64b8f0b3
      09:15:22,210 INFO [org.apache.cxf.endpoint.dynamic.DynamicClientFactory] (http-localhost.localdomain/127.0.0.1:8380-7) Created classes: acme.flight.soap.service.acmeairline.Flight, acme.flight.soap.service.acmeairline.GetFlightList, acme.flight.soap.service.acmeairline.GetFlightListResponse, acme.flight.soap.service.acmeairline.ObjectFactory, acme.flight.soap.service.acmeairline.TravelDetails
      09:15:22,220 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8380-7) warning: [options] bootstrap class path not set in conjunction with -source 1.5
      09:15:22,260 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8380-7) 1 warning
      09:15:22,287 WARN [org.drools.persistence.SingleSessionCommandService] (http-localhost.localdomain/127.0.0.1:8380-7) Could not commit session: org.jbpm.workflow.instance.WorkflowRuntimeException: [FlightProject.flightProcess:32 - WS:4] -- org.jbpm.workflow.instance.WorkflowRuntimeException: [FlightProject.flightProcess:32 - WS:4] -- org.apache.xerces.dom.ElementNSImpl cannot be cast to demo.flight.bpms.flightproject.Flights
      at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:135) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:61) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:57) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:66) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:43) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:226) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:362) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:194) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:176) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:168) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.core.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1575) [drools-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:366) [drools-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:121) [drools-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:40) [drools-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:533) [drools-persistence-jpa-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:73) [drools-persistence-jpa-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:377) [drools-persistence-jpa-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232) [drools-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.console.ng.bd.backend.server.KieSessionEntryPointImpl.startProcess(KieSessionEntryPointImpl.java:79) [jbpm-console-ng-business-domain-backend-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.console.ng.bd.backend.server.KieSessionEntryPointImpl$Proxy$_$$_WeldClientProxy.startProcess(KieSessionEntryPointImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-console-ng-business-domain-backend-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.console.ng.ht.backend.server.FormModelerProcessStarterEntryPointImpl.startProcessFromRenderContext(FormModelerProcessStarterEntryPointImpl.java:44) [jbpm-console-ng-human-tasks-backend-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.console.ng.ht.backend.server.FormModelerProcessStarterEntryPointImpl$Proxy$_$$_WeldClientProxy.startProcessFromRenderContext(FormModelerProcessStarterEntryPointImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-console-ng-human-tasks-backend-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at sun.reflect.GeneratedMethodAccessor385.invoke(Unknown Source) [:1.7.0_09-icedtea]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09-icedtea]
      at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09-icedtea]
      at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48) [errai-bus-2.4.4.Final-redhat-3.jar:2.4.4.Final-redhat-3]
      at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:22) [errai-bus-2.4.4.Final-redhat-3.jar:2.4.4.Final-redhat-3]
      at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54) [errai-bus-2.4.4.Final-redhat-3.jar:2.4.4.Final-redhat-3]
      at org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:499) [errai-weld-integration-2.4.4.Final-redhat-3.jar:2.4.4.Final-redhat-3]
      at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) [errai-bus-2.4.4.Final-redhat-3.jar:2.4.4.Final-redhat-3]
      at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:284) [errai-bus-2.4.4.Final-redhat-3.jar:2.4.4.Final-redhat-3]
      at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) [errai-bus-2.4.4.Final-redhat-3.jar:2.4.4.Final-redhat-3]
      at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:97) [errai-bus-2.4.4.Final-redhat-3.jar:2.4.4.Final-redhat-3]
      at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:114) [errai-bus-2.4.4.Final-redhat-3.jar:2.4.4.Final-redhat-3]
      at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:140) [errai-bus-2.4.4.Final-redhat-3.jar:2.4.4.Final-redhat-3]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.2.1.Final.jar:3.2.1.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.2.1.Final.jar:3.2.1.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70) [jbpm-designer-backend-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266) [uberfire-security-server-0.3.2-redhat-6.jar:0.3.2-redhat-6]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:499) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
      at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:408) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
      Caused by: org.jbpm.bpmn2.handler.WorkItemHandlerRuntimeException: org.jbpm.workflow.instance.WorkflowRuntimeException: [FlightProject.flightProcess:32 - WS:4] -- org.apache.xerces.dom.ElementNSImpl cannot be cast to demo.flight.bpms.flightproject.Flights
      at org.jbpm.process.workitem.AbstractLogOrThrowWorkItemHandler.handleException(AbstractLogOrThrowWorkItemHandler.java:40) [jbpm-workitems-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.process.workitem.AbstractLogOrThrowWorkItemHandler.handleException(AbstractLogOrThrowWorkItemHandler.java:23) [jbpm-workitems-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.process.workitem.webservice.WebServiceWorkItemHandler.executeWorkItem(WebServiceWorkItemHandler.java:175) [jbpm-workitems-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:56) [drools-persistence-jpa-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:124) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      ... 76 more
      Caused by: org.jbpm.workflow.instance.WorkflowRuntimeException: [FlightProject.flightProcess:32 - WS:4] -- org.apache.xerces.dom.ElementNSImpl cannot be cast to demo.flight.bpms.flightproject.Flights
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.executeAction(NodeInstanceImpl.java:188) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerEvent(ExtendedNodeInstanceImpl.java:56) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:43) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:286) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:265) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:275) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:337) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:313) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:403) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:134) [drools-persistence-jpa-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      at org.jbpm.process.workitem.webservice.WebServiceWorkItemHandler.executeWorkItem(WebServiceWorkItemHandler.java:116) [jbpm-workitems-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      ... 78 more
      Caused by: java.lang.ClassCastException: org.apache.xerces.dom.ElementNSImpl cannot be cast to demo.flight.bpms.flightproject.Flights
      at demo.flight.bpms.flightproject.Process_demo$u46$flight$u46$bpms$u46$flightproject$u46$flightProcess1828573978Action3Invoker.execute(Process_demo$u46$flight$u46$bpms$u46$flightproject$u46$flightProcess1828573978Action3Invoker.java:12)
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.executeAction(NodeInstanceImpl.java:182) [jbpm-flow-6.0.2-redhat-6.jar:6.0.2-redhat-6]
      ... 88 more
      
      

       

       

      WSDL File

      <wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://service.soap.flight.acme/AcmeAirline/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="AcmeAirline" targetNamespace="http://service.soap.flight.acme/AcmeAirline/">
        <wsdl:types>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://service.soap.flight.acme/AcmeAirline/" elementFormDefault="unqualified" targetNamespace="http://service.soap.flight.acme/AcmeAirline/" version="1.0">
      
        <xs:element name="getFlightList" nillable="true" type="tns:travelDetails"/>
      
        <xs:element name="getFlightListResponse" nillable="true" type="xs:anyType"/>
       
      
        <xs:complexType name="getFlightListResponse">
         <xs:sequence>
         <xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="tns:flight"/>
         </xs:sequence>
        </xs:complexType>
      
        <xs:complexType name="flight">
         <xs:sequence>
         <xs:element name="company" type="xs:string"/>
         <xs:element name="arrivalTime" type="xs:time"/>
         <xs:element name="planeId" type="xs:int"/>
         <xs:element name="ratePerPerson" type="xs:decimal"/>
         <xs:element name="startCity" type="xs:string"/>
         <xs:element name="targetCity" type="xs:string"/>
         <xs:element name="startTime" type="xs:time"/>
         <xs:element name="travelDate" type="xs:date"/>
         </xs:sequence>
        </xs:complexType>
      
        <xs:complexType name="travelDetails">
         <xs:sequence>
         <xs:element name="startCity" type="xs:string"/>
         <xs:element name="destCity" type="xs:string"/>
         </xs:sequence>
        </xs:complexType>
      
      </xs:schema>
        </wsdl:types>
        <wsdl:message name="getFlightList">
         <wsdl:part element="tns:getFlightList" name="parameters">
         </wsdl:part>
        </wsdl:message>
        <wsdl:message name="getFlightListResponse">
         <wsdl:part element="tns:getFlightListResponse" name="parameters">
         </wsdl:part>
        </wsdl:message>
        <wsdl:portType name="AcmeAirlineInterface">
         <wsdl:operation name="getFlightList">
         <wsdl:input message="tns:getFlightList" name="getFlightList">
         </wsdl:input>
         <wsdl:output message="tns:getFlightListResponse" name="getFlightListResponse">
         </wsdl:output>
         </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="AcmeAirlineSoapBinding" type="tns:AcmeAirlineInterface">
         <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
         <wsdl:operation name="getFlightList">
         <soap:operation soapAction="http://service.soap.flight.acme/AcmeAirline/getFlightList" style="document"/>
         <wsdl:input name="getFlightList">
         <soap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="getFlightListResponse">
         <soap:body use="literal"/>
         </wsdl:output>
         </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="AcmeAirline">
         <wsdl:port binding="tns:AcmeAirlineSoapBinding" name="AcmeAirlineInterfaceImplPort">
         <soap:address location="http://localhost:8180/AcmeAirline/AcmeAirlineInterface"/>
         </wsdl:port>
        </wsdl:service>
      </wsdl:definitions>
      
      
        • 1. Re: org.apache.xerces.dom.ElementNSImpl cannot be cast to demo.flight.bpms.flightproject.Flights
          swiderski.maciej

          that usually means that your classes are not registered as known classes in JAXB context that is used to marshal and unmarshal data when sending them over the wire. Currently there are two workaround for that:

          1. include your classes in the project (kjar)
          2. make the model jar to be a kjar - add kmodule.xml into META-INF folder of that jar

          in both cases upon deployment of such unit it will scan the content and register all classes in JAXB context.

           

          This is current limitation as it's simply not efficient entire classpath and add all classes to JAXB context as most likely not all are needed. Expect this to be solved in 6.1

           

          HTH

          1 of 1 people found this helpful
          • 2. Re: org.apache.xerces.dom.ElementNSImpl cannot be cast to demo.flight.bpms.flightproject.Flights
            shephc01

            Thanks Maciej,

             

            Is there a step by step guide of how to implement the actions you have mentioned. Because I am wondering how

            1. to include my classes in the kjar? (what I have done without success is import the classes into my business process using the Imports on Core Properties of canvas

            2. to make the model jar into kjar or how to add kmodule.xml.

             

            Thanks in advance.

            • 3. Re: org.apache.xerces.dom.ElementNSImpl cannot be cast to demo.flight.bpms.flightproject.Flights
              swiderski.maciej

              shephc01 wrote:

               

              Is there a step by step guide of how to implement the actions you have mentioned. Because I am wondering how

              1. to include my classes in the kjar? (what I have done without success is import the classes into my business process using the Imports on Core Properties of canvas

              you have the PlaneModelData which I believe contains classes, so these classes (as java source) should be placed in the project you have in the workbench that upon build will become a kjar. You can do it by integrating your IDE with GIT server of the workbench and add all classes into the project (src/main/java)

               

              shephc01 wrote:

              2. to make the model jar into kjar or how to add kmodule.xml.

              Edit your PlaneModelData jar and add kmodule.xml into META-INF directory then upload it to ArtifactRepository in workbench and next add that jar as dependency to your project.

               

              HTH

              • 4. Re: org.apache.xerces.dom.ElementNSImpl cannot be cast to demo.flight.bpms.flightproject.Flights
                seayfhzl

                hi,I have the same problem :

                I created a project  including *.bpmn2  and java files on jbpms6 workbench,and build it then i can see the jar when i click repository-->artifactory Repository .

                step1, i download the jar to my local project and add to the classpath

                step2,I want to complete a task through invoking rest API but get the same error like shephc01 .

                can you help me?