jBPM BPEL calling .NET WS
stone_42 Jan 9, 2006 5:03 AMHello all,
I tried to write a simple wrapper for a .NET Webservice. When I execute it, I get an exception with the following stacktrace:
10:43:19,046 ERROR [StartListener] could not deliver request org.jbpm.graph.def.DelegationException at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299) at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293) at org.jbpm.bpel.def.BpelDefinition.startProcessInstance(BpelDefinition.java:58) at org.jbpm.bpel.service.messager.StartListener.onMessage(StartListener.java:120) at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:707) at java.lang.Thread.run(Thread.java:595) Caused by: org.jbpm.graph.def.DelegationException at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299) at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293) at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293) at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293) at org.jbpm.bpel.def.Activity.enter(Activity.java:89) at org.jbpm.graph.def.Transition.take(Transition.java:92) at org.jbpm.graph.def.Node.leave(Node.java:349) at org.jbpm.bpel.def.Activity.leave(Activity.java:149) at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:42) at org.jbpm.bpel.def.Receive.accept(Receive.java:67) at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:81) at org.jbpm.bpel.def.Sequence.accept(Sequence.java:84) at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:28) at org.jbpm.bpel.def.BpelDefinition.startProcessInstance(BpelDefinition.java:55) ... 3 more Caused by: java.lang.NullPointerException at org.jbpm.bpel.service.soap.PortCaller.writeDocumentPart(PortCaller.java:279) at org.jbpm.bpel.service.soap.PortCaller.writeDocumentBody(PortCaller.java:247) at org.jbpm.bpel.service.soap.PortCaller.writeInputMessage(PortCaller.java:174) at org.jbpm.bpel.service.soap.PortCaller.callImpl(PortCaller.java:130) at org.jbpm.bpel.service.soap.PortCaller.call(PortCaller.java:93) at org.jbpm.bpel.service.messager.MessagerSession.invoke(MessagerSession.java:140) at org.jbpm.bpel.service.def.Invoker.invoke(Invoker.java:80) at org.jbpm.bpel.def.Invoke.execute(Invoke.java:27) at org.jbpm.bpel.def.Activity.enter(Activity.java:84) ... 12 more
The WSDL of the .NET-webservice is as follows:
<?xml version="1.0" encoding="utf-8"?> <wsdl:definitions targetNamespace="http://my.namespace" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://my.namespace" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://my.namespace"> <s:element name="ReverseAndConcatNames"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="firstName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="secondName" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="ReverseAndConcatNamesResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="ReverseAndConcatNamesResult" type="s:string" /> </s:sequence> </s:complexType> </s:element> </s:schema> </wsdl:types> <wsdl:message name="ReverseAndConcatNamesSoapIn"> <wsdl:part name="parameters" element="tns:ReverseAndConcatNames" /> </wsdl:message> <wsdl:message name="ReverseAndConcatNamesSoapOut"> <wsdl:part name="parameters" element="tns:ReverseAndConcatNamesResponse" /> </wsdl:message> <wsdl:portType name="SampleServiceSoap"> <wsdl:operation name="ReverseAndConcatNames"> <wsdl:input message="tns:ReverseAndConcatNamesSoapIn" /> <wsdl:output message="tns:ReverseAndConcatNamesSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="SampleServiceSoap" type="tns:SampleServiceSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="ReverseAndConcatNames"> <soap:operation soapAction="http://my.namespace/ReverseAndConcatNames" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="SampleServiceSoap12" type="tns:SampleServiceSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="ReverseAndConcatNames"> <soap12:operation soapAction="http://my.namespace/ReverseAndConcatNames" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="SampleService"> <wsdl:port name="SampleServiceSoap" binding="tns:SampleServiceSoap"> <soap:address location="http://localhost/ITInformatik.SOA.Sample.WebServiceFacade/SampleService.asmx" /> </wsdl:port> <wsdl:port name="SampleServiceSoap12" binding="tns:SampleServiceSoap12"> <soap12:address location="http://localhost/ITInformatik.SOA.Sample.WebServiceFacade/SampleService.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
I debugged the PortCaller code raising the NullPointerException, and I found out, that it searched for a child with name "ReverseAndConcatNames", but there was only a child named "parameters". So, I think that the WSDL part
<wsdl:message name="ReverseAndConcatNamesSoapOut"> <wsdl:part name="parameters" element="tns:ReverseAndConcatNamesResponse" /> </wsdl:message>
is mis-interpreted by JBPM BPEL.
Could this be a bug?
Regards,
Martin