Author: karthick
Date: Thu Jan 21 19:37:38 2010
New Revision: 901836
URL: http://svn.apache.org/viewvc?rev=901836&view=rev
Log:
ODE-750 Handle Recursive WSDL Dependencies in BPEL Compiler
Added:
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference.bpel
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference1.wsdl
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference2.wsdl
Modified:
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/WSDLRegistry.java
Modified:
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/WSDLRegistry.java
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/WSDLRegistry.java?rev=901836&r1=901835&r2=901836&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/WSDLRegistry.java
(original)
+++
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/WSDLRegistry.java
Thu Jan 21 19:37:38 2010
@@ -134,6 +134,20 @@
__log.info("WSDL at " + defuri + " is a duplicate import, your
documents " +
"should all be in different namespaces (its's not nice
but will still work).");
}
+ boolean alreadyProcessed = false;
+ for (Definition4BPEL aDef :
_definitions.get(def.getTargetNamespace())) {
+ if
(aDef.getDocumentBaseURI().equals(def.getDocumentBaseURI())) {
+ alreadyProcessed = true;
+ break;
+ }
+ }
+ if (alreadyProcessed) {
+ if (__log.isInfoEnabled()) {
+ __log.info("WSDL at " + defuri + " is already imported,
this denotes a circular reference.");
+ // no need to keep going: either return or throw an
error
+ }
+ return;
+ }
}
ArrayList<Definition4BPEL> defs = null;
Added:
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference.bpel
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference.bpel?rev=901836&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference.bpel
(added)
+++
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference.bpel
Thu Jan 21 19:37:38 2010
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpel:process
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+ xmlns:pnlk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ode="http://www.apache.org/ode/type/extension"
+ xmlns:this="http://example.com/CircularReference1"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ xmlns:atomic="http://ode.apache.org/atomicScope"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ name="CircularReference"
+ targetNamespace="http://example.com/CircularReference">
+ <bpel:import namespace="http://example.com/CircularReference1"
location="CircularReference1.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"/>
+ <bpel:partnerLinks>
+ <bpel:partnerLink name="pnlk"
+ partnerLinkType="this:pnlkt"
+ myRole="pnlkt_role"/>
+ </bpel:partnerLinks>
+ <bpel:variables>
+ <bpel:variable name="start" messageType="this:EventStartMessageRequest"/>
+ </bpel:variables>
+
+ <bpel:sequence>
+ <bpel:receive portType="this:portType"
+ operation="EventStartMessage" variable="start"
+ createInstance="yes" name="start" partnerLink="pnlk" />
+ </bpel:sequence>
+</bpel:process>
\ No newline at end of file
Added:
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference1.wsdl
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference1.wsdl?rev=901836&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference1.wsdl
(added)
+++
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference1.wsdl
Thu Jan 21 19:37:38 2010
@@ -0,0 +1,50 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+xmlns:xs="http://www.w3.org/2001/XMLSchema"
+xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+xmlns:pnlk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+xmlns:xml="http://www.w3.org/XML/1998/namespace"
+xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+xmlns:this="http://example.com/CircularReference1"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+targetNamespace="http://example.com/CircularReference1">
+ <wsdl:types>
+ <xs:schema elementFormDefault="qualified"
targetNamespace="urn:targetnm">
+ <xs:element name="EventStartMessageRequest" type="xs:string"/>
+ <xs:element name="EventStartMessageResponse" type="xs:string"/>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:import namespace="http://example.com/CircularReference2"
location="CircularReference2.wsdl"/>
+ <wsdl:message name="EventStartMessageRequest">
+ <wsdl:part name="body" element="this:EventStartMessageRequest"/>
+ </wsdl:message>
+ <wsdl:message name="EventStartMessageResponse">
+ <wsdl:part name="body" element="this:EventStartMessageResponse"/>
+ </wsdl:message>
+ <pnlk:partnerLinkType name="pnlkt">
+ <pnlk:role name="pnlkt_role" portType="this:portType"/>
+ </pnlk:partnerLinkType>
+ <wsdl:portType name="portType">
+ <wsdl:operation name="EventStartMessage">
+ <wsdl:input message="this:EventStartMessageRequest"
name="EventStartMessage"/>
+ <wsdl:output message="this:EventStartMessageResponse"
name="EventStartMessageResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="binding" type="this:portType">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="EventStartMessage">
+ <soap:operation style="document"
soapAction="http://www.example.com/eventStartMessage"/>
+ <wsdl:input name="EventStartMessage">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="EventStartMessageResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="service">
+ <wsdl:port name="servicePort" binding="this:binding">
+ <soap:address location="http://example.com/hello"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Added:
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference2.wsdl
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference2.wsdl?rev=901836&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference2.wsdl
(added)
+++
ode/branches/APACHE_ODE_1.X/bpel-scripts/src/main/resources/2.0/good/circularReference/CircularReference2.wsdl
Thu Jan 21 19:37:38 2010
@@ -0,0 +1,47 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+xmlns:xs="http://www.w3.org/2001/XMLSchema"
+xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+xmlns:pnlk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+xmlns:xml="http://www.w3.org/XML/1998/namespace"
+xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+xmlns:this="http://example.com/CircularReference2"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+targetNamespace="http://example.com/CircularReference2">
+ <wsdl:types>
+ <xs:schema elementFormDefault="qualified"
targetNamespace="urn:targetnm">
+ <xs:element name="EventStartMessageRequest1" type="xs:string"/>
+ <xs:element name="EventStartMessageResponse1" type="xs:string"/>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:import namespace="http://example.com/CircularReference1"
location="CircularReference1.wsdl"/>
+ <wsdl:message name="EventStartMessageRequest1">
+ <wsdl:part name="body" element="this:EventStartMessageRequest1"/>
+ </wsdl:message>
+ <wsdl:message name="EventStartMessageResponse1">
+ <wsdl:part name="body" element="this:EventStartMessageResponse1"/>
+ </wsdl:message>
+ <wsdl:portType name="portType1">
+ <wsdl:operation name="EventStartMessage1">
+ <wsdl:input message="this:EventStartMessageRequest1"
name="EventStartMessage1"/>
+ <wsdl:output message="this:EventStartMessageResponse1"
name="EventStartMessageResponse1"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="binding1" type="this:portType1">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="EventStartMessage1">
+ <soap:operation style="document"
soapAction="http://www.example.com/eventStartMessage"/>
+ <wsdl:input name="EventStartMessage1">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="EventStartMessageResponse1">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="service1">
+ <wsdl:port name="servicePort" binding="this:binding1">
+ <soap:address location="http://example.com/hello"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file