diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-23 16:17:53 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-23 16:17:53 +0000 |
commit | ff6e6a7002b1cc773ce8fed5cd11add77823bafb (patch) | |
tree | 01a2f51e8188357c5f8e603769524396c665c86b | |
parent | 992ab88dec30e1351f3cd782b174bdf375d14930 (diff) |
Merge the fix for TUSCANY-2388 from trunk
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@670666 13f79535-47bb-0310-9956-ffa450edef68
20 files changed, 1239 insertions, 14 deletions
diff --git a/branches/sca-java-1.3/itest/wsdlless/pom.xml b/branches/sca-java-1.3/itest/wsdlless/pom.xml index ddf917ec51..753a053272 100644 --- a/branches/sca-java-1.3/itest/wsdlless/pom.xml +++ b/branches/sca-java-1.3/itest/wsdlless/pom.xml @@ -28,6 +28,20 @@ <artifactId>itest-wsdlless</artifactId> <name>Apache Tuscany SCA WSDLless Support Integration Tests</name> + <repositories> + <repository> + <id>java.net</id> + <name>java.net Maven 1.x Repository</name> + <url>http://download.java.net/maven/1</url> + <layout>legacy</layout> + </repository> + <repository> + <id>java.net2</id> + <name>java.net Maven 2.x Repository</name> + <url>http://download.java.net/maven/2</url> + </repository> + </repositories> + <dependencies> <dependency> <groupId>org.apache.tuscany.sca</groupId> @@ -84,11 +98,64 @@ <scope>compile</scope> </dependency> + <dependency> + <groupId>com.sun.xml.ws</groupId> + <artifactId>jaxws-rt</artifactId> + <version>2.1.4</version> + <scope>test</scope> + </dependency> </dependencies> <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy</id> + <phase>generate-sources</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>javax.xml.bind</groupId> + <artifactId>jaxb-api</artifactId> + <version>2.1</version> + <type>jar</type> + </artifactItem> + <artifactItem> + <groupId>javax.xml.ws</groupId> + <artifactId>jaxws-api</artifactId> + <version>2.1</version> + <type>jar</type> + </artifactItem> + <!-- + <artifactItem> + <groupId>com.sun.xml.ws</groupId> + <artifactId>jaxws-rt</artifactId> + <version>2.1.4</version> + <type>jar</type> + </artifactItem> + --> + </artifactItems> + <outputDirectory>${project.build.directory}/endorsed</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <argLine>-Djava.endorsed.dirs=target/endorsed</argLine> + </configuration> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.0</version> @@ -132,4 +199,4 @@ </plugin> </plugins> </build> -</project> +</project>
\ No newline at end of file diff --git a/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/AnObject.java b/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/AnObject.java new file mode 100644 index 0000000000..65ba52f356 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/AnObject.java @@ -0,0 +1,62 @@ +/* + * 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 service; + +public class AnObject { + + private String someRetValue; + private Integer someOtherRetValue; + + public AnObject() { + } + + public AnObject(String someRetValue, Integer someOtherRetValue) { + this.someRetValue = someRetValue; + this.someOtherRetValue = someOtherRetValue; + } + + /** + * @return the someOtherRetValue + */ + public Integer getSomeOtherRetValue() { + return someOtherRetValue; + } + + /** + * @param someOtherRetValue the someOtherRetValue to set + */ + public void setSomeOtherRetValue(Integer someOtherRetValue) { + this.someOtherRetValue = someOtherRetValue; + } + + /** + * @return the someRetValue + */ + public String getSomeRetValue() { + return someRetValue; + } + + /** + * @param someRetValue the someRetValue to set + */ + public void setSomeRetValue(String someRetValue) { + this.someRetValue = someRetValue; + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/MoreComplexObject.java b/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/MoreComplexObject.java new file mode 100644 index 0000000000..69eba6701d --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/MoreComplexObject.java @@ -0,0 +1,53 @@ +/* + * 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 service; + +import java.io.Serializable; + +public class MoreComplexObject implements Serializable { + private static final long serialVersionUID = 43242314234123L; + private String stringParam; + private Integer intParam; + private String stringParam2; + + public String getStringParam() { + return stringParam; + } + + public void setStringParam(String stringParam) { + this.stringParam = stringParam; + } + + public Integer getIntParam() { + return intParam; + } + + public void setIntParam(Integer intParam) { + this.intParam = intParam; + } + + public String getStringParam2() { + return stringParam2; + } + + public void setStringParam2(String stringParam2) { + this.stringParam2 = stringParam2; + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/SomeService.java b/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/SomeService.java new file mode 100644 index 0000000000..f6aaacb23a --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/SomeService.java @@ -0,0 +1,31 @@ +/* + * 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 service; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +public interface SomeService { + + public AnObject getUsingString(String stringParam); + + public AnObject getUsingMoreComplexObject(MoreComplexObject moreComplexParam); + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/SomeServiceImpl.java b/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/SomeServiceImpl.java new file mode 100644 index 0000000000..39a2131024 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/main/java/service/SomeServiceImpl.java @@ -0,0 +1,42 @@ +/* + * 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 service; + +import org.osoa.sca.annotations.Service; + +@Service(SomeService.class) +public class SomeServiceImpl implements SomeService { + + public AnObject getUsingString(String stringParam) { + System.out.println("Param value:" + stringParam); + + return getAnObject(stringParam); + } + + private AnObject getAnObject(String stringParam) { + return new AnObject(stringParam + "123", 123); + } + + public AnObject getUsingMoreComplexObject(MoreComplexObject moreComplexParam) { + System.out.println("Param value:" + moreComplexParam.getStringParam()); + + return getAnObject(moreComplexParam.getStringParam()); + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/main/resources/some.composite b/branches/sca-java-1.3/itest/wsdlless/src/main/resources/some.composite new file mode 100644 index 0000000000..1b099239d1 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/main/resources/some.composite @@ -0,0 +1,33 @@ +<?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://test" xmlns:test="http://test"
+ name="some">
+ <service name="SomeServices" promote="SomeServicesComponent">
+ <binding.ws uri="http://localhost:8085/SomeServices" />
+ </service>
+
+ <component name="SomeServicesComponent">
+ <implementation.java class="service.SomeServiceImpl" />
+ <service name="SomeService">
+ <interface.java interface="service.SomeService" />
+ </service>
+ </component>
+
+</composite>
diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/SomeComponentTestCase.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/SomeComponentTestCase.java new file mode 100644 index 0000000000..7c62287c57 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/SomeComponentTestCase.java @@ -0,0 +1,83 @@ +/* + * 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 service; + +import static org.junit.Assert.assertEquals; + +import java.net.URL; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +import service.generated.SomeServiceService; + +/** + * @author pxk3 + * + */ +public class SomeComponentTestCase { + private static SCADomain scaDomain; + private static SomeService someService; + + @BeforeClass + public static void setUp() throws Exception { + scaDomain = SCADomain.newInstance("some.composite"); + someService = scaDomain.getService(SomeService.class, "SomeServicesComponent"); + } + + @AfterClass + public static void tearDown() throws Exception { + scaDomain.close(); + } + + @Test + public void testGetUsingMoreComplexObject() throws Exception { + String stringParam = "ABC"; + URL url = new URL("http://localhost:8085/SomeServices?wsdl"); + QName serviceQName = new QName("http://service/", "SomeServiceService"); + SomeServiceService service = new SomeServiceService(url, serviceQName); + service.generated.SomeService proxy = service.getSomeServicePort(); + service.generated.AnObject obj = proxy.getUsingString(stringParam); + assertEquals(stringParam + "123", obj.getSomeRetValue()); + + service.generated.MoreComplexObject obj2 = new service.generated.MoreComplexObject(); + obj2.setStringParam(stringParam); + obj2.setStringParam2("2"); + obj2.setIntParam(new Integer(0)); + + obj = proxy.getUsingMoreComplexObject(obj2); + assertEquals(stringParam + "123", obj.getSomeRetValue()); + } + + @Test + public void testLocal() { + String stringParam = "1234"; + MoreComplexObject moreComplexParam = new MoreComplexObject(); + moreComplexParam.setStringParam(stringParam); + + AnObject anObject = someService.getUsingMoreComplexObject(moreComplexParam); + + assertEquals(stringParam + "123", anObject.getSomeRetValue()); + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/AnObject.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/AnObject.java new file mode 100644 index 0000000000..effeb3c701 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/AnObject.java @@ -0,0 +1,100 @@ +/* + * 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 service.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +/** + * <p>Java class for anObject complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * <complexType name="anObject"> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <sequence> + * <element name="someOtherRetValue" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> + * <element name="someRetValue" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> + * </sequence> + * </restriction> + * </complexContent> + * </complexType> + * </pre> + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "anObject", namespace = "", propOrder = {"someOtherRetValue", "someRetValue"}) +public class AnObject { + + protected Integer someOtherRetValue; + protected String someRetValue; + + /** + * Gets the value of the someOtherRetValue property. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getSomeOtherRetValue() { + return someOtherRetValue; + } + + /** + * Sets the value of the someOtherRetValue property. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setSomeOtherRetValue(Integer value) { + this.someOtherRetValue = value; + } + + /** + * Gets the value of the someRetValue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSomeRetValue() { + return someRetValue; + } + + /** + * Sets the value of the someRetValue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSomeRetValue(String value) { + this.someRetValue = value; + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingMoreComplexObject.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingMoreComplexObject.java new file mode 100644 index 0000000000..284e961788 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingMoreComplexObject.java @@ -0,0 +1,79 @@ +/* + * 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 service.generated; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +/** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * <complexType> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <sequence> + * <element name="arg0" type="{}moreComplexObject" minOccurs="0"/> + * </sequence> + * </restriction> + * </complexContent> + * </complexType> + * </pre> + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = {"arg0"}) +@XmlRootElement(name = "getUsingMoreComplexObject", namespace = "http://service/") +public class GetUsingMoreComplexObject { + + @XmlElementRef(name = "arg0", type = JAXBElement.class) + protected JAXBElement<MoreComplexObject> arg0; + + /** + * Gets the value of the arg0 property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link MoreComplexObject }{@code >} + * + */ + public JAXBElement<MoreComplexObject> getArg0() { + return arg0; + } + + /** + * Sets the value of the arg0 property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link MoreComplexObject }{@code >} + * + */ + public void setArg0(JAXBElement<MoreComplexObject> value) { + this.arg0 = ((JAXBElement<MoreComplexObject>)value); + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingMoreComplexObjectResponse.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingMoreComplexObjectResponse.java new file mode 100644 index 0000000000..4113aa1a0a --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingMoreComplexObjectResponse.java @@ -0,0 +1,79 @@ +/* + * 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 service.generated; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +/** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * <complexType> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <sequence> + * <element name="return" type="{}anObject" minOccurs="0"/> + * </sequence> + * </restriction> + * </complexContent> + * </complexType> + * </pre> + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = {"_return"}) +@XmlRootElement(name = "getUsingMoreComplexObjectResponse", namespace = "http://service/") +public class GetUsingMoreComplexObjectResponse { + + @XmlElementRef(name = "return", type = JAXBElement.class) + protected JAXBElement<AnObject> _return; + + /** + * Gets the value of the return property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link AnObject }{@code >} + * + */ + public JAXBElement<AnObject> getReturn() { + return _return; + } + + /** + * Sets the value of the return property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link AnObject }{@code >} + * + */ + public void setReturn(JAXBElement<AnObject> value) { + this._return = ((JAXBElement<AnObject>)value); + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingString.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingString.java new file mode 100644 index 0000000000..532b948b47 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingString.java @@ -0,0 +1,79 @@ +/* + * 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 service.generated; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +/** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * <complexType> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <sequence> + * <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> + * </sequence> + * </restriction> + * </complexContent> + * </complexType> + * </pre> + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = {"arg0"}) +@XmlRootElement(name = "getUsingString", namespace = "http://service/") +public class GetUsingString { + + @XmlElementRef(name = "arg0", type = JAXBElement.class) + protected JAXBElement<String> arg0; + + /** + * Gets the value of the arg0 property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public JAXBElement<String> getArg0() { + return arg0; + } + + /** + * Sets the value of the arg0 property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public void setArg0(JAXBElement<String> value) { + this.arg0 = ((JAXBElement<String>)value); + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingStringResponse.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingStringResponse.java new file mode 100644 index 0000000000..82bfb2d2aa --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/GetUsingStringResponse.java @@ -0,0 +1,79 @@ +/* + * 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 service.generated; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +/** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * <complexType> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <sequence> + * <element name="return" type="{}anObject" minOccurs="0"/> + * </sequence> + * </restriction> + * </complexContent> + * </complexType> + * </pre> + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = {"_return"}) +@XmlRootElement(name = "getUsingStringResponse", namespace = "http://service/") +public class GetUsingStringResponse { + + @XmlElementRef(name = "return", type = JAXBElement.class) + protected JAXBElement<AnObject> _return; + + /** + * Gets the value of the return property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link AnObject }{@code >} + * + */ + public JAXBElement<AnObject> getReturn() { + return _return; + } + + /** + * Sets the value of the return property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link AnObject }{@code >} + * + */ + public void setReturn(JAXBElement<AnObject> value) { + this._return = ((JAXBElement<AnObject>)value); + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/MoreComplexObject.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/MoreComplexObject.java new file mode 100644 index 0000000000..61c7c6cb19 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/MoreComplexObject.java @@ -0,0 +1,126 @@ +/* + * 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 service.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +/** + * <p>Java class for moreComplexObject complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * <complexType name="moreComplexObject"> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <sequence> + * <element name="intParam" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> + * <element name="stringParam" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> + * <element name="stringParam2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> + * </sequence> + * </restriction> + * </complexContent> + * </complexType> + * </pre> + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "moreComplexObject", namespace = "", propOrder = {"intParam", "stringParam", "stringParam2"}) +public class MoreComplexObject { + + protected Integer intParam; + protected String stringParam; + protected String stringParam2; + + /** + * Gets the value of the intParam property. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getIntParam() { + return intParam; + } + + /** + * Sets the value of the intParam property. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setIntParam(Integer value) { + this.intParam = value; + } + + /** + * Gets the value of the stringParam property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStringParam() { + return stringParam; + } + + /** + * Sets the value of the stringParam property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStringParam(String value) { + this.stringParam = value; + } + + /** + * Gets the value of the stringParam2 property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStringParam2() { + return stringParam2; + } + + /** + * Sets the value of the stringParam2 property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStringParam2(String value) { + this.stringParam2 = value; + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/ObjectFactory.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/ObjectFactory.java new file mode 100644 index 0000000000..1ba0c497d9 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/ObjectFactory.java @@ -0,0 +1,141 @@ +/* + * 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 service.generated; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the service.jaxws package. + * <p>An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _GetUsingMoreComplexObjectArg0_QNAME = new QName("", "arg0"); + private final static QName _GetUsingStringResponseReturn_QNAME = new QName("", "return"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: service.jaxws + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link AnObject } + * + */ + public AnObject createAnObject() { + return new AnObject(); + } + + /** + * Create an instance of {@link GetUsingStringResponse } + * + */ + public GetUsingStringResponse createGetUsingStringResponse() { + return new GetUsingStringResponse(); + } + + /** + * Create an instance of {@link GetUsingMoreComplexObjectResponse } + * + */ + public GetUsingMoreComplexObjectResponse createGetUsingMoreComplexObjectResponse() { + return new GetUsingMoreComplexObjectResponse(); + } + + /** + * Create an instance of {@link GetUsingString } + * + */ + public GetUsingString createGetUsingString() { + return new GetUsingString(); + } + + /** + * Create an instance of {@link GetUsingMoreComplexObject } + * + */ + public GetUsingMoreComplexObject createGetUsingMoreComplexObject() { + return new GetUsingMoreComplexObject(); + } + + /** + * Create an instance of {@link MoreComplexObject } + * + */ + public MoreComplexObject createMoreComplexObject() { + return new MoreComplexObject(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MoreComplexObject }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "arg0", scope = GetUsingMoreComplexObject.class) + public JAXBElement<MoreComplexObject> createGetUsingMoreComplexObjectArg0(MoreComplexObject value) { + return new JAXBElement<MoreComplexObject>(_GetUsingMoreComplexObjectArg0_QNAME, MoreComplexObject.class, + GetUsingMoreComplexObject.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AnObject }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "return", scope = GetUsingStringResponse.class) + public JAXBElement<AnObject> createGetUsingStringResponseReturn(AnObject value) { + return new JAXBElement<AnObject>(_GetUsingStringResponseReturn_QNAME, AnObject.class, + GetUsingStringResponse.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AnObject }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "return", scope = GetUsingMoreComplexObjectResponse.class) + public JAXBElement<AnObject> createGetUsingMoreComplexObjectResponseReturn(AnObject value) { + return new JAXBElement<AnObject>(_GetUsingStringResponseReturn_QNAME, AnObject.class, + GetUsingMoreComplexObjectResponse.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "arg0", scope = GetUsingString.class) + public JAXBElement<String> createGetUsingStringArg0(String value) { + return new JAXBElement<String>(_GetUsingMoreComplexObjectArg0_QNAME, String.class, GetUsingString.class, value); + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/SomeService.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/SomeService.java new file mode 100644 index 0000000000..4a584a8da2 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/SomeService.java @@ -0,0 +1,65 @@ +/* + * 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 service.generated; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.1.1 in JDK 6 + * Generated source version: 2.1 + * + */ +@WebService(name = "SomeService", targetNamespace = "http://service/") +@XmlSeeAlso( {ObjectFactory.class}) +public interface SomeService { + + /** + * + * @param arg0 + * @return + * returns service.generated.AnObject + */ + @WebMethod + @WebResult(targetNamespace = "") + @RequestWrapper(localName = "getUsingMoreComplexObject", targetNamespace = "http://service/", className = "service.generated.GetUsingMoreComplexObject") + @ResponseWrapper(localName = "getUsingMoreComplexObjectResponse", targetNamespace = "http://service/", className = "service.generated.GetUsingMoreComplexObjectResponse") + public AnObject getUsingMoreComplexObject(@WebParam(name = "arg0", targetNamespace = "") + MoreComplexObject arg0); + + /** + * + * @param arg0 + * @return + * returns service.generated.AnObject + */ + @WebMethod + @WebResult(targetNamespace = "") + @RequestWrapper(localName = "getUsingString", targetNamespace = "http://service/", className = "service.generated.GetUsingString") + @ResponseWrapper(localName = "getUsingStringResponse", targetNamespace = "http://service/", className = "service.generated.GetUsingStringResponse") + public AnObject getUsingString(@WebParam(name = "arg0", targetNamespace = "") + String arg0); + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/SomeServiceService.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/SomeServiceService.java new file mode 100644 index 0000000000..44c2b67256 --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/SomeServiceService.java @@ -0,0 +1,81 @@ +/* + * 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 service.generated; + +import java.net.MalformedURLException; +import java.net.URL; + +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceFeature; + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.1.1 in JDK 6 + * Generated source version: 2.1 + * + */ +@WebServiceClient(name = "SomeServiceService", targetNamespace = "http://service/", wsdlLocation = "file:/C:/Tuscany/java/sca/itest/wsdlless/src/main/resources/some.wsdl") +public class SomeServiceService extends Service { + + private final static URL SOMESERVICESERVICE_WSDL_LOCATION; + + static { + URL url = null; + try { + url = new URL("file:/C:/Tuscany/java/sca/itest/wsdlless/src/main/resources/some.wsdl"); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + SOMESERVICESERVICE_WSDL_LOCATION = url; + } + + public SomeServiceService(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public SomeServiceService() { + super(SOMESERVICESERVICE_WSDL_LOCATION, new QName("http://service/", "SomeServiceService")); + } + + /** + * + * @return + * returns SomeService + */ + @WebEndpoint(name = "SomeServicePort") + public SomeService getSomeServicePort() { + return (SomeService)super.getPort(new QName("http://service/", "SomeServicePort"), SomeService.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. + * @return + * returns SomeService + */ + @WebEndpoint(name = "SomeServicePort") + public SomeService getSomeServicePort(WebServiceFeature... features) { + return (SomeService)super.getPort(new QName("http://service/", "SomeServicePort"), SomeService.class, features); + } + +} diff --git a/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/package-info.java b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/package-info.java new file mode 100644 index 0000000000..d7b3fef82e --- /dev/null +++ b/branches/sca-java-1.3/itest/wsdlless/src/test/java/service/generated/package-info.java @@ -0,0 +1,21 @@ +/* + * 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. + */ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://service/") +package service.generated; + diff --git a/branches/sca-java-1.3/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextCache.java b/branches/sca-java-1.3/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextCache.java index 8b527bf079..30ca226dc1 100644 --- a/branches/sca-java-1.3/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextCache.java +++ b/branches/sca-java-1.3/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextCache.java @@ -75,17 +75,21 @@ public class JAXBContextCache { protected static final Set<Class<?>> BUILTIN_CLASSES_SET = new HashSet<Class<?>>(Arrays.asList(JAXB_BUILTIN_CLASSES)); + /* protected static Class<?>[] COMMON_ARRAY_CLASSES = new Class[] {char[].class, short[].class, int[].class, long[].class, float[].class, double[].class, String[].class }; protected static final Set<Class<?>> COMMON_CLASSES_SET = new HashSet<Class<?>>(Arrays.asList(COMMON_ARRAY_CLASSES)); + */ protected LRUCache<Object, JAXBContext> cache; protected LRUCache<JAXBContext, Unmarshaller> upool; protected LRUCache<JAXBContext, Marshaller> mpool; - protected JAXBContext commonContext; + + // protected JAXBContext commonContext; + protected JAXBContext defaultContext; public JAXBContextCache() { this(CACHE_SIZE, CACHE_SIZE, CACHE_SIZE); @@ -95,12 +99,12 @@ public class JAXBContextCache { cache = new LRUCache<Object, JAXBContext>(contextSize); upool = new LRUCache<JAXBContext, Unmarshaller>(unmarshallerSize); mpool = new LRUCache<JAXBContext, Marshaller>(marshallerSize); - commonContext = getCommonJAXBContext(); + defaultContext = getDefaultJAXBContext(); } - - public static JAXBContext getCommonJAXBContext() { + + public static JAXBContext getDefaultJAXBContext() { try { - return JAXBContext.newInstance(COMMON_CLASSES_SET.toArray(new Class<?>[COMMON_CLASSES_SET.size()])); + return JAXBContext.newInstance(); } catch (JAXBException e) { throw new IllegalArgumentException(e); } @@ -201,8 +205,8 @@ public class JAXBContextCache { } public JAXBContext getJAXBContext(Class<?> cls) throws JAXBException { - if (COMMON_CLASSES_SET.contains(cls) || BUILTIN_CLASSES_SET.contains(cls)) { - return commonContext; + if (BUILTIN_CLASSES_SET.contains(cls)) { + return defaultContext; } synchronized (cache) { JAXBContext context = cache.get(cls); @@ -253,9 +257,8 @@ public class JAXBContextCache { classSet.remove(Image[].class); } - // Is the common one - if (COMMON_CLASSES_SET.containsAll(classSet)) { - return commonContext; + if(classSet.isEmpty()) { + return defaultContext; } // For single class diff --git a/branches/sca-java-1.3/modules/databinding-jaxb/src/test/java/org/apache/tuscany/databinding/jaxb/JAXBContextCacheTestCase.java b/branches/sca-java-1.3/modules/databinding-jaxb/src/test/java/org/apache/tuscany/databinding/jaxb/JAXBContextCacheTestCase.java index e5fbd50b30..8e82e7bb38 100644 --- a/branches/sca-java-1.3/modules/databinding-jaxb/src/test/java/org/apache/tuscany/databinding/jaxb/JAXBContextCacheTestCase.java +++ b/branches/sca-java-1.3/modules/databinding-jaxb/src/test/java/org/apache/tuscany/databinding/jaxb/JAXBContextCacheTestCase.java @@ -50,8 +50,8 @@ public class JAXBContextCacheTestCase { JAXBContext context3 = cache.getJAXBContext(String[].class); JAXBContext context4 = cache.getJAXBContext(Source.class); Assert.assertSame(context1, context2); - Assert.assertSame(context2, context3); - Assert.assertSame(context3, context4); + Assert.assertNotSame(context2, context3); + Assert.assertSame(context1, context4); QName name = new QName("http://example.com/ns1", "e1"); JAXBElement<String> element = new JAXBElement<String>(name, String.class, "123"); diff --git a/branches/sca-java-1.3/modules/interface-wsdl-java2wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/interface2wsdl/Interface2WSDLGenerator.java b/branches/sca-java-1.3/modules/interface-wsdl-java2wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/interface2wsdl/Interface2WSDLGenerator.java index 6ae397269f..c9566bec4a 100644 --- a/branches/sca-java-1.3/modules/interface-wsdl-java2wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/interface2wsdl/Interface2WSDLGenerator.java +++ b/branches/sca-java-1.3/modules/interface-wsdl-java2wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/interface2wsdl/Interface2WSDLGenerator.java @@ -237,7 +237,8 @@ public class Interface2WSDLGenerator { } else { schemaDoc = createDocument(); schema = schemaDoc.createElementNS(SCHEMA_NS, "xs:schema"); - schema.setAttribute("elementFormDefault", "qualified"); + // The elementFormDefault should be set to unqualified, see TUSCANY-2388 + schema.setAttribute("elementFormDefault", "unqualified"); schema.setAttribute("attributeFormDefault", "qualified"); schema.setAttribute("targetNamespace", targetNS); schema.setAttributeNS(XMLNS_NS, "xmlns:xs", SCHEMA_NS); |