From c7470838c769402fccab7c9eef31db32dd8c7936 Mon Sep 17 00:00:00 2001 From: nash Date: Sat, 23 Apr 2011 21:16:54 +0000 Subject: TUSCANY-2322: print valid XML syntax for BPEL partnerLinkType element in WSDL, and add an itest module to check ?wsdl output git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1096233 13f79535-47bb-0310-9956-ffa450edef68 --- sca-java-1.x/trunk/itest/pom.xml | 1 + sca-java-1.x/trunk/itest/wsdlgen-runtime/pom.xml | 116 +++++++++++++++++++++ .../src/main/java/wsdlgen/Account.java | 34 ++++++ .../src/main/java/wsdlgen/CustomerProfileData.java | 103 ++++++++++++++++++ .../src/main/java/wsdlgen/impl/AccountImpl.java | 36 +++++++ .../src/main/resources/jupiter.bpel | 48 +++++++++ .../src/main/resources/jupiter.composite | 16 +++ .../src/main/resources/test-wsdl-import.composite | 31 ++++++ .../src/main/resources/wsdl/jupiter.wsdl | 63 +++++++++++ .../main/resources/wsdl/test-import-nested.wsdl | 70 +++++++++++++ .../src/main/resources/wsdl/test-import.wsdl | 55 ++++++++++ .../src/main/resources/xsd/customerdata.xsd | 36 +++++++ .../src/main/resources/xsd/customerdefs.xsd | 27 +++++ .../src/main/resources/xsd/customerinfo.xsd | 31 ++++++ .../src/test/java/wsdlgen/JupiterBPELTestCase.java | 103 ++++++++++++++++++ .../src/test/java/wsdlgen/WSDLImportTestCase.java | 102 ++++++++++++++++++ .../wsdl/xml/BPELExtensionHandler.java | 11 +- 17 files changed, 878 insertions(+), 5 deletions(-) create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/pom.xml create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/Account.java create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/CustomerProfileData.java create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/impl/AccountImpl.java create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.bpel create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.composite create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/test-wsdl-import.composite create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/jupiter.wsdl create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import-nested.wsdl create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import.wsdl create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdata.xsd create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdefs.xsd create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerinfo.xsd create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/JupiterBPELTestCase.java create mode 100644 sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/WSDLImportTestCase.java (limited to 'sca-java-1.x') diff --git a/sca-java-1.x/trunk/itest/pom.xml b/sca-java-1.x/trunk/itest/pom.xml index de22d1b188..d89d986349 100644 --- a/sca-java-1.x/trunk/itest/pom.xml +++ b/sca-java-1.x/trunk/itest/pom.xml @@ -141,6 +141,7 @@ workspace-manager wsdl wsdlgen + wsdlgen-runtime wsdlgen-verify wsdlless wsdl2java diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/pom.xml b/sca-java-1.x/trunk/itest/wsdlgen-runtime/pom.xml new file mode 100644 index 0000000000..226a0dc9b2 --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/pom.xml @@ -0,0 +1,116 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.7-SNAPSHOT + ../../pom.xml + + itest-wsdlgen-runtime + Apache Tuscany SCA iTest runtime WSDL generation + + + + org.apache.tuscany.sca + tuscany-host-embedded + 1.7-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.7-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 1.7-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-bpel-ode + 1.7-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + 1.7-SNAPSHOT + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-surefire-plugin + + 2.3.1 + + false + false + true + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + compile + + unpack + + + + + org.apache.ode + ode-dao-jpa-ojpa-derby + 1.1.1 + zip + true + ${project.build.directory}/classes/ + + + + + + + + + + diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/Account.java b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/Account.java new file mode 100644 index 0000000000..e3eb4ff6f6 --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/Account.java @@ -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); + +} diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/CustomerProfileData.java b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/CustomerProfileData.java new file mode 100644 index 0000000000..af704da190 --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/CustomerProfileData.java @@ -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 = "john@doe.org"; + 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; + } + +} diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/impl/AccountImpl.java b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/impl/AccountImpl.java new file mode 100644 index 0000000000..3695487e30 --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/java/wsdlgen/impl/AccountImpl.java @@ -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); + } + +} diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.bpel b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.bpel new file mode 100644 index 0000000000..0f145c705e --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.bpel @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + concat($tmpVar,' World') + + + + + + diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.composite b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.composite new file mode 100644 index 0000000000..beebeee9a3 --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/jupiter.composite @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/test-wsdl-import.composite b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/test-wsdl-import.composite new file mode 100644 index 0000000000..1f810470b9 --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/test-wsdl-import.composite @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/jupiter.wsdl b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/jupiter.wsdl new file mode 100644 index 0000000000..91e1ef279e --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/jupiter.wsdl @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import-nested.wsdl b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import-nested.wsdl new file mode 100644 index 0000000000..842ac1b756 --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import-nested.wsdl @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import.wsdl b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import.wsdl new file mode 100644 index 0000000000..f3446c427e --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/wsdl/test-import.wsdl @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdata.xsd b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdata.xsd new file mode 100644 index 0000000000..f09ed09b6a --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdata.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdefs.xsd b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdefs.xsd new file mode 100644 index 0000000000..f312920b7c --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerdefs.xsd @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerinfo.xsd b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerinfo.xsd new file mode 100644 index 0000000000..7c903c6394 --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/main/resources/xsd/customerinfo.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/JupiterBPELTestCase.java b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/JupiterBPELTestCase.java new file mode 100644 index 0000000000..d82ed47b12 --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/JupiterBPELTestCase.java @@ -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(); + } +} diff --git a/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/WSDLImportTestCase.java b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/WSDLImportTestCase.java new file mode 100644 index 0000000000..7b6d4f3c69 --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen-runtime/src/test/java/wsdlgen/WSDLImportTestCase.java @@ -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 + * + * @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(); + } +} diff --git a/sca-java-1.x/trunk/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/BPELExtensionHandler.java b/sca-java-1.x/trunk/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/BPELExtensionHandler.java index 13203d4adc..67fd568e3b 100644 --- a/sca-java-1.x/trunk/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/BPELExtensionHandler.java +++ b/sca-java-1.x/trunk/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/BPELExtensionHandler.java @@ -58,16 +58,17 @@ public class BPELExtensionHandler implements ExtensionSerializer, ExtensionDeser 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(""); + writer.println(""); } // end marshall /** @@ -89,7 +90,7 @@ public class BPELExtensionHandler implements ExtensionSerializer, ExtensionDeser // 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 -- cgit v1.2.3