diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2013-10-07 22:23:21 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2013-10-07 22:23:21 +0000 |
commit | 5963a2d3d6860fe57afc138f095bf2d2eb5a7b80 (patch) | |
tree | 018d3d8c637e265b8292d34e5f7c11ca8ce11b7d /sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src | |
parent | 132aa8a77685ec92bc90c03f987650d275a7b639 (diff) |
Official Tuscany 2.0.1 Release
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1530096 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src')
31 files changed, 0 insertions, 2095 deletions
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Account.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Account.java deleted file mode 100644 index 963712c0c2..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Account.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -import org.oasisopen.sca.annotation.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-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AccountService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AccountService.java deleted file mode 100644 index ab5fc0f873..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AccountService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -/** - * Test ?wsdl works and that the returned WSDL has the correct endpoint - * - * @version $Rev$ $Date$ - */ -public class AccountService implements Account { - - public CustomerProfileData getCustomerProfile(String loginID) { - return new CustomerProfileData(loginID); - } - -} diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/CustomerProfileData.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/CustomerProfileData.java deleted file mode 100644 index 6f6a374450..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/CustomerProfileData.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -/** - * 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() { - firstName = "John"; - lastName = "Doe"; - address = "345 Main Street"; - email = "john@doe.org"; - this.loginID = "DefaultloginID"; - password = "hello"; - id = 1234; - } - - 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 lastName) { - 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-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java deleted file mode 100644 index d6db1c2d0b..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorld { - - String getGreetings(String s); - -} diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java deleted file mode 100644 index e248815805..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -import org.apache.axiom.om.OMElement; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorldOM { - - OMElement getGreetings(OMElement parmE); - -} diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java deleted file mode 100644 index 8439696fa8..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -import org.apache.axiom.om.OMElement; -import org.oasisopen.sca.annotation.Reference; - -public class HelloWorldOMComponent implements HelloWorldOM { - - @Reference - public HelloWorldOM helloWorldWS; - - public OMElement getGreetings(OMElement om) { - return helloWorldWS.getGreetings(om); - } - -} diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java deleted file mode 100644 index 5b8578c816..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; - -public class HelloWorldOMService implements HelloWorldOM { - - public OMElement getGreetings(OMElement requestOM) { - System.out.println(" **** getGreetings **** "); - String name = requestOM.getFirstElement().getText(); - - OMFactory omFactory = OMAbstractFactory.getOMFactory(); - OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld"); - OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld"); - responseOM.addChild(param); - param.addChild(omFactory.createOMText("Hello " + name)); - - return responseOM; - } - -} diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java deleted file mode 100644 index 052b49ff55..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -public class HelloWorldService implements HelloWorld { - - public String getGreetings(String s) { - return "Hello " + s; - } - -} diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/package-info.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/package-info.java deleted file mode 100644 index 805a515382..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/package-info.java +++ /dev/null @@ -1,21 +0,0 @@ -/*
- * 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://accounts")
-package org.apache.tuscany.sca.binding.ws.axis2;
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdata.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdata.xsd deleted file mode 100644 index 2479f3dbe5..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdata.xsd +++ /dev/null @@ -1,36 +0,0 @@ -<?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> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdefs.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdefs.xsd deleted file mode 100644 index 24cf3eebad..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdefs.xsd +++ /dev/null @@ -1,27 +0,0 @@ -<?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="/org/apache/tuscany/sca/binding/ws/axis2/customerinfo.xsd" /> - -</xsd:schema> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerinfo.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerinfo.xsd deleted file mode 100644 index b78909142f..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerinfo.xsd +++ /dev/null @@ -1,31 +0,0 @@ -<?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> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.composite deleted file mode 100644 index c520d2e3b2..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.composite +++ /dev/null @@ -1,43 +0,0 @@ -<?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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2" - name="HelloWorldOM-Merged"> - - - <component name="HelloWorldMergedService"> - <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMService"/> - <service name="HelloWorldOM"> - <interface.wsdl interface="http://helloworld-om-merged#wsdl.interface(HelloWorld)" /> - <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"/> - </service> - </component> - - <component name="HelloWorldWSDLMergedComponent"> - <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMComponent"/> - <reference name="helloWorldWS"> - <interface.wsdl interface="http://helloworld-om-merged#wsdl.interface(HelloWorld)" /> - <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld" /> - </reference> - </component> - - -</composite> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.wsdl deleted file mode 100644 index 29be66fb71..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.wsdl +++ /dev/null @@ -1,59 +0,0 @@ -<?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://helloworld-om-merged" xmlns:tns="http://helloworld-om-merged" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld-om-porttype"> - - <wsdl:types> - <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om-merged" xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="getGreetings"> - <complexType> - <sequence> - <element name="name" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="getGreetingsResponse"> - <complexType> - <sequence> - <element name="getGreetingsReturn" type="xsd:string"/> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - -</wsdl:definitions> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl deleted file mode 100644 index 1a2272d7ee..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl +++ /dev/null @@ -1,86 +0,0 @@ -<?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://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="helloworld"> - - <wsdl:types> - <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="getGreetings"> - <complexType> - <sequence> - <element name="name" type="xsd:string"/> - </sequence> - </complexType> - </element> - - <element name="getGreetingsResponse"> - <complexType> - <sequence> - <element name="getGreetingsReturn" type="xsd:string"/> - </sequence> - </complexType> - </element> - - </schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> - </wsdl:message> - - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> - </wsdl:input> - <wsdl:output name="getGreetingsResponse"> - <wsdlsoap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - - </wsdl:binding> - - <wsdl:service name="HelloWorldService"> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort"> - <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService"/> - </wsdl:port> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2"> - <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/> - </wsdl:port> - <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3"> - <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import-nested.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import-nested.wsdl deleted file mode 100644 index 686b08a1d4..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import-nested.wsdl +++ /dev/null @@ -1,70 +0,0 @@ -<?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="questionmark-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="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> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import.wsdl deleted file mode 100644 index 105c82a411..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import.wsdl +++ /dev/null @@ -1,49 +0,0 @@ -<?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" - name="questionmark-import"> - - <wsdl:import namespace="http://account3" location="/org/apache/tuscany/sca/binding/ws/axis2/questionmark-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> - -</wsdl:definitions> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-include.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-include.wsdl deleted file mode 100644 index 7a7a4033ce..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-include.wsdl +++ /dev/null @@ -1,90 +0,0 @@ -<?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://accounts" - xmlns:tns="http://accounts" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - name="questionmark-include"> - - <wsdl:types> - <xsd:schema elementFormDefault="qualified" - targetNamespace="http://accounts" - xmlns:account="http://accounts" - xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - - <xsd:include schemaLocation="/org/apache/tuscany/sca/binding/ws/axis2/customerdata.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:binding name="AccountSoapBinding" type="tns: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:8085/AccountService" /> - </wsdl:port> - </wsdl:service> - -</wsdl:definitions> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-import.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-import.composite deleted file mode 100644 index 65270b8d6c..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-import.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2" - name="QuestionMarkWSDLImport"> - - <component name="AccountService"> - <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.AccountService" /> - <service name="Account"> - <binding.ws uri="http://localhost:8086/AccountService" wsdlElement="http://account2#wsdl.binding(AccountSoapBinding)" /> - </service> - </component> - -</composite> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-include.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-include.composite deleted file mode 100644 index 02395c4615..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-include.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2" - name="QuestionMarkWSDLInclude"> - - <component name="AccountService"> - <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.AccountService" /> - <service name="Account"> - <binding.ws uri="http://localhost:8085/AccountService" wsdlElement="http://accounts#wsdl.binding(AccountSoapBinding)" /> - </service> - </component> - -</composite> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl.composite deleted file mode 100644 index 6b06cec722..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?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://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2" - name="QuestionMarkWSDLTests"> - - <component name="HelloWorldService"> - <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldService"/> - <service name="HelloWorld"> - <binding.ws name="ep1" uri="http://localhost:8085/foo/bar" /> - <binding.ws name="ep2" uri="http://localhost:8085/services/HelloWorldWebService2" wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)"/> - </service> - </component> - -</composite> diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.wsdl deleted file mode 100644 index ec72fbd1a6..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.wsdl +++ /dev/null @@ -1,71 +0,0 @@ -<?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://serialize-nested"
- xmlns:tns="http://serialize-nested"
- xmlns:account="http://accounts"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="serialize-nested">
-
- <wsdl:types>
- <xsd:schema elementFormDefault="qualified"
- targetNamespace="http://accounts"
- xmlns:account="http://accounts"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:import namespace="http://accounts" schemaLocation="wsdl-serialize.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="account:getCustomerProfile" name="parameters" />
- </wsdl:message>
-
- <wsdl:message name="getCustomerProfileResponse">
- <wsdl:part element="account: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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.xsd deleted file mode 100644 index c24bd92eff..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.xsd +++ /dev/null @@ -1,31 +0,0 @@ -<?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://serialize"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="SerializeCustomerProfileInfo">
- <xsd:sequence>
- <xsd:element name="firstName" type="xsd:string" />
- <xsd:element name="lastName" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-top.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-top.wsdl deleted file mode 100644 index 6c91e62baf..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-top.wsdl +++ /dev/null @@ -1,49 +0,0 @@ -<?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://serialize-top"
- xmlns:tns="http://serialize-top"
- xmlns:nested="http://serialize-nested"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="serialize-top">
-
- <wsdl:import namespace="http://serialize-nested" location="wsdl-serialize-nested.wsdl" />
-
- <wsdl:binding name="AccountSoapBinding" type="nested: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>
-
-</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.composite deleted file mode 100644 index 07f7608bfa..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?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://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
- name="WSDLSerialize">
-
- <component name="AccountService">
- <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.AccountService"/>
- <service name="Account">
- <binding.ws uri="http://localhost:8085/services/AccountService"
- wsdlElement="http://serialize-top#wsdl.binding(AccountSoapBinding)"/>
- </service>
- </component>
-
-</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.xsd deleted file mode 100644 index ce9e017492..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.xsd +++ /dev/null @@ -1,28 +0,0 @@ -<?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="customerinfo.xsd" />
- <xsd:import namespace="http://serialize" schemaLocation="wsdl-serialize-nested.xsd"/>
-
-</xsd:schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldWSDLMergedTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldWSDLMergedTestCase.java deleted file mode 100644 index 74998379c4..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldWSDLMergedTestCase.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.ObjectOutputStream; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMText; -import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.impl.NodeImpl; -import org.junit.Ignore; - -public class HelloWorldWSDLMergedTestCase extends TestCase { - - private NodeFactory nodeFactory; - private NodeImpl node; - private HelloWorldOM helloWorld; - - @Override - protected void setUp() throws Exception { - String contribution = "target/classes"; - nodeFactory = NodeFactory.newInstance(); - // have to set this to stop the node factory killing itself when we stop and re-start the node - nodeFactory.setAutoDestroy(false); - node = (NodeImpl)nodeFactory.createNode("org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.composite", new Contribution("test", contribution)); - node.start(); - helloWorld = node.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent"); - } - - public void testHelloWorld() throws Exception { - OMFactory fac = OMAbstractFactory.getOMFactory(); - OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld"); - OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld"); - requestOM.addChild(parmE); - parmE.addChild(fac.createOMText("petra")); - OMElement responseOM = helloWorld.getGreetings(requestOM); - OMElement child = (OMElement)responseOM.getFirstElement(); - Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText()); - } - - public void testHelloWorldRepeating() throws Exception { - for (int i = 0; i < 2; i++){ - OMFactory fac = OMAbstractFactory.getOMFactory(); - OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld"); - OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld"); - requestOM.addChild(parmE); - parmE.addChild(fac.createOMText("petra")); - OMElement responseOM = helloWorld.getGreetings(requestOM); - OMElement child = (OMElement)responseOM.getFirstElement(); - Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText()); - - node.stop(); - node.start(); - - helloWorld = node.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent"); - } - } - - -/* - public void testWSDLWrite(){ - RuntimeEndpointImpl endpoint = (RuntimeEndpointImpl)node.getDomainComposite().getComponents().get(0).getServices().get(0).getEndpoints().get(0); - try - { - ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); - ObjectOutputStream objectStream = new ObjectOutputStream(byteStream); - objectStream.writeObject(endpoint); - objectStream.close(); - System.out.println(byteStream.toString()); - } - catch(IOException ex) - { - ex.printStackTrace(); - } - } -*/ - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLImportTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLImportTestCase.java deleted file mode 100644 index e48e1bc050..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLImportTestCase.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -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.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -/** - * Test ?wsdl works and that the returned WSDL has the correct endpoint - * - * @version $Rev$ $Date$ - */ -public class QuestionMarkWSDLImportTestCase extends TestCase { - - private Node node; - - /** - * Tests ?wsdl works and returns the correct port endpoint from the WSDL - */ - public void testWSDLImportPortEndpoint() throws Exception { - InputStream inp = new URL("http://localhost:8086/AccountService?wsdl").openStream(); - BufferedReader br = new BufferedReader(new InputStreamReader(inp)); - String line; - while((line = br.readLine()) != null) { - System.out.println(line); - } - br.close(); - - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose", false); - wsdlReader.setFeature("javax.wsdl.importDocuments", true); - - Definition definition = wsdlReader.readWSDL("http://localhost:8086/AccountService?wsdl"); - assertNotNull(definition); - Service service = definition.getService(new QName("http://account2/AccountService/Account", "Account")); - Port port = service.getPort("AccountSOAP11Port"); - - String endpoint = getEndpoint(port); - // String ip = HttpUtils.getIpAddress(); - assertEquals("http://localhost:8086/AccountService", endpoint); - } - - private String getEndpoint(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 { - String contribution = "target/classes"; - node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-import.composite", new Contribution("test", contribution)); - node.start(); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLIncludeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLIncludeTestCase.java deleted file mode 100644 index ab5713a0ae..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLIncludeTestCase.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -import java.io.BufferedReader; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.ObjectOutputStream; -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.core.assembly.impl.RuntimeEndpointImpl; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.impl.NodeImpl; -import org.junit.Ignore; - -/** - * Test ?wsdl works and that the returned WSDL has the correct endpoint - * - * @version $Rev$ $Date$ - */ -public class QuestionMarkWSDLIncludeTestCase extends TestCase { - - private NodeImpl node; - - /** - * Tests ?wsdl works and returns the correct port endpoint from the WSDL - */ - public void testWSDLIncludePortEndpoint() throws Exception { - InputStream inp = new URL("http://localhost:8085/AccountService?wsdl").openStream(); - BufferedReader br = new BufferedReader(new InputStreamReader(inp)); - String line; - while((line = br.readLine()) != null) { - System.out.println(line); - } - br.close(); - - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose", false); - wsdlReader.setFeature("javax.wsdl.importDocuments", true); - - Definition definition = wsdlReader.readWSDL("http://localhost:8085/AccountService?wsdl"); - assertNotNull(definition); - Service service = definition.getService(new QName("http://accounts/AccountService/Account", "Account")); - Port port = service.getPort("AccountSOAP11Port"); - - String endpoint = getEndpoint(port); - assertEquals("http://localhost:8085/AccountService", endpoint); - } - - private String getEndpoint(Port port) { - List wsdlPortExtensions = port.getExtensibilityElements(); - for (final Object extension : wsdlPortExtensions) { - if (extension instanceof SOAPAddress) { - return ((SOAPAddress) extension).getLocationURI(); - } - } - throw new RuntimeException("no SOAPAddress"); - } - -/* - public void testWSDLWrite(){ - RuntimeEndpointImpl endpoint = (RuntimeEndpointImpl)node.getDomainComposite().getComponents().get(0).getServices().get(0).getEndpoints().get(0); - try - { - ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); - ObjectOutputStream objectStream = new ObjectOutputStream(byteStream); - objectStream.writeObject(endpoint); - objectStream.close(); - System.out.println(byteStream.toString()); - } - catch(IOException ex) - { - ex.printStackTrace(); - } - } -*/ - - @Override - protected void setUp() throws Exception { - String contribution = "target/classes"; - node = (NodeImpl)NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-include.composite", new Contribution("test", contribution)); - node.start(); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLTestCase.java deleted file mode 100644 index dbe172f792..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLTestCase.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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 org.apache.tuscany.sca.binding.ws.axis2; - -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.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -/** - * Test ?wsdl works and that the returned WSDL has the correct endpoint - * - * @version $Rev$ $Date$ - */ -public class QuestionMarkWSDLTestCase extends TestCase { - - private Node node; - - /** - * Tests ?wsdl works and returns the correct port endpoint from the WSDL - */ - public void testWSDLPortEndpoint() throws Exception { - InputStream inp = new URL("http://localhost:8085/services/HelloWorldWebService2?wsdl").openStream(); - BufferedReader br = new BufferedReader(new InputStreamReader(inp)); - String line; - while((line = br.readLine()) != null) { - System.out.println(line); - } - br.close(); - - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose",false); - wsdlReader.setFeature("javax.wsdl.importDocuments",true); - - Definition definition = wsdlReader.readWSDL("http://localhost:8085/services/HelloWorldWebService2?wsdl"); - assertNotNull(definition); - Service service = definition.getService(new QName("http://helloworld/HelloWorldService/HelloWorld", - "HelloWorld")); - Port port = service.getPort("ep2SOAP11Port"); - - String endpoint = getEndpoint(port); - assertEquals("http://localhost:8085/services/HelloWorldWebService2", endpoint); - } - - /** - * Tests ?wsdl works and returns the correct port endpoint from binding.ws with a custom URI - */ - public void testCustomEndpoint() throws Exception { - InputStream inp = new URL("http://localhost:8085/foo/bar?wsdl").openStream(); - BufferedReader br = new BufferedReader(new InputStreamReader(inp)); - String line; - while((line = br.readLine()) != null) { - System.out.println(line); - } - br.close(); - - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose",false); - wsdlReader.setFeature("javax.wsdl.importDocuments",true); - - Definition definition = wsdlReader.readWSDL("http://localhost:8085/foo/bar?wsdl"); - assertNotNull(definition); - Service service = definition.getService(new QName("http://axis2.ws.binding.sca.tuscany.apache.org/", - "HelloWorldService_HelloWorld")); - Port port = service.getPort("ep1SOAP11Port"); - - String endpoint = getEndpoint(port); - // TODO - used to get the real host here but WSDL seems to have localhost in it atm? - assertEquals("http://localhost:8085/foo/bar", endpoint); - } - - protected String getEndpoint(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 { - String contribution = "target/classes"; - node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl.composite", new Contribution("test", contribution)); - node.start(); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLSerializationTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLSerializationTestCase.java deleted file mode 100644 index a3e79ee2af..0000000000 --- a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLSerializationTestCase.java +++ /dev/null @@ -1,477 +0,0 @@ -/*
- * 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 org.apache.tuscany.sca.binding.ws.axis2;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Import;
-import javax.wsdl.PortType;
-import javax.wsdl.Types;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLLocator;
-import javax.wsdl.xml.WSDLReader;
-import javax.wsdl.xml.WSDLWriter;
-
-
-import org.apache.tuscany.sca.common.xml.XMLDocumentHelper;
-import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
-import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.FactoryExtensionPoint;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl;
-import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
-import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
-import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
-import org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLModelResolver;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-import org.apache.tuscany.sca.xsd.XSDFactory;
-import org.apache.tuscany.sca.xsd.XSDefinition;
-import org.apache.tuscany.sca.xsd.xml.XSDModelResolver;
-import org.apache.ws.commons.schema.XmlSchema;
-import org.apache.ws.commons.schema.XmlSchemaCollection;
-import org.apache.ws.commons.schema.XmlSchemaCollectionEnumerator;
-import org.apache.ws.commons.schema.XmlSchemaImport;
-import org.apache.ws.commons.schema.XmlSchemaInclude;
-import org.apache.ws.commons.schema.XmlSchemaObject;
-import org.apache.ws.commons.schema.resolver.DefaultURIResolver;
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.xml.sax.InputSource;
-
-import junit.framework.TestCase;
-
-/**
- * Tests that WSDL can be serialized out in a form that can be passed
- * across the registry in a single shot
- */
-public class WSDLSerializationTestCase extends TestCase {
-
- private static byte separator[] = {'_', 'X', '_'};
-
-/*
- public void testWSDL4JSerialization() throws Exception {
-
- // read WSDL in
- WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
- wsdlReader.setFeature("javax.wsdl.verbose",false);
- wsdlReader.setFeature("javax.wsdl.importDocuments",true);
-
- Definition definition = wsdlReader.readWSDL("target/classes/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-top.wsdl");
- assertNotNull(definition);
-
- // write WSDL out
- ByteArrayOutputStream outStream = new ByteArrayOutputStream();
- try {
- WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
- writer.writeWSDL(definition, outStream);
- } catch (Exception e){
- throw new RuntimeException(e);
- }
-
- //System.out.println(outStream.toString());
- }
-*/
-
- public void testTuscanySerialization() throws Exception {
-
- // read in WSDL
- String contributionLocation = "target/classes";
- NodeImpl node = (NodeImpl)NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.composite",
- new Contribution("test", contributionLocation));
- node.start();
-
- try {
-
- RuntimeEndpointImpl endpoint = (RuntimeEndpointImpl)node.getDomainComposite().getComponents().get(0).getServices().get(0).getEndpoints().get(0);
- WSDLInterface wsdlInterface = (WSDLInterface)endpoint.getBindingInterfaceContract().getInterface();
-
- WSDLDefinition wsdlDefinition = wsdlInterface.getWsdlDefinition();
- Definition definition = wsdlDefinition.getDefinition();
-
- // write out a flattened WSDL along with XSD
- ByteArrayOutputStream outStream = new ByteArrayOutputStream();
- try {
- WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
- String baseURI = null;
- if (wsdlDefinition.getLocation() != null) {
- baseURI = wsdlDefinition.getLocation().toString();
- } else {
- baseURI = "GeneratedWSDL";
- }
- outStream.write(baseURI.getBytes());
- outStream.write(separator);
- writer.writeWSDL(definition, outStream);
- for (WSDLDefinition importedWSDLDefintion : wsdlDefinition.getImportedDefinitions()){
- outStream.write(separator);
- baseURI = importedWSDLDefintion.getLocation().toString();
- outStream.write(baseURI.getBytes());
- outStream.write(separator);
- writer.writeWSDL(importedWSDLDefintion.getDefinition(), outStream);
- }
- for (XSDefinition xsdDefinition : wsdlDefinition.getXmlSchemas()){
- // we store a reference to the schema schema. We don't need to write that out.
- // also ignore schema that are extract from the original WSDL (have in their location)
- if (!xsdDefinition.getNamespace().equals("http://www.w3.org/2001/XMLSchema") &&
- xsdDefinition.getSchema() != null){
- writeSchema(outStream, xsdDefinition.getSchema());
- }
- }
- } catch (Exception e){
- throw new RuntimeException(e);
- }
-
- String wsdlString = outStream.toString();
- //System.out.println(wsdlString);
-
- // Read the WSDL and XSD back in from the string
- String xmlArray[] = wsdlString.split("_X_");
- String topWSDLLocation = null;
- Map<String, XMLString> xmlMap = new HashMap<String, XMLString>();
-
- for (int i = 0; i < xmlArray.length; i = i + 2){
- String location = xmlArray[i];
- String xml = xmlArray[i+1];
- // strip the file name out of the location
- location = location.substring(location.lastIndexOf("/") + 1);
-
- if (location.endsWith(".wsdl")){
- xmlMap.put(location,
- new WSDLInfo(xmlArray[i],
- xml));
-
- if (topWSDLLocation == null){
- topWSDLLocation = location;
- }
- } else {
- xmlMap.put(location,
- new XSDInfo(xmlArray[i],
- xml));
- }
- }
-
- ExtensionPointRegistry registry = endpoint.getCompositeContext().getExtensionPointRegistry();
- FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
- org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory wsdlFactory = modelFactories.getFactory(org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory.class);
- XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class);
- XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
- schemaCollection.setSchemaResolver(new XSDURIResolverImpl(xmlMap));
- ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
- final org.apache.tuscany.sca.contribution.Contribution contribution = contributionFactory.createContribution();
- ProcessorContext processorContext = new ProcessorContext();
-
- ExtensibleModelResolver extensibleResolver = new ExtensibleModelResolver(contribution, registry.getExtensionPoint(ModelResolverExtensionPoint.class), modelFactories);
- WSDLModelResolver wsdlResolver = (WSDLModelResolver)extensibleResolver.getModelResolverInstance(WSDLDefinition.class);
- XSDModelResolver xsdResolver = (XSDModelResolver)extensibleResolver.getModelResolverInstance(XSDefinition.class);
- contribution.setURI("temp");
- contribution.setLocation(topWSDLLocation);
- contribution.setModelResolver(extensibleResolver);
-
- // read
- for (XMLString xmlString : xmlMap.values()){
- if (xmlString instanceof WSDLInfo){
- WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
- reader.setFeature("javax.wsdl.verbose", false);
- reader.setFeature("javax.wsdl.importDocuments", true);
- WSDLLocatorImpl locator = new WSDLLocatorImpl(xmlString.getBaseURI(), xmlMap);
- Definition readDefinition = reader.readWSDL(locator);
-
- wsdlDefinition = wsdlFactory.createWSDLDefinition();
- wsdlDefinition.setDefinition(readDefinition);
- wsdlDefinition.setLocation(new URI(xmlString.getBaseURI()));
-
- ((WSDLInfo)xmlString).setWsdlDefintion(wsdlDefinition);
- wsdlResolver.addModel(wsdlDefinition, processorContext);
-
- } else {
- InputStream inputStream = new ByteArrayInputStream(xmlString.getXmlString().getBytes());
- InputSource inputSource = new InputSource(inputStream);
- inputSource.setSystemId(xmlString.getBaseURI());
- XmlSchema schema = schemaCollection.read(inputSource, null);
- inputStream.close();
-
- XSDefinition xsdDefinition = xsdFactory.createXSDefinition();
- xsdDefinition.setSchema(schema);
-
- ((XSDInfo)xmlString).setXsdDefinition(xsdDefinition);
- xsdResolver.addModel(xsdDefinition, processorContext);
- }
- }
-
- // resolve
- for (XMLString xmlString : xmlMap.values()){
- if (xmlString instanceof WSDLInfo){
- wsdlDefinition = ((WSDLInfo)xmlString).getWsdlDefintion();
-
- // link to imports
- for (Map.Entry<String, List<javax.wsdl.Import>> entry :
- ((Map<String, List<javax.wsdl.Import>>)wsdlDefinition.getDefinition().getImports()).entrySet()) {
- for (javax.wsdl.Import imp : entry.getValue()) {
- String wsdlName = imp.getDefinition().getDocumentBaseURI();
- WSDLInfo wsdlInfo = (WSDLInfo)xmlMap.get(getFilenameWithoutPath(wsdlName));
- wsdlDefinition.getImportedDefinitions().add(wsdlInfo.getWsdlDefintion());
- }
- }
-
- // link to in-line types
- Types types = wsdlDefinition.getDefinition().getTypes();
- if ( types != null){
- for (int i=0; i < types.getExtensibilityElements().size(); i++){
- String schemaName = xmlString.getBaseURI() + "#" + i++;
- XSDInfo xsdInfo = (XSDInfo)xmlMap.get(getFilenameWithoutPath(schemaName));
- wsdlDefinition.getXmlSchemas().add(xsdInfo.getXsdDefinition());
- }
- }
-
- } else {
-
- }
- }
-
- WSDLInfo topWSDL = (WSDLInfo)xmlMap.get(topWSDLLocation);
- WSDLDefinition topWSDLDefinition = topWSDL.getWsdlDefintion();
-
- PortType portType = (PortType)topWSDLDefinition.getDefinition().getAllPortTypes().values().iterator().next();
- WSDLInterface readWSDLInterface = wsdlFactory.createWSDLInterface(portType, topWSDLDefinition, extensibleResolver, null);
-
- // now check what we have just read with what we started out with to see if the compatibility test passes
- // in the real system have to check contracts not interfaces
- UtilityExtensionPoint utils = registry.getExtensionPoint(UtilityExtensionPoint.class);
- InterfaceContractMapper interfaceContractMapper = utils.getUtility(InterfaceContractMapper.class);
- boolean match = interfaceContractMapper.isCompatibleSubset(wsdlInterface, readWSDLInterface);
- Assert.assertTrue(match);
- } catch(Exception ex){
- System.out.println(ex.toString());
- ex.printStackTrace();
- node.stop();
- Assert.fail();
- }
-
- node.stop();
- }
-
- public void writeSchema(OutputStream outStream, XmlSchema schema) throws IOException {
- if (!schema.getTargetNamespace().equals("http://www.w3.org/2001/XMLSchema") &&
- schema.getNamespaceContext() != null){
- outStream.write(separator);
- String baseURI = schema.getSourceURI();
- outStream.write(baseURI.getBytes());
- outStream.write(separator);
- schema.write(outStream);
-
- for (Iterator<?> i = schema.getIncludes().getIterator(); i.hasNext();) {
- XmlSchemaObject obj = (XmlSchemaObject)i.next();
- XmlSchema ext = null;
- if (obj instanceof XmlSchemaInclude) {
- ext = ((XmlSchemaInclude)obj).getSchema();
- }
- if (obj instanceof XmlSchemaImport) {
- ext = ((XmlSchemaImport)obj).getSchema();
- }
- writeSchema(outStream, ext);
- }
- }
- }
-
- public String calculateUniquePrefix(Map<String, String> targetNamespaces, String prefix){
- String newPrefix = prefix;
- boolean notUnique = targetNamespaces.containsKey(newPrefix);
- int i = 1;
-
- while(notUnique){
- newPrefix = prefix + i++;
- notUnique = targetNamespaces.containsKey(newPrefix);
- }
-
- return newPrefix;
- }
-
- @Override
- protected void setUp() throws Exception {
-
- }
-
- @Override
- protected void tearDown() throws Exception {
-
- }
-
- private class XMLString {
- private String baseURI;
- private String xmlString;
-
- public XMLString(String baseURI, String xmlString){
- this.baseURI = baseURI;
- this.xmlString = xmlString;
- }
-
- public String getBaseURI() {
- return baseURI;
- }
-
- public String getXmlString() {
- return xmlString;
- }
- }
-
- private class XSDInfo extends XMLString {
-
- XSDefinition xsdDefinition;
-
- public XSDInfo(String baseURI, String xmlString) {
- super(baseURI, xmlString);
- }
-
- public void setXsdDefinition(XSDefinition xsdDefinition) {
- this.xsdDefinition = xsdDefinition;
- }
-
- public XSDefinition getXsdDefinition() {
- return xsdDefinition;
- }
- }
-
- private class WSDLInfo extends XMLString {
-
- WSDLDefinition wsdlDefintion;
-
- public WSDLInfo(String baseURI, String xmlString) {
- super(baseURI, xmlString);
- }
-
- public void setWsdlDefintion(WSDLDefinition wsdlDefintion) {
- this.wsdlDefintion = wsdlDefintion;
- }
-
- public WSDLDefinition getWsdlDefintion() {
- return wsdlDefintion;
- }
- }
-
- private class WSDLLocatorImpl implements WSDLLocator {
- private Map<String, XMLString> xmlMap;
- private String baseURI;
- private String latestImportURI;
-
- public WSDLLocatorImpl(String baseURI, Map<String, XMLString> xmlMap) {
- this.baseURI = baseURI;
- this.xmlMap = xmlMap;
- }
-
- public void close() {
-/*
- try {
- inputStream.close();
- } catch (IOException e) {
- // Ignore
- }
-*/
- }
-
- public InputSource getBaseInputSource() {
- return getInputSource(getFilenameWithoutPath(baseURI));
- }
-
- public String getBaseURI() {
- return baseURI;
- }
-
- public InputSource getImportInputSource(String parentLocation, String importLocation) {
- latestImportURI = importLocation;
- return getInputSource(getFilenameWithoutPath(importLocation));
- }
-
- public String getLatestImportURI() {
- return latestImportURI;
- }
-
- private InputSource getInputSource(String uri){
- String xmlString = xmlMap.get(uri).getXmlString();
- InputStream inputStream = new ByteArrayInputStream(xmlString.getBytes());
- //InputSource inputSource = XMLDocumentHelper.getInputSource(uri, inputStream);
- InputSource inputSource = new InputSource(inputStream);
- inputSource.setSystemId(uri);
- return inputSource;
- }
- }
-
- private class XSDURIResolverImpl extends DefaultURIResolver {
-
- private Map<String, XMLString> xmlMap;
-
- public XSDURIResolverImpl(Map<String, XMLString> xmlMap) {
- this.xmlMap = xmlMap;
- }
-
-
- @Override
- protected URL getURL(URL contextURL, String spec) throws IOException {
- return super.getURL(contextURL, spec);
- }
- @Override
- public InputSource resolveEntity(String namespace,
- String schemaLocation,
- String baseUri) {
- return getInputSource(getFilenameWithoutPath(schemaLocation));
- }
-
- private InputSource getInputSource(String uri){
- String xmlString = xmlMap.get(uri).getXmlString();
- InputStream inputStream = new ByteArrayInputStream(xmlString.getBytes());
- InputSource inputSource = new InputSource(inputStream);
- inputSource.setSystemId(uri);
- return inputSource;
- }
-
- }
-
- private String getFilenameWithoutPath(String filename){
- // work out what the file name is that is being imported
- // XSDs imports are written out by Tuscany with an relative web address such as
- // /services/AccountService?xsd=wsdl-serialize.xsd
- // for the time being just string the file name off the end. We are making
- // assumption that the interface doesn't involve two files with the same
- // name in different locations
- int xsdIndex = filename.lastIndexOf("?xsd=");
- int wsdlIndex = filename.lastIndexOf("/");
- if ( xsdIndex >= 0){
- return filename.substring(xsdIndex + 5);
- } else {
- return filename.substring(wsdlIndex + 1);
- }
- // What happens with generated WSDL?
- }
-}
|