Hello,
Sorry to bother you with such a (hopefully) easy question, but I seem to be
stuck.
I am using servicemix servicemix-3.0-M1. I am attempting to write a very
bare bones BPEL process that
1) receives
2) assigns a literal to the response variable
3) replies
My problem is that when I run the BPEL process, I receive an error about the
response variable not being initialized. I have seen this before and my
solution to this was to simply assign a literal to the response variable
before the reply.
My main question is: How do I assign a literal to a variable? A related
question is where can I find documentation about the BPEL syntax expected by
the BPEL engine?
I have attempted the following:
<bpws:assign>
<bpws:copy>
<bpws:from>
<bpws:literal>2</bpws:literal>
</bpws:from>
<bpws:to variable="ConnectResponse" part="ConnectResponse"
query="/ns2:ConnectResponse/ns2:output"/>
</bpws:copy>
</bpws:assign>
but I receive the following error message stating that the BPEL cannot be
correctly parsed:
Retrieving document at 'connection'.
Jun 22, 2006 12:23:44 PM org.apache.ode.bpe.util.BPException log
SEVERE: Native Exception: SAXException. Native Message: null
org.apache.ode.bpe.deployment.bpel.DeploymentException: Native Exception:
SAXException. Native Message: null
at
org.apache.ode.bpe.deployment.bpel.BPELParser.parseBPEL(BPELParser.java:107)
at
org.apache.ode.bpe.deployment.bpel.BPELDeploy.deployJar(BPELDeploy.java:177)
at
org.apache.ode.bpe.bped.unmanaged.BPELDeployerSLImpl.loadDefinition(BPELDeployerSLImpl.java:78)
at org.apache.servicemix.bpe.BPEDeployer.deploy(BPEDeployer.java:82)
at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:87)
at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:68)
at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:526)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:257)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeploymentService.java:507)
at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at
org.apache.ode.bpe.deployment.bpel.BPELSAXHandler.endElement(BPELSAXHandler.java:151)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at
org.apache.ode.bpe.deployment.bpel.BPELParser.parseBPEL(BPELParser.java:95)
... 11 more
[Fatal Error] :1:1: Content is not allowed in prolog.
I have include the wsdl and Bpel below:
<?xml version="1.0"?>
<bpws:process name="ServicemixBpelProcess"
targetNamespace="http://www.hp.com/ServicemixBpelProcess"
xmlns:tns="http://www.hp.com/ServicemixBpelProcess"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:ns1="http://www.hp.com/wsdl/"
xmlns:ns="http://www.hpPartnerLinks.wsdl"
xmlns:ns2="http://www.hp.com/xsd/">
<bpws:import location="../ConnectionPartnerLinks.wsdl"
namespace="http://www.hpPartnerLinks.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/">
</bpws:import>
<bpws:partnerLinks>
<bpws:partnerLink myRole="Connector"
name="ConnectionServicePartnerLink"
partnerLinkType="ns:ConnectionServicePartnerLink">
</bpws:partnerLink>
</bpws:partnerLinks>
<bpws:variables>
<bpws:variable name="Connection" messageType="ns1:Connection"/>
<bpws:variable name="ConnectResponse"
messageType="ns1:ConnectResponse"/>
</bpws:variables>
<bpws:faultHandlers></bpws:faultHandlers>
<bpws:eventHandlers></bpws:eventHandlers>
<bpws:sequence>
<bpws:receive partnerLink="ConnectionServicePartnerLink"
portType="ns1:IConnection" operation="Connect"
variable="Connection"
createInstance="yes">
</bpws:receive>
<bpws:assign>
<bpws:copy>
<bpws:from>
<bpws:literal>2</bpws:literal>
</bpws:from>
<bpws:to variable="ConnectResponse"
part="ConnectResponse"
query="/ns2:ConnectResponse/ns2:output"/>
</bpws:copy>
</bpws:assign>
<bpws:reply partnerLink="ConnectionServicePartnerLink"
portType="ns1:IConnection" operation="Connect"
variable="ConnectResponse">
</bpws:reply>
</bpws:sequence>
</bpws:process>
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Connection"
targetNamespace="http://www.hp.com/wsdl/"
xmlns:tns="http://www.hp.com/wsdl/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd1="http://www.hp.com/xsd/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://www.hp.com/xsd/" xmlns:tns="http://www.hp.com/xsd/">
<xsd:element name="Connection">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="input" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ConnectResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="output" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="Connection">
<wsdl:part name="Connection" type="xsd1:Connection"/>
</wsdl:message>
<wsdl:message name="ConnectResponse">
<wsdl:part name="ConnectResponse" type="xsd1:ConnectResponse"/>
</wsdl:message>
<wsdl:portType name="IConnection">
<wsdl:operation name="Connect">
<wsdl:input message="tns:Connection"/>
<wsdl:output message="tns:ConnectResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="IConnectionBinding" type="tns:IConnection">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Connect">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ConnectionService">
<wsdl:port name="IConnection" binding="tns:IConnectionBinding">
<soap:address location="http://localhost:8080/ccx/Connection"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Any ideas?
Thank you very much,
HelloWorld
--
View this message in context:
http://www.nabble.com/BPEL%3A-How-to-assign-a-literal-t1829382.html#a4990712
Sent from the ServiceMix - User forum at Nabble.com.