Hello,
I'm trying to use the HelloWorld2 example in the current SM3.2 snapshot.
When I sent a message via HTTP I always get the following error:
ERROR - OdeService - Error invoking ODE.
java.lang.NullPointerException
at
org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeMyRole(PartnerLinkMyRoleImpl.java:97)
at
org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:139)
at
org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl.invoke(MyRoleMessageExchangeImpl.java:114)
at org.apache.ode.jbi.OdeService.invokeOde(OdeService.java:229)
at
org.apache.ode.jbi.OdeService.onJbiMessageExchange(OdeService.java:141)
at
org.apache.ode.jbi.JbiMessageExchangeEventRouter.onJbiMessageExchange(JbiMessageExchangeEventRouter.java:47)
at org.apache.ode.jbi.Receiver$1.run(Receiver.java:190)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
It seems that after the process executed, it tries to send the response to
the http in-out and fails.
My configuration is:
http xbean.xml (as the wsdl deployment does not work):
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:sns="urn:/HelloWorld2.wsdl"
xmlns:soademo="http://www.pleus.net/soademo/1.0">
<!-- Inject settings from property file -->
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:http.properties" />
</bean>
<http:endpoint
endpoint="helloEndpoint"
service="sns:HelloReceiver"
targetService="sns:HelloService"
targetEndpoint="HelloPort"
role="consumer"
soap="true"
wsdlResource="classpath:HelloWorld2.wsdl"
locationURI="${url}"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />
</beans>
http-wsdl:
<?xml version="1.0"?>
<definitions name="Hello"
targetNamespace="urn:/HelloWorld2.wsdl"
xmlns:tns="urn:/HelloWorld2.wsdl"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:smix="http://servicemix.org/wsdl/jbi/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema targetNamespace="urn:/HelloWorld2.wsdl"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="HelloRequest">
<complexType>
<all>
<element name="text" type="string"/>
</all>
</complexType>
</element>
<element name="HelloResponse">
<complexType>
<all>
<element name="text" type="string"/>
</all>
</complexType>
</element>
</schema>
</types>
<message name="HelloRequest">
<part name="body" element="tns:HelloRequest"/>
</message>
<message name="HelloResponse">
<part name="body" element="tns:HelloResponse"/>
</message>
<portType name="HelloPortType">
<operation name="Hello">
<input message="tns:HelloRequest"/>
<output message="tns:HelloResponse"/>
</operation>
</portType>
<binding name="HelloSoapBinding" type="tns:HelloPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="Hello">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="HelloService">
<port name="HelloPort" binding="tns:HelloSoapBinding">
<soap:address location="http://localhost:8080/hello-doc"/>
<!-- Connect this external HTTP endpoint to the process internal
JBI endpoint defined in HelloWorld2-process/HelloWorld2.dd
-->
<smix:endpoint role="consumer" defaultMep="in-out"/>
</port>
</service>
</definitions>
ode deploy.xml:
<deploy xmlns="http://ode.fivesight.com/schemas/2006/06/27/dd"
xmlns:pns="urn:/HelloWorld2.bpel"
xmlns:sns="urn:/HelloWorld2.wsdl" >
<process name="pns:HelloWorld2">
<active>true</active>
<in-memory>false</in-memory>
<provide partnerLink="helloPartnerLink">
<service name="sns:HelloService" port="HelloPort"/>
</provide>
</process>
</deploy>
ode-bpel:
<?xml version="1.0"?>
<process name="HelloWorld2"
targetNamespace="urn:/HelloWorld2.bpel"
xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:tns="urn:/HelloWorld2.bpel"
xmlns:hello="urn:/HelloWorld2.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<import location="HelloWorld2.wsdl"
namespace="urn:/HelloWorld2.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/" />
<partnerLinks>
<partnerLink name="helloPartnerLink"
partnerLinkType="hello:HelloPartnerLinkType"
myRole="Provider" />
</partnerLinks>
<variables>
<variable name="request" messageType="hello:HelloRequest"/>
<variable name="response" messageType="hello:HelloResponse"/>
<variable name="text" type="xsd:string"/>
</variables>
<sequence>
<receive
name="start"
partnerLink="helloPartnerLink"
portType="hello:HelloPortType"
operation="Hello"
variable="request"
createInstance="yes"/>
<assign name="assign1">
<copy>
<from>
<literal>
<hello:HelloResponse>
<hello:text>Default answer</hello:text>
</hello:HelloResponse>
</literal>
</from>
<to>$response.body</to>
</copy>
</assign>
<reply name="end"
partnerLink="helloPartnerLink"
portType="hello:HelloPortType"
operation="Hello"
variable="response"/>
</sequence>
</process>
ode-wsdl:
<?xml version="1.0"?>
<definitions name="Hello"
targetNamespace="urn:/HelloWorld2.wsdl"
xmlns:tns="urn:/HelloWorld2.wsdl"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema targetNamespace="urn:/HelloWorld2.wsdl"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="HelloRequest">
<complexType>
<all>
<element name="text" type="string"/>
</all>
</complexType>
</element>
<element name="HelloResponse">
<complexType>
<all>
<element name="text" type="string"/>
</all>
</complexType>
</element>
</schema>
</types>
<message name="HelloRequest">
<part name="body" element="tns:HelloRequest"/>
</message>
<message name="HelloResponse">
<part name="body" element="tns:HelloResponse"/>
</message>
<portType name="HelloPortType">
<operation name="Hello">
<input message="tns:HelloRequest"/>
<output message="tns:HelloResponse"/>
</operation>
</portType>
<plnk:partnerLinkType name="HelloPartnerLinkType">
<plnk:role name="Provider" portType="tns:HelloPortType"/>
</plnk:partnerLinkType>
<!--
This is an abstract interface/portType definition. Note the lack of
binding and service: these are defined by the HTTP binding component.
-->
</definitions>
Any clues how to solve this issue?
Wolfgang
--
View this message in context:
http://www.nabble.com/HelloWorld2-in-Servicemix-fails-tf3278666.html#a9118148
Sent from the Apache Ode User mailing list archive at Nabble.com.