Ok, got that to work. Thanks! :)
Now if I add the assignment to the dynamic header I get a compile error:
file:/home/mpanahi/Desktop/apache-ode-war-1.1.1/examples/HelloWorld2/HelloWorld2.bpel:90:
error: [CopyToMessageFromNonMessage] Copy to message variable Variable1
requires a message for the r-value.
java org.apache.ode.tools.bpelc.cline.BpelC: error: [CompilationErrors]
Compilation completed with 1 error(s):
file:/home/mpanahi/Desktop/apache-ode-war-1.1.1/examples/HelloWorld2/HelloWorld2.bpel:90:
error: [CopyToMessageFromNonMessage] Copy to message variable Variable1
requires a message for the r-value.
The new BPEL assign code is below. Does "someHeader" have to be declared
somewhere else like in the wsdl?? Thanks for your help. I really need to
get this to work. :-D
<assign name="assign1">
<copy>
<from>
<literal>
<ns0:Company>
<ns0:Person>
<ns1:Name></ns1:Name>
</ns0:Person>
</ns0:Company>
</literal>
</from>
<to variable="newVariable1"/>
</copy>
<copy>
<from>
<literal>Foo Name</literal>
</from>
<to>$newVariable1/ns0:Person/ns1:Name</to>
</copy>
<copy>
<from>$newVariable1</from>
<to variable="Variable1" header="someHeader"/>
</copy>
</assign>
On Thu, Apr 24, 2008 at 7:07 PM, Matthieu Riou <[EMAIL PROTECTED]>
wrote:
> On Thu, Apr 24, 2008 at 4:20 PM, Mark Panahi <[EMAIL PROTECTED]> wrote:
>
> > Ok, I copied the schema from
> >
> >
> bpel-test/src/test/resources/bpel/2.0/TestXPathNamespace2/TestXPathNamespace2.wsdl
> > into a wsdl file I'm importing (Component1.wsdl) and tried to test it in
> my
> > bpel.
> >
> > I tried the following:
> >
> > <assign name="assign1">
> > <copy>
> >
> >
> >
> <from><literal><ns0:Person><ns1:Name></ns1:Name></ns0:Person></literal></from>
> > <to variable="newVariable1"/>
> > </copy>
> > <copy>
> > <from>
> > <literal>Foo Name</literal>
> > </from>
> > <to>$newVariable1/ns0:Person/ns1:Name</to>
> > </copy>
> > </assign>
> >
> > And got the error:
> >
> > ERROR - GeronimoLog.error(104) | Assignment Fault: {
> >
> >
> http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,lineNo=93,faultExplanation=No<http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=93,faultExplanation=No>
> <
> http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=93,faultExplanation=No
> >
> > <
> >
> http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=93,faultExplanation=No
> > >results
> > for expression: {OXPath10Expression
> > $newVariable1/ns0:Person/ns1:Name}
> >
> > Any ideas? Is it a namespace issue? I've pasted more complete versions of
> > the BPEL and WSDL below.
> >
>
> Your variable being a ns0:Company element, it seems to me that you should
> at
> least have a ns0:Company element in your literal :)
>
> Matthieu
>
>
> >
> > If you want more details of the log trace let me know.
> >
> > Thanks in advance,
> >
> > Mark
> >
> > ---------------------------------
> >
> > Here's the BPEL:
> >
> > <process name="HelloWorld2"
> > targetNamespace="http://ode/bpel/unit-test"
> > xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
> > xmlns:tns="http://ode/bpel/unit-test"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:test="http://ode/bpel/unit-test.wsdl"
> > xmlns:ns3="http://components.llama.uci.edu"
> > xmlns:ode="http://www.apache.org/ode/type/extension"
> > xmlns:ns0="http://www.company.org"
> > xmlns:ns1="http://www.person.org"
> > xmlns:bpel="
> > http://docs.oasis-open.org/wsbpel/2.0/process/executable"
> > xmlns:ns2="http://www.product.org"
> > queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
> >
> > expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
> >
> > <import location="HelloWorld2.wsdl"
> > namespace="http://ode/bpel/unit-test.wsdl"
> > importType="http://schemas.xmlsoap.org/wsdl/" />
> > <import location="Component1.wsdl"
> > namespace="http://components.llama.uci.edu"
> > importType="http://schemas.xmlsoap.org/wsdl/"/>
> >
> > <partnerLinks>
> > <partnerLink name="helloPartnerLink"
> > partnerLinkType="test:HelloPartnerLinkType"
> > myRole="me" />
> > <partnerLink name="PartnerLink1"
> > partnerLinkType="ns3:muleLinkType"
> > partnerRole="muleRole"/>
> > </partnerLinks>
> >
> > <variables>
> > <variable name="myVar" messageType="test:HelloMessage"/>
> > <variable name="tmpVar" type="xsd:string"/>
> > <variable name="Variable2" messageType="ns3:execResponse"/>
> > <variable name="Variable1" messageType="ns3:execRequest"/>
> > <variable name="newVariable1" element="ns0:Company"/>
> > </variables>
> >
> > <sequence>
> > <receive
> > name="start"
> > partnerLink="helloPartnerLink"
> > portType="test:HelloPortType"
> > operation="hello"
> > variable="myVar"
> > createInstance="yes">
> > </receive>
> >
> > <assign name="assign1">
> > <copy>
> >
> >
> >
> <from><literal><ns0:Person><ns1:Name></ns1:Name></ns0:Person></literal></from>
> > <to variable="newVariable1"/>
> > </copy>
> > <copy>
> > <from>
> > <literal>Foo Name</literal>
> > </from>
> > <to>$newVariable1/ns0:Person/ns1:Name</to>
> > </copy>
> > </assign>
> >
> > <invoke name="Invoke1" partnerLink="PartnerLink1"
> > operation="exec"
> > portType="ns3:mulePortType"
> > inputVariable="Variable1"
> > outputVariable="Variable2">
> > <correlations>
> > <correlation set="dummyCorr" initiate="no"/>
> > </correlations>
> > </invoke>
> > <reply name="end"
> > partnerLink="helloPartnerLink"
> > portType="test:HelloPortType"
> > operation="hello"
> > variable="myVar"/>
> > </sequence>
> > </process>
> >
> > And here's the top part of Component1.wsdl:
> >
> > <wsdl:definitions targetNamespace="http://components.llama.uci.edu"
> > xmlns:apachesoap="http://xml.apache.org/xml-soap"
> > xmlns:impl="http://components.llama.uci.edu"
> > xmlns:intf="http://components.llama.uci.edu"
> > xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns="http://schemas.xmlsoap.org/wsdl/"
> > xmlns:plnk="
> > http://docs.oasis-open.org/wsbpel/2.0/plnktype
> > "
> > xmlns:s0="http://www.openuri.org"
> > xmlns:tns1="http://www.person.org"
> > xmlns:tns2="http://www.product.org"
> > xmlns:tns3="http://www.company.org"
> > >
> >
> > <types>
> > <xsd:schema elementFormDefault="unqualified" targetNamespace="
> > http://www.person.org"
> > xmlns="http://www.person.org"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > <xsd:complexType name="PersonType">
> > <xsd:sequence>
> > <xsd:element name="Name" type="xsd:string"/>
> > <xsd:element name="SSN" type="xsd:string"/>
> > </xsd:sequence>
> > </xsd:complexType>
> > </xsd:schema>
> > <xsd:schema elementFormDefault="unqualified" targetNamespace="
> > http://www.product.org"
> > xmlns="http://www.product.org"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > <xsd:complexType name="ProductType">
> > <xsd:sequence>
> > <xsd:element name="Type" type="xsd:string"/>
> > </xsd:sequence>
> > </xsd:complexType>
> > </xsd:schema>
> > <xsd:schema elementFormDefault="unqualified" targetNamespace="
> > http://www.company.org"
> > xmlns="http://www.company.org" xmlns:per="
> > http://www.person.org" xmlns:pro="http://www.product.org"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > <xsd:import namespace="http://www.person.org"></xsd:import>
> > <xsd:import namespace="http://www.product.org"></xsd:import>
> > <xsd:element name="Company">
> > <xsd:complexType>
> > <xsd:sequence>
> > <xsd:element maxOccurs="unbounded" name="Person"
> > type="per:PersonType"/>
> > <xsd:element maxOccurs="unbounded" name="Product"
> > type="pro:ProductType"/>
> > </xsd:sequence>
> > </xsd:complexType>
> > </xsd:element>
> > </xsd:schema>
> >
> > <xsd:schema
> > targetNamespace="h" xmlns="h"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > </xsd:schema>
> > </types>
> >
> > ....
> >
>