Author: nash
Date: Sat Apr 23 21:16:54 2011
New Revision: 1096233

URL: http://svn.apache.org/viewvc?rev=1096233&view=rev
Log:
TUSCANY-2322: print valid XML syntax for BPEL partnerLinkType element in WSDL, 
and add an itest module to check ?wsdl output

Added:
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/   (with props)
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/pom.xml
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/Account.java
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/CustomerProfileData.java
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/impl/
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/impl/AccountImpl.java
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.bpel
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.composite
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/test-wsdl-import.composite
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/jupiter.wsdl
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import-nested.wsdl
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import.wsdl
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdata.xsd
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdefs.xsd
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerinfo.xsd
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/
    tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/JupiterBPELTestCase.java
    
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/WSDLImportTestCase.java
Modified:
    tuscany/sca-java-1.x/trunk/itest/pom.xml
    
tuscany/sca-java-1.x/trunk/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/BPELExtensionHandler.java

Modified: tuscany/sca-java-1.x/trunk/itest/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/pom.xml?rev=1096233&r1=1096232&r2=1096233&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/pom.xml (original)
+++ tuscany/sca-java-1.x/trunk/itest/pom.xml Sat Apr 23 21:16:54 2011
@@ -141,6 +141,7 @@
                 <module>workspace-manager</module>
                 <module>wsdl</module>
                 <module>wsdlgen</module>
+                <module>wsdlgen-runtime</module>
                 <module>wsdlgen-verify</module>
                 <module>wsdlless</module>
                 <module>wsdl2java</module>

Propchange: tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Apr 23 21:16:54 2011
@@ -0,0 +1,19 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+maven-eclipse.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders

Added: tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/pom.xml?rev=1096233&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/pom.xml (added)
+++ tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/pom.xml Sat Apr 23 
21:16:54 2011
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-sca</artifactId>
+        <version>1.7-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>itest-wsdlgen-runtime</artifactId>
+    <name>Apache Tuscany SCA iTest runtime WSDL generation</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.7-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.7-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>1.7-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>    
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-bpel-ode</artifactId>
+            <version>1.7-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-jetty</artifactId>
+            <version>1.7-SNAPSHOT</version>
+            <scope>runtime</scope>            
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.5</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    
+    <build>
+       <finalName>${artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <!-- http://jira.codehaus.org/browse/SUREFIRE-322 -->
+                <version>2.3.1</version>
+                <configuration>
+                    <useFile>false</useFile>
+                    <trimStackTrace>false</trimStackTrace>
+                    <useSystemClassLoader>true</useSystemClassLoader>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.ode</groupId>
+                                    
<artifactId>ode-dao-jpa-ojpa-derby</artifactId>
+                                    <version>1.1.1</version>
+                                    <type>zip</type>
+                                    <overWrite>true</overWrite>
+                                    
<outputDirectory>${project.build.directory}/classes/</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/Account.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/Account.java?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/Account.java
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/Account.java
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package wsdlgen;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface Account {
+    
+    CustomerProfileData getCustomerProfile(String loginID);
+
+}

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/CustomerProfileData.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/CustomerProfileData.java?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/CustomerProfileData.java
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/CustomerProfileData.java
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package wsdlgen;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class CustomerProfileData {
+    
+    private String firstName;
+    private String lastName;
+    private String address;
+    private String email;
+    private String loginID;
+    private String password;
+    private int id;
+
+    public CustomerProfileData(String loginID) {
+        firstName = "John";
+        lastName = "Doe";
+        address = "345 Main Street";
+        email = "[email protected]";
+        this.loginID = loginID;
+        password = "hello";
+        id = 1234;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String firstName) {
+        this.lastName = lastName;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getLoginID() {
+        return loginID;
+    }
+
+    public void setLoginID(String loginID) {
+        this.loginID = loginID;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+}

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/impl/AccountImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/impl/AccountImpl.java?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/impl/AccountImpl.java
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/impl/AccountImpl.java
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package wsdlgen.impl;
+
+import wsdlgen.Account;
+import wsdlgen.CustomerProfileData;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class AccountImpl implements Account {
+
+    public CustomerProfileData getCustomerProfile(String loginID) {
+        return new CustomerProfileData(loginID);
+    }
+
+}

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.bpel
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.bpel?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.bpel
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.bpel
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,48 @@
+<process name="Jupiter"
+    targetNamespace="http://jupiter.ptg.company.com/jupiter";
+    xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/";
+    xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/";
+    xmlns:tns="http://jupiter.ptg.company.com/jupiter";
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+    xmlns:mw="http://jupiter.ptg.company.com/jupiter.wsdl";
+    queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+  <import location="wsdl/jupiter.wsdl" 
importType="http://schemas.xmlsoap.org/wsdl/";
+     namespace="http://jupiter.ptg.company.com/jupiter.wsdl"/>
+
+   <partnerLinks>
+      <partnerLink name="jupiterPartnerLink" 
partnerLinkType="mw:JupiterPartnerLinkType" myRole="me" />
+   </partnerLinks>
+    
+   <variables>
+     <variable name="myVar" messageType="mw:HelloMessage"/>
+     <variable name="tmpVar" type="xsd:string"/>
+   </variables>
+
+   <sequence>
+       <receive
+          name="start"
+          partnerLink="jupiterPartnerLink"
+          portType="mw:JupiterPortType"
+          operation="hello"
+          variable="myVar"
+          createInstance="yes"/>
+
+      <assign name="assign1">
+          <copy>
+              <from variable="myVar" part="TestPart"/>
+              <to variable="tmpVar"/>
+          </copy>
+          <copy>
+              <from>concat($tmpVar,' World')</from>
+              <to variable="myVar" part="TestPart"/>
+          </copy>
+      </assign>
+       <reply name="end"  
+              partnerLink="jupiterPartnerLink"
+              portType="mw:JupiterPortType" 
+              operation="hello"
+              variable="myVar"/>
+   </sequence>
+</process>

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.composite
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.composite?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.composite
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.composite
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+           targetNamespace="http://jupiter.ptg.company.com";
+           xmlns:mw="http://jupiter.ptg.company.com";
+                  xmlns:hns="http://jupiter.ptg.company.com/jupiter";
+           name="jupiter">
+
+    <component name="BPELHelloWorldComponent">
+        <implementation.bpel process="hns:Jupiter"/>
+        <service name="jupiterPartnerLink">
+                       <interface.wsdl 
interface="http://jupiter.ptg.company.com/jupiter.wsdl#wsdl.interface(JupiterPortType)"
 />
+            <binding.ws uri="http://localhost:8085/BPELHelloWorldComponent"; />
+        </service>
+       </component>
+    
+</composite>

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/test-wsdl-import.composite
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/test-wsdl-import.composite?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/test-wsdl-import.composite
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/test-wsdl-import.composite
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+           targetNamespace="http://accounts";
+           name="test-import">
+
+    <component name="Account">
+               <implementation.java class="wsdlgen.impl.AccountImpl" />
+        <service name="Account">
+            <binding.ws 
wsdlElement="http://account2#wsdl.port(AccountService/AccountSoapPort)" />
+        </service>
+    </component>
+
+</composite>

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/jupiter.wsdl
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/jupiter.wsdl?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/jupiter.wsdl
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/jupiter.wsdl
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<wsdl:definitions 
+    targetNamespace="http://jupiter.ptg.company.com/jupiter.wsdl";
+    xmlns="http://schemas.xmlsoap.org/wsdl/";
+    xmlns:tns="http://jupiter.ptg.company.com/jupiter.wsdl";
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
+    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
+    xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/";
+    xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/";>
+    
+    <wsdl:types>
+        <schema elementFormDefault="qualified" 
+           targetNamespace="http://jupiter.ptg.company.com/jupiter.wsdl"; 
+           xmlns="http://www.w3.org/2001/XMLSchema";>
+
+            <element name="hello">
+                <complexType>
+                    <sequence>
+                        <element name="message" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>            
+        </schema>
+    </wsdl:types>
+    
+    <wsdl:message name="HelloMessage">
+        <wsdl:part element="tns:hello" name="TestPart"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="JupiterPortType">
+        <wsdl:operation name="hello">
+            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+        </wsdl:operation>    
+    </wsdl:portType>
+    
+
+    <wsdl:binding name="JupiterSoapBinding" type="tns:JupiterPortType">
+        <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="hello">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="TestIn">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="TestOut">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>    
+    
+    <wsdl:service name="JupiterService">
+               <wsdl:port name="JupiterPort" binding="tns:JupiterSoapBinding">
+               <soap:address 
location="http://localhost:8085/ode/processes/helloWorld"/>
+               </wsdl:port>
+    </wsdl:service>
+    
+   <plnk:partnerLinkType name="JupiterPartnerLinkType">
+       <plnk:role name="me" portType="tns:JupiterPortType"/>
+       <plnk:role name="you" portType="tns:JupiterPortType"/>
+   </plnk:partnerLinkType>
+</wsdl:definitions>
\ No newline at end of file

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import-nested.wsdl
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import-nested.wsdl?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import-nested.wsdl
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import-nested.wsdl
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<wsdl:definitions targetNamespace="http://account3";
+                  xmlns:tns="http://account3";
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
+                  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
+                  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+                     name="test-import-nested">
+
+    <wsdl:types>
+        <xsd:schema elementFormDefault="qualified"
+                    targetNamespace="http://account3";
+                    xmlns:account="http://accounts";
+                    xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+
+            <xsd:import namespace="http://accounts"; 
schemaLocation="/xsd/customerdefs.xsd" />
+
+            <xsd:element name="getCustomerProfile">
+                <xsd:complexType>
+                    <xsd:sequence>
+                        <xsd:element name="loginID" type="xsd:string" />
+                    </xsd:sequence>
+                </xsd:complexType>
+            </xsd:element>
+
+            <xsd:element name="getCustomerProfileResponse">
+                <xsd:complexType>
+                    <xsd:sequence>
+                        <xsd:element name="customerProfile"
+                            type="account:CustomerProfileData" />
+                    </xsd:sequence>
+                </xsd:complexType>
+            </xsd:element>
+            
+        </xsd:schema>
+    </wsdl:types>
+
+    <wsdl:message name="getCustomerProfileRequest">
+        <wsdl:part element="tns:getCustomerProfile" name="parameters" />
+    </wsdl:message>
+
+    <wsdl:message name="getCustomerProfileResponse">
+        <wsdl:part element="tns:getCustomerProfileResponse" name="parameters" 
/>
+    </wsdl:message>
+
+    <wsdl:portType name="Account">
+        <wsdl:operation name="getCustomerProfile">
+            <wsdl:input message="tns:getCustomerProfileRequest" 
name="getCustomerProfileRequest" />
+            <wsdl:output message="tns:getCustomerProfileResponse" 
name="getCustomerProfileResponse" />
+        </wsdl:operation>
+    </wsdl:portType>
+
+</wsdl:definitions>

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import.wsdl
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import.wsdl?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import.wsdl
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import.wsdl
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<wsdl:definitions targetNamespace="http://account2";
+                  xmlns:tns="http://account2";
+                  xmlns:account3="http://account3";
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
+                  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
+                  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+                  
xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/";
+                     name="test-import">
+
+    <wsdl:import namespace="http://account3"; 
location="/wsdl/test-import-nested.wsdl" />
+
+    <wsdl:binding name="AccountSoapBinding" type="account3:Account">
+        <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"; />
+        <wsdl:operation name="getCustomerProfile">
+            <wsdlsoap:operation soapAction="" />
+            <wsdl:input name="getCustomerProfileRequest">
+                <wsdlsoap:body use="literal" />
+            </wsdl:input>
+            <wsdl:output name="getCustomerProfileResponse">
+                <wsdlsoap:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="AccountService">
+        <wsdl:port binding="tns:AccountSoapBinding" name="AccountSoapPort">
+            <wsdlsoap:address location="http://localhost:8086/AccountService"; 
/>
+        </wsdl:port>
+    </wsdl:service>
+
+    <plnk:partnerLinkType name="AccountPartnerLinkType">
+        <plnk:role name="me" portType="account3:Account" />
+        <plnk:role name="you" portType="account3:Account" />
+    </plnk:partnerLinkType>
+
+</wsdl:definitions>

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdata.xsd
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdata.xsd?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdata.xsd
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdata.xsd
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<xsd:schema elementFormDefault="qualified"
+            targetNamespace="http://accounts";
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+
+    <xsd:complexType name="CustomerProfileData">
+        <xsd:sequence>
+            <xsd:element name="firstName" type="xsd:string" />
+            <xsd:element name="lastName" type="xsd:string" />
+            <xsd:element name="address" type="xsd:string" />
+            <xsd:element name="email" type="xsd:string" />
+            <xsd:element name="loginID" type="xsd:string" />
+            <xsd:element name="password" type="xsd:string" />
+            <xsd:element name="id" type="xsd:int" />
+        </xsd:sequence>
+    </xsd:complexType>
+    
+</xsd:schema>

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdefs.xsd
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdefs.xsd?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdefs.xsd
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdefs.xsd
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<xsd:schema elementFormDefault="qualified"
+            targetNamespace="http://accounts";
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+
+    <xsd:include schemaLocation="customerdata.xsd" />
+    <xsd:include schemaLocation="/xsd/customerinfo.xsd" />
+    
+</xsd:schema>

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerinfo.xsd
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerinfo.xsd?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerinfo.xsd
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerinfo.xsd
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<xsd:schema elementFormDefault="qualified"
+            targetNamespace="http://accounts";
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+
+    <xsd:complexType name="CustomerProfileInfo">
+        <xsd:sequence>
+            <xsd:element name="firstName" type="xsd:string" />
+            <xsd:element name="lastName" type="xsd:string" />
+        </xsd:sequence>
+    </xsd:complexType>
+    
+</xsd:schema>

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/JupiterBPELTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/JupiterBPELTestCase.java?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/JupiterBPELTestCase.java
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/JupiterBPELTestCase.java
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package wsdlgen;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * Test ?wsdl works for WSDL with BPEL partnerLinkType definition
+ *
+ * @version $Rev$ $Date$
+ */
+public class JupiterBPELTestCase extends TestCase {
+
+    private SCADomain domain;
+
+    /**
+     * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+     */
+    public void testBPELPortEndpoint() throws Exception {
+        String endpoint = "http://localhost:8085/BPELHelloWorldComponent";;
+        String serviceNS = 
"http://jupiter.ptg.company.com/BPELHelloWorldComponent/jupiterPartnerLink";;
+        String serviceName = "JupiterPortTypeService";
+        String portName = "JupiterPortTypePort";
+
+        printWSDL(endpoint + "?wsdl");
+        printWSDL(endpoint + "?wsdl=wsdl/jupiter.wsdl");
+
+        WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+        wsdlReader.setFeature("javax.wsdl.verbose", false);
+        wsdlReader.setFeature("javax.wsdl.importDocuments", true);
+
+        Definition definition = wsdlReader.readWSDL(endpoint + "?wsdl");
+        assertNotNull(definition);
+        Service service = definition.getService(new QName(serviceNS, 
serviceName));
+        Port port = service.getPort(portName);
+        String address = getAddress(port);
+
+        assertEquals(endpoint, address);
+    }
+
+    private void printWSDL(String url) throws Exception {
+        InputStream inp = new URL(url).openStream();
+        BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+        String line;
+        while((line = br.readLine()) != null) {
+            System.out.println(line);
+        }
+        br.close();
+    }
+
+    private String getAddress(Port port) {
+        List wsdlPortExtensions = port.getExtensibilityElements();
+        for (final Object extension : wsdlPortExtensions) {
+            if (extension instanceof SOAPAddress) {
+                return ((SOAPAddress) extension).getLocationURI();
+            }
+        }
+        throw new RuntimeException("no SOAPAddress");
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        domain = SCADomain.newInstance("jupiter.composite");
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        domain.close();
+    }
+}

Added: 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/WSDLImportTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/WSDLImportTestCase.java?rev=1096233&view=auto
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/WSDLImportTestCase.java
 (added)
+++ 
tuscany/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/WSDLImportTestCase.java
 Sat Apr 23 21:16:54 2011
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package wsdlgen;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * Test ?wsdl works for WSDL with <wsdl:import>
+ *
+ * @version $Rev$ $Date$
+ */
+public class WSDLImportTestCase extends TestCase {
+
+    private SCADomain domain;
+
+    /**
+     * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+     */
+    public void testWSDLImportPortEndpoint() throws Exception {
+        String endpoint = "http://localhost:8086/AccountService";;
+        String serviceNS = "http://account2/Account/Account";;
+        String serviceName = "AccountService";
+        String portName = "AccountSoapPort";
+
+        printWSDL(endpoint + "?wsdl");
+
+        WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+        wsdlReader.setFeature("javax.wsdl.verbose", false);
+        wsdlReader.setFeature("javax.wsdl.importDocuments", true);
+
+        Definition definition = wsdlReader.readWSDL(endpoint + "?wsdl");
+        assertNotNull(definition);
+        Service service = definition.getService(new QName(serviceNS, 
serviceName));
+        Port port = service.getPort(portName);
+        String address = getAddress(port);
+
+        assertEquals(endpoint, address);
+    }
+
+    private void printWSDL(String url) throws Exception {
+        InputStream inp = new URL(url).openStream();
+        BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+        String line;
+        while((line = br.readLine()) != null) {
+            System.out.println(line);
+        }
+        br.close();
+    }
+
+    private String getAddress(Port port) {
+        List wsdlPortExtensions = port.getExtensibilityElements();
+        for (final Object extension : wsdlPortExtensions) {
+            if (extension instanceof SOAPAddress) {
+                return ((SOAPAddress) extension).getLocationURI();
+            }
+        }
+        throw new RuntimeException("no SOAPAddress");
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        domain = SCADomain.newInstance("test-wsdl-import.composite");
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        domain.close();
+    }
+}

Modified: 
tuscany/sca-java-1.x/trunk/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/BPELExtensionHandler.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/BPELExtensionHandler.java?rev=1096233&r1=1096232&r2=1096233&view=diff
==============================================================================
--- 
tuscany/sca-java-1.x/trunk/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/BPELExtensionHandler.java
 (original)
+++ 
tuscany/sca-java-1.x/trunk/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/BPELExtensionHandler.java
 Sat Apr 23 21:16:54 2011
@@ -58,16 +58,17 @@ public class BPELExtensionHandler implem
                BPELPartnerLinkTypeExt thePLinkType = (BPELPartnerLinkTypeExt) 
theElement;
                QName theType = thePLinkType.getElementType();
 
-               writer.println("<" + theType.toString() +
+               writer.println("<" + theType.getPrefix() + ":" + localName +
                                       " name=\"" + thePLinkType.getName() + 
"\">");
                for( int i = 0; i < 2; i++ ) {
                        if( thePLinkType.getRoleName( i ) != null ) {
-                               writer.println( "<" + theType.getPrefix() + 
":role"
+                               writer.println( "<" + theType.getPrefix() + ":" 
+ roleName
                                                       + " name=\"" + 
thePLinkType.getRoleName(i) + "\" portType=\""
-                                                      + 
thePLinkType.getRolePortType(i) + "\">");
+                                                      + 
thePLinkType.getRolePortType(i).getPrefix() + ":"
+                               + 
thePLinkType.getRolePortType(i).getLocalPart() + "\"/>");
                        } // end if
                } // end for
-               writer.println("</" + theType.toString() + ">");
+               writer.println("</" + theType.getPrefix() + ":" + localName + 
">");
        } // end marshall
 
        /**
@@ -89,7 +90,7 @@ public class BPELExtensionHandler implem
                // Check that this elementType really is a partnerLinkType 
element
                if( !elementType.getLocalPart().equals(localName) ) return null;
                BPELPartnerLinkTypeExt theExtension = new 
BPELPartnerLinkTypeExt();
-               theExtension.setElementType(elementType);
+        theExtension.setElementType(getQNameValue(def, 
theElement.getTagName()));
                theExtension.setName( theElement.getAttribute("name") );
 
                // Fetch the child "role" elements


Reply via email to