Hi binh,
I think you misunderstood me.. I meant you shoud define the WSDL
namespaces with the process name tag.
<process
name="testBP"
targetNamespace="http://enterprise.netbeans.org/bpel/StringBP/testBP"
xmlns:tns="http://enterprise.netbeans.org/bpel/StringBP/testBP"
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:str="http://MyWS/"
xmlns:ns0="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:ns1="http://j2ee.netbeans.org/wsdl/testBP">
In the above segment have you mentioned the StringWSServiceWrapper.wsdl
file?
It should be like this,
<process
name="testBP"
targetNamespace="http://enterprise.netbeans.org/bpel/StringBP/testBP"
xmlns:tns="http://enterprise.netbeans.org/bpel/StringBP/testBP"
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-------------------------------------------------
-------------------------------------------------
xmlns:ns5="http://enterprise.netbeans.org/bpel/StringWSServiceWrapper">
and use at the partner link definition as,
<partnerLink name="StringPL" partnerLinkType="ns5:StringWSLinkType"
partnerRole="StringWSRole"/>
With your earlier design, StringPL partnerlink didn't have partner role or
PartnerLinkType.
You might think, then why its right for the 2nd partnerlink. But you are using same
namespace tag for both "*tns*"
(bpel and the wsdl(which you defined at the top))
Hope you will get it...
thanks,
ratha.
binh nguyen wrote:
Hi Ratha,
Actually, the partnerLinkType StringWSLinkType is defined in another WSDL
file that I forgot not to attach in the last mail. Here is the file:
file StringWSServiceWrapper.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<definitions
name="StringWSServiceWrapper"
targetNamespace="
http://enterprise.netbeans.org/bpel/StringWSServiceWrapper"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://enterprise.netbeans.org/bpel/StringWSServiceWrapper"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:ns="http://MyWS/">
<import location="StringWSService.wsdl" namespace="http://MyWS/"/>
<plnk:partnerLinkType name="StringWSLinkType">
<plnk:role name="StringWSRole" portType="ns:StringWS"/>
</plnk:partnerLinkType>
</definitions>
--------------------
Thank you very much for your attention and suggestions.
Please check it again for me, because I really need to fix this issue!
Cheers,
Binh.
2008/11/19 ratha <[EMAIL PROTECTED]>
Hi Binh,
I can find an error in your partnerlink definition. You defined as,
/<partnerLinks>
<partnerLink name="StringPL"
partnerLinkType="tns:StringWSLinkType"partnerRole="StringWSRole"
initializePartnerRole="yes" xmlns:tns="
http://enterprise.netbeans.org/bpel/StringWSServiceWrapper"/>
<partnerLink name="TestPartnerLink" xmlns:tns="
http://j2ee.netbeans.org/wsdl/testBP"
partnerLinkType="tns:testBPLT" myRole="testBPPortTypeRole"/>
</partnerLinks>
/StringPL is wrong.. Name space should be the relevant WSDL files name
space..You need to define at the start (with <bpel:process name> tag)
So your StringPL doesnt have partnerlinktype or partner role...May cause an
error..
Thanks.
regards,
ratha.
binh nguyen wrote:
Hi everyone,
I have a trouble with the assign activity, when the value of a variable is
always NULL after having been assigned NOT NULL value.
Here I show the bpel and wsdl files:
bpel file: testBP.bpel
<?xml version="1.0" encoding="UTF-8"?>
<process
name="testBP"
targetNamespace="http://enterprise.netbeans.org/bpel/StringBP/testBP"
xmlns:tns="http://enterprise.netbeans.org/bpel/StringBP/testBP"
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:str="http://MyWS/"
xmlns:ns0="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:ns1="http://j2ee.netbeans.org/wsdl/testBP">
<import namespace="http://j2ee.netbeans.org/wsdl/testBP"
location="testBP.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"/>
<import namespace="
http://enterprise.netbeans.org/bpel/StringWSServiceWrapper"
location="StringWSServiceWrapper.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"/>
<import namespace="http://MyWS/"
location="StringWSService.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"/>
<partnerLinks>
<partnerLink name="StringPL"
xmlns:tns="
http://enterprise.netbeans.org/bpel/StringWSServiceWrapper"
partnerLinkType="tns:StringWSLinkType"
partnerRole="StringWSRole"
initializePartnerRole="yes"/>
<partnerLink name="TestPartnerLink"
xmlns:tns="http://j2ee.netbeans.org/wsdl/testBP"
partnerLinkType="tns:testBPLT" myRole="testBPPortTypeRole"/>
</partnerLinks>
<variables>
<variable name="TestOneWayOut"
messageType="str:testOneWayResponseMsg"/>
<variable name="TestOneWayIn" messageType="str:testOneWayMsg"/>
<variable name="TestStringOut"
messageType="str:testStringResponseMsg"/>
<variable name="TestStringIn" messageType="str:testStringMsg"/>
<variable name="TestBPOperationOut" xmlns:tns="
http://j2ee.netbeans.org/wsdl/testBP"
messageType="tns:testBPOperationResponseMsg"/>
<variable name="TestBPOperationIn" xmlns:tns="
http://j2ee.netbeans.org/wsdl/testBP"
messageType="tns:testBPOperationRequestMsg"/>
</variables>
<sequence>
<receive name="Receive1" createInstance="yes"
partnerLink="TestPartnerLink"
operation="testBPOperation"
xmlns:tns="http://j2ee.netbeans.org/wsdl/testBP"
portType="tns:testBPPortType"
variable="TestBPOperationIn"/>
<assign name="InitMainVars">
<copy>
<from>
<literal>
<tns:testBPOperationResponse xmlns:tns="
http://j2ee.netbeans.org/wsdl/testBP">
<tns:return/>
</tns:testBPOperationResponse>
</literal>
</from>
<to>$TestBPOperationOut.partOut</to>
</copy>
</assign>
<assign name="InitTestOneWayVars">
<copy>
<from>
<literal>
<tns:testOneWay xmlns:tns="http://MyWS/">
</tns:testOneWay>
</literal>
</from>
<to>$TestOneWayIn.parameters</to>
</copy>
<copy>
<from>
<literal>
<tns:testOneWayResponse xmlns:tns="http://MyWS/">
<tns:return>NoChange</tns:return>
</tns:testOneWayResponse>
</literal>
</from>
<to>$TestOneWayOut.parameters</to>
</copy>
<copy>
<from variable="TestBPOperationIn" part="partIn"/>
<to>$TestOneWayIn.parameters</to>
</copy>
</assign>
<invoke name="InvokeTestOneWay" partnerLink="StringPL"
operation="testOneWay"
portType="str:StringWS"
inputVariable="TestOneWayIn"
outputVariable="TestOneWayOut"/>
<assign name="InitTestStringVars">
<copy>
<from>
<literal>
<tns:testString xmlns:tns="http://MyWS/">
<tns:input></tns:input>
</tns:testString>
</literal>
</from>
<to>$TestStringIn.parameters</to>
</copy>
<copy>
<from>
<literal>
<tns:testStringResponse xmlns:tns="http://MyWS/">
<tns:return></tns:return>>
</tns:testStringResponse>
</literal>
</from>
<to>$TestStringOut.parameters</to>
</copy>
*<!-- Error from this assign, the variable TestStringIn is always NULL
after
this asign -->*
<copy>
<!--<from part="partIn" variable="TestBPOperationIn"
query="/partIn/input"/>
-->
<from>$TestBPOperationIn.partIn/ns1:input</from>
<to part="parameters" variable="TestStringIn" />
<!--
<from>
<literal>
<tns:input xmlns:tns="http://MyWS/">
<![CDATA[$TestBPOperationIn.parameters/ns1:input]]>
</tns:input>
</literal>
</from>
-->
</copy>
</assign>
*<!-- TestStringIn is NULL in this INVOKE -->*
<invoke name="InvokeTestString" partnerLink="StringPL"
operation="testString"
portType="str:StringWS"
inputVariable="TestStringIn"
outputVariable="TestStringOut"/>
<assign name="Assign2">
<copy>
<from>concat($TestBPOperationIn.partIn/ns1:input, '->',
$TestOneWayOut.parameters, '->',
$TestStringOut.parameters, '->', ' OK!')
</from>
<to variable="TestBPOperationOut" part="partOut"></to>
</copy>
</assign>
<reply name="Reply1" partnerLink="TestPartnerLink"
operation="testBPOperation"
xmlns:tns="http://j2ee.netbeans.org/wsdl/testBP"
portType="tns:testBPPortType"
variable="TestBPOperationOut"/>
</sequence>
</process>
--------------------
wsdl file: testBP.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="testBP"
targetNamespace="http://j2ee.netbeans.org/wsdl/testBP"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://j2ee.netbeans.org/wsdl/testBP"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TYPE DEFINITION - List of types participating in this BPEL process
The BPEL Designer will generate default request and response types
but you can define or import any XML Schema type and use them as part
of the message types.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<types>
<schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://j2ee.netbeans.org/wsdl/testBP"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="testBPOperationRequest">
<complexType>
<sequence>
<element name="input" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="testBPOperationResponse">
<complexType>
<sequence>
<element name="return" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="testBPOperationRequestMsg">
<part name="partIn" element="tns:testBPOperationRequest"/>
</message>
<message name="testBPOperationResponseMsg">
<part name="partOut" element="tns:testBPOperationResponse"/>
</message>
<portType name="testBPPortType">
<operation name="testBPOperation">
<input name="input1" message="tns:testBPOperationRequestMsg"/>
<output name="output1"
message="tns:testBPOperationResponseMsg"/>
</operation>
</portType>
<binding name="testBPBinding" type="tns:testBPPortType">
<soap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>
<operation name="testBPOperation">
<soap:operation/>
<input name="input1">
<soap:body use="literal" />
</input>
<output name="output1">
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="testBPService">
<port name="testBPPort" binding="tns:testBPBinding">
<soap:address location="
http://localhost:8080/ode/processes/testBP"/>
<!--<soap:address location="
http://localhost:8080/active-bpel/services/testBP"/>-->
</port>
</service>
<plnk:partnerLinkType name="testBPLT">
<plnk:role name="testBPPortTypeRole"
portType="tns:testBPPortType"/>
</plnk:partnerLinkType>
</definitions>
------------
more wsdl file StringWSService.wsdl
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version
is
JAX-WS RI 2.1.4-b01-. -->
<definitions targetNamespace="http://MyWS/"
name="StringWSService"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://MyWS/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<xsd:schema>
<xsd:import namespace="http://MyWS/"
schemaLocation="StringWSService_schema1.xsd"/>
</xsd:schema>
</types>
<message name="testStringMsg">
<part name="parameters" element="tns:testString"/>
</message>
<message name="testStringResponseMsg">
<part name="parameters" element="tns:testStringResponse"/>
</message>
<message name="testOneWayMsg">
<part name="parameters" element="tns:testOneWay"/>
</message>
<message name="testOneWayResponseMsg">
<part name="parameters" element="tns:testOneWayResponse"/>
</message>
<portType name="StringWS">
<operation name="testString">
<input message="tns:testStringMsg"/>
<output message="tns:testStringResponseMsg"/>
</operation>
<operation name="testOneWay">
<input message="tns:testOneWayMsg"/>
<output message="tns:testOneWayResponseMsg"/>
</operation>
</portType>
<binding name="StringWSPortBinding" type="tns:StringWS">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<operation name="testString">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="testOneWay">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="StringWSService">
<port name="StringWSPort" binding="tns:StringWSPortBinding">
<soap:address location="http://localhost:8080/MyWS/StringWS"/>
</port>
</service>
</definitions>
--------------------
In the testBP.bpel file, the value of variable TestStringIn is always NULL
event after it has been assigned by Non NULL value.
I do not know how to assign it correctly?
Any advice is appreciated!
Binh.
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database:
270.9.4/1791 - Release Date: 11/15/2008 6:57 PM
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.9.4/1791 - Release Date: 11/15/2008 6:57 PM