Repository: cxf Updated Branches: refs/heads/2.7.x-fixes bdda0fc53 -> 00f0791f0
[CXF-6527] WSDLRefValidator reject valid target reference URI/IRI Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/00f0791f Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/00f0791f Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/00f0791f Branch: refs/heads/2.7.x-fixes Commit: 00f0791f02cff820a1ee6e4a8a6c52ddad8ae893 Parents: bdda0fc Author: Akitoshi Yoshida <[email protected]> Authored: Mon Aug 24 15:40:28 2015 +0200 Committer: Akitoshi Yoshida <[email protected]> Committed: Mon Aug 24 16:19:00 2015 +0200 ---------------------------------------------------------------------- .../validator/internal/WSDLRefValidator.java | 10 +- .../cxf/tools/wsdlto/jaxws/CodeGenTest.java | 32 ++- .../wsdl2java_wsdl/tns_url_with_colon.wsdl | 273 +++++++++++++++++++ .../test/resources/wsdl2java_wsdl/tns_urn.wsdl | 264 ++++++++++++++++++ .../resources/wsdl2java_wsdl/wrong_tns.wsdl | 273 ------------------- 5 files changed, 561 insertions(+), 291 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/00f0791f/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java ---------------------------------------------------------------------- diff --git a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java index 914eb96..a4b239b 100644 --- a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java +++ b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java @@ -19,9 +19,7 @@ package org.apache.cxf.tools.validator.internal; -import java.net.MalformedURLException; import java.net.URISyntaxException; -import java.net.URL; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -154,13 +152,7 @@ public class WSDLRefValidator extends AbstractDefinitionValidator { private void checkTargetNamespace(String path) { - try { - if (new URL(path).getPath().indexOf(":") != -1) { - throw new ToolException(": is not a valid char in the targetNamespace"); - } - } catch (MalformedURLException e) { - // do nothing - } + // no check as any namespace URI is already a valid target namespace string. } public void setSuppressWarnings(boolean s) { http://git-wip-us.apache.org/repos/asf/cxf/blob/00f0791f/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java ---------------------------------------------------------------------- diff --git a/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java b/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java index cb900a1..2de299b 100644 --- a/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java +++ b/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java @@ -1346,15 +1346,29 @@ public class CodeGenTest extends AbstractCodeGenTest { } @Test - public void testWrongTNS() { - try { - env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/wrong_tns.wsdl")); - processor.setContext(env); - processor.execute(); - fail("The targetNamespce is not valid"); - } catch (Exception e) { - assertTrue(e.getMessage().indexOf(": is not a valid char in the targetNamespace") != -1); - } + public void testURLWithColonTNS() throws Exception { + env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/tns_url_with_colon.wsdl")); + processor.setContext(env); + processor.execute(); + + Class<?> sei = classLoader.loadClass("org.apache.cxf.w2j.hello_world_soap_http.tns.soap.Greeter"); + assertNotNull("Greeter class from wsdl targetNamespace could not be found", sei); + + Class<?> tc = classLoader.loadClass("org.apache.cxf.w2j.hello_world_soap_http.tns.types.GreetMe"); + assertNotNull("GreetMe class from schema targetNamespace could not be found", tc); + } + + @Test + public void testURNTNS() throws Exception { + env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/tns_urn.wsdl")); + processor.setContext(env); + processor.execute(); + + Class<?> sei = classLoader.loadClass("apache.cxf.issue._6527.Greeter"); + assertNotNull("Greeter class from wsdl targetNamespace could not be found", sei); + + Class<?> tc = classLoader.loadClass("apache.cxf.issue._6527.types.GreetMe"); + assertNotNull("GreetMe class from schema targetNamespace could not be found", tc); } public void testW3CEPR() throws Exception { http://git-wip-us.apache.org/repos/asf/cxf/blob/00f0791f/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/tns_url_with_colon.wsdl ---------------------------------------------------------------------- diff --git a/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/tns_url_with_colon.wsdl b/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/tns_url_with_colon.wsdl new file mode 100644 index 0000000..86bf105 --- /dev/null +++ b/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/tns_url_with_colon.wsdl @@ -0,0 +1,273 @@ +<?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 xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://cxf.apache.org/w2j/hello_world_soap_http/tns:soap" + xmlns:x1="http://cxf.apache.org/w2j/hello_world_soap_http/tns:types" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://cxf.apache.org/w2j/hello_world_soap_http/tns:soap" name="HelloWorld"> + <wsdl:types> + <schema targetNamespace="http://cxf.apache.org/w2j/hello_world_soap_http/tns:types" + xmlns="http://www.w3.org/2001/XMLSchema" xmlns:x1="http://cxf.apache.org/w2j/hello_world_soap_http/tns:types" + elementFormDefault="qualified"> + <element name="sayHi"> + <complexType/> + </element> + <element name="sayHiResponse"> + <complexType> + <sequence> + <element name="responseType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMe"> + <complexType> + <sequence> + <element name="requestType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMeResponse"> + <complexType> + <sequence> + <element name="responseType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMeSometime"> + <complexType> + <sequence> + <element name="requestType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMeSometimeResponse"> + <complexType> + <sequence> + <element name="responseType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMeOneWay"> + <complexType> + <sequence> + <element name="requestType" type="string"/> + </sequence> + </complexType> + </element> + <element name="testDocLitFault"> + <complexType> + <sequence> + <element name="faultType" type="string"/> + </sequence> + </complexType> + </element> + <element name="testDocLitFaultResponse"> + <complexType> + <sequence/> + </complexType> + </element> + <complexType name="ErrorCode"> + <sequence> + <element name="minor" type="short"/> + <element name="major" type="short"/> + </sequence> + </complexType> + <element name="NoSuchCodeLit"> + <complexType> + <sequence> + <element name="code" type="x1:ErrorCode"/> + </sequence> + </complexType> + </element> + <element name="BadRecordLit" type="string"/> + <complexType name="BadRecord"> + <sequence> + <element name="reason" type="string"/> + <element name="code" type="short"/> + </sequence> + </complexType> + <complexType name="addNumbers"> + <sequence> + <element name="arg0" type="int"/> + <element name="arg1" type="int"/> + </sequence> + </complexType> + <element name="addNumbers" type="x1:addNumbers"/> + <complexType name="addNumbersResponse"> + <sequence> + <element name="return" type="int"/> + </sequence> + </complexType> + <element name="addNumbersResponse" type="x1:addNumbersResponse"/> + <element name="BareDocument" type="string"/> + <element name="BareDocumentResponse"> + <complexType> + <sequence> + <element name="company" type="string"/> + </sequence> + <attribute name="id" type="int"/> + </complexType> + </element> + </schema> + </wsdl:types> + <wsdl:message name="sayHiRequest"> + <wsdl:part name="in" element="x1:sayHi"/> + </wsdl:message> + <wsdl:message name="sayHiResponse"> + <wsdl:part name="out" element="x1:sayHiResponse"/> + </wsdl:message> + <wsdl:message name="greetMeRequest"> + <wsdl:part name="in" element="x1:greetMe"/> + </wsdl:message> + <wsdl:message name="greetMeResponse"> + <wsdl:part name="out" element="x1:greetMeResponse"/> + </wsdl:message> + <wsdl:message name="greetMeSometimeRequest"> + <wsdl:part name="in" element="x1:greetMeSometime"/> + </wsdl:message> + <wsdl:message name="greetMeSometimeResponse"> + <wsdl:part name="out" element="x1:greetMeSometimeResponse"/> + </wsdl:message> + <wsdl:message name="greetMeOneWayRequest"> + <wsdl:part name="in" element="x1:greetMeOneWay"/> + </wsdl:message> + <wsdl:message name="testDocLitFaultRequest"> + <wsdl:part name="in" element="x1:testDocLitFault"/> + </wsdl:message> + <wsdl:message name="testDocLitFaultResponse"> + <wsdl:part name="out" element="x1:testDocLitFaultResponse"/> + </wsdl:message> + <wsdl:message name="NoSuchCodeLitFault"> + <wsdl:part name="NoSuchCodeLit" element="x1:NoSuchCodeLit"/> + </wsdl:message> + <wsdl:message name="BadRecordLitFault"> + <wsdl:part name="BadRecordLit" element="x1:BadRecordLit"/> + </wsdl:message> + <wsdl:message name="testDocLitBareRequest"> + <wsdl:part name="in" element="x1:BareDocument"/> + </wsdl:message> + <wsdl:message name="testDocLitBareResponse"> + <wsdl:part name="out" element="x1:BareDocumentResponse"/> + </wsdl:message> + <wsdl:portType name="Greeter"> + <wsdl:operation name="sayHi"> + <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/> + <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/> + </wsdl:operation> + <wsdl:operation name="greetMe"> + <wsdl:input name="greetMeRequest" message="tns:greetMeRequest"/> + <wsdl:output name="greetMeResponse" message="tns:greetMeResponse"/> + </wsdl:operation> + <wsdl:operation name="greetMeSometime"> + <wsdl:input name="greetMeSometimeRequest" message="tns:greetMeSometimeRequest"/> + <wsdl:output name="greetMeSometimeResponse" message="tns:greetMeSometimeResponse"/> + </wsdl:operation> + <wsdl:operation name="greetMeOneWay"> + <wsdl:input name="greetMeOneWayRequest" message="tns:greetMeOneWayRequest"/> + </wsdl:operation> + <wsdl:operation name="testDocLitFault"> + <wsdl:input name="testDocLitFaultRequest" message="tns:testDocLitFaultRequest"/> + <wsdl:output name="testDocLitFaultResponse" message="tns:testDocLitFaultResponse"/> + <wsdl:fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault"/> + <wsdl:fault name="BadRecordLitFault" message="tns:BadRecordLitFault"/> + </wsdl:operation> + <wsdl:operation name="testDocLitBare"> + <wsdl:input name="testDocLitBareRequest" message="tns:testDocLitBareRequest"/> + <wsdl:output name="testDocLitBareResponse" message="tns:testDocLitBareResponse"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="sayHi"> + <soap:operation style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="greetMe"> + <soap:operation style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="greetMeSometime"> + <soap:operation style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="greetMeOneWay"> + <soap:operation style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + </wsdl:operation> + <wsdl:operation name="testDocLitFault"> + <soap:operation style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + <wsdl:fault name="NoSuchCodeLitFault"> + <soap:fault name="NoSuchCodeLitFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="BadRecordLitFault"> + <soap:fault name="BadRecordLitFault" use="literal"/> + </wsdl:fault> + </wsdl:operation> + <wsdl:operation name="testDocLitBare"> + <soap:operation style="document" soapAction="http://cxf.apache.org/w2j/hello_world_soap_http/testDocLitBare"/> + <wsdl:input name="testDocLitBareRequest"> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output name="testDocLitBareResponse"> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="SOAPService"> + <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding"> + <soap:address location="http://localhost:9000/SoapContext/SoapPort"/> + <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/> + </wsdl:port> + </wsdl:service> + <wsdl:service name="SOAPService_Test1"> + <wsdl:port name="SoapPort_Test1" binding="tns:Greeter_SOAPBinding"> + <soap:address location="http://localhost:9100"/> + </wsdl:port> + <wsdl:port name="SoapPort_Test2" binding="tns:Greeter_SOAPBinding"> + <soap:address location="http://localhost:9101"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> + http://git-wip-us.apache.org/repos/asf/cxf/blob/00f0791f/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/tns_urn.wsdl ---------------------------------------------------------------------- diff --git a/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/tns_urn.wsdl b/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/tns_urn.wsdl new file mode 100644 index 0000000..ebf3338 --- /dev/null +++ b/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/tns_urn.wsdl @@ -0,0 +1,264 @@ +<?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 xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:apache:cxf:issue:6527" xmlns:x1="urn:apache:cxf:issue:6527:types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:apache:cxf:issue:6527" name="HelloWorld"> + <wsdl:types> + <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:x1="urn:apache:cxf:issue:6527:types" targetNamespace="urn:apache:cxf:issue:6527:types" elementFormDefault="qualified"> + <element name="sayHi"> + <complexType/> + </element> + <element name="sayHiResponse"> + <complexType> + <sequence> + <element name="responseType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMe"> + <complexType> + <sequence> + <element name="requestType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMeResponse"> + <complexType> + <sequence> + <element name="responseType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMeSometime"> + <complexType> + <sequence> + <element name="requestType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMeSometimeResponse"> + <complexType> + <sequence> + <element name="responseType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMeOneWay"> + <complexType> + <sequence> + <element name="requestType" type="string"/> + </sequence> + </complexType> + </element> + <element name="testDocLitFault"> + <complexType> + <sequence> + <element name="faultType" type="string"/> + </sequence> + </complexType> + </element> + <element name="testDocLitFaultResponse"> + <complexType> + <sequence/> + </complexType> + </element> + <complexType name="ErrorCode"> + <sequence> + <element name="minor" type="short"/> + <element name="major" type="short"/> + </sequence> + </complexType> + <element name="NoSuchCodeLit"> + <complexType> + <sequence> + <element name="code" type="x1:ErrorCode"/> + </sequence> + </complexType> + </element> + <element name="BadRecordLit" type="string"/> + <complexType name="BadRecord"> + <sequence> + <element name="reason" type="string"/> + <element name="code" type="short"/> + </sequence> + </complexType> + <complexType name="addNumbers"> + <sequence> + <element name="arg0" type="int"/> + <element name="arg1" type="int"/> + </sequence> + </complexType> + <element name="addNumbers" type="x1:addNumbers"/> + <complexType name="addNumbersResponse"> + <sequence> + <element name="return" type="int"/> + </sequence> + </complexType> + <element name="addNumbersResponse" type="x1:addNumbersResponse"/> + <element name="BareDocument" type="string"/> + <element name="BareDocumentResponse"> + <complexType> + <sequence> + <element name="company" type="string"/> + </sequence> + <attribute name="id" type="int"/> + </complexType> + </element> + </schema> + </wsdl:types> + <wsdl:message name="sayHiRequest"> + <wsdl:part name="in" element="x1:sayHi"/> + </wsdl:message> + <wsdl:message name="sayHiResponse"> + <wsdl:part name="out" element="x1:sayHiResponse"/> + </wsdl:message> + <wsdl:message name="greetMeRequest"> + <wsdl:part name="in" element="x1:greetMe"/> + </wsdl:message> + <wsdl:message name="greetMeResponse"> + <wsdl:part name="out" element="x1:greetMeResponse"/> + </wsdl:message> + <wsdl:message name="greetMeSometimeRequest"> + <wsdl:part name="in" element="x1:greetMeSometime"/> + </wsdl:message> + <wsdl:message name="greetMeSometimeResponse"> + <wsdl:part name="out" element="x1:greetMeSometimeResponse"/> + </wsdl:message> + <wsdl:message name="greetMeOneWayRequest"> + <wsdl:part name="in" element="x1:greetMeOneWay"/> + </wsdl:message> + <wsdl:message name="testDocLitFaultRequest"> + <wsdl:part name="in" element="x1:testDocLitFault"/> + </wsdl:message> + <wsdl:message name="testDocLitFaultResponse"> + <wsdl:part name="out" element="x1:testDocLitFaultResponse"/> + </wsdl:message> + <wsdl:message name="NoSuchCodeLitFault"> + <wsdl:part name="NoSuchCodeLit" element="x1:NoSuchCodeLit"/> + </wsdl:message> + <wsdl:message name="BadRecordLitFault"> + <wsdl:part name="BadRecordLit" element="x1:BadRecordLit"/> + </wsdl:message> + <wsdl:message name="testDocLitBareRequest"> + <wsdl:part name="in" element="x1:BareDocument"/> + </wsdl:message> + <wsdl:message name="testDocLitBareResponse"> + <wsdl:part name="out" element="x1:BareDocumentResponse"/> + </wsdl:message> + <wsdl:portType name="Greeter"> + <wsdl:operation name="sayHi"> + <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/> + <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/> + </wsdl:operation> + <wsdl:operation name="greetMe"> + <wsdl:input name="greetMeRequest" message="tns:greetMeRequest"/> + <wsdl:output name="greetMeResponse" message="tns:greetMeResponse"/> + </wsdl:operation> + <wsdl:operation name="greetMeSometime"> + <wsdl:input name="greetMeSometimeRequest" message="tns:greetMeSometimeRequest"/> + <wsdl:output name="greetMeSometimeResponse" message="tns:greetMeSometimeResponse"/> + </wsdl:operation> + <wsdl:operation name="greetMeOneWay"> + <wsdl:input name="greetMeOneWayRequest" message="tns:greetMeOneWayRequest"/> + </wsdl:operation> + <wsdl:operation name="testDocLitFault"> + <wsdl:input name="testDocLitFaultRequest" message="tns:testDocLitFaultRequest"/> + <wsdl:output name="testDocLitFaultResponse" message="tns:testDocLitFaultResponse"/> + <wsdl:fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault"/> + <wsdl:fault name="BadRecordLitFault" message="tns:BadRecordLitFault"/> + </wsdl:operation> + <wsdl:operation name="testDocLitBare"> + <wsdl:input name="testDocLitBareRequest" message="tns:testDocLitBareRequest"/> + <wsdl:output name="testDocLitBareResponse" message="tns:testDocLitBareResponse"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="sayHi"> + <soap:operation style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="greetMe"> + <soap:operation style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="greetMeSometime"> + <soap:operation style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="greetMeOneWay"> + <soap:operation style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + </wsdl:operation> + <wsdl:operation name="testDocLitFault"> + <soap:operation style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + <wsdl:fault name="NoSuchCodeLitFault"> + <soap:fault name="NoSuchCodeLitFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="BadRecordLitFault"> + <soap:fault name="BadRecordLitFault" use="literal"/> + </wsdl:fault> + </wsdl:operation> + <wsdl:operation name="testDocLitBare"> + <soap:operation style="document" soapAction="http://cxf.apache.org/w2j/hello_world_soap_http/testDocLitBare"/> + <wsdl:input name="testDocLitBareRequest"> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output name="testDocLitBareResponse"> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="SOAPService"> + <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding"> + <soap:address location="http://localhost:9000/SoapContext/SoapPort"/> + <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/> + </wsdl:port> + </wsdl:service> + <wsdl:service name="SOAPService_Test1"> + <wsdl:port name="SoapPort_Test1" binding="tns:Greeter_SOAPBinding"> + <soap:address location="http://localhost:9100"/> + </wsdl:port> + <wsdl:port name="SoapPort_Test2" binding="tns:Greeter_SOAPBinding"> + <soap:address location="http://localhost:9101"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> http://git-wip-us.apache.org/repos/asf/cxf/blob/00f0791f/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/wrong_tns.wsdl ---------------------------------------------------------------------- diff --git a/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/wrong_tns.wsdl b/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/wrong_tns.wsdl deleted file mode 100644 index 86bf105..0000000 --- a/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/wrong_tns.wsdl +++ /dev/null @@ -1,273 +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 xmlns="http://schemas.xmlsoap.org/wsdl/" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:tns="http://cxf.apache.org/w2j/hello_world_soap_http/tns:soap" - xmlns:x1="http://cxf.apache.org/w2j/hello_world_soap_http/tns:types" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://cxf.apache.org/w2j/hello_world_soap_http/tns:soap" name="HelloWorld"> - <wsdl:types> - <schema targetNamespace="http://cxf.apache.org/w2j/hello_world_soap_http/tns:types" - xmlns="http://www.w3.org/2001/XMLSchema" xmlns:x1="http://cxf.apache.org/w2j/hello_world_soap_http/tns:types" - elementFormDefault="qualified"> - <element name="sayHi"> - <complexType/> - </element> - <element name="sayHiResponse"> - <complexType> - <sequence> - <element name="responseType" type="string"/> - </sequence> - </complexType> - </element> - <element name="greetMe"> - <complexType> - <sequence> - <element name="requestType" type="string"/> - </sequence> - </complexType> - </element> - <element name="greetMeResponse"> - <complexType> - <sequence> - <element name="responseType" type="string"/> - </sequence> - </complexType> - </element> - <element name="greetMeSometime"> - <complexType> - <sequence> - <element name="requestType" type="string"/> - </sequence> - </complexType> - </element> - <element name="greetMeSometimeResponse"> - <complexType> - <sequence> - <element name="responseType" type="string"/> - </sequence> - </complexType> - </element> - <element name="greetMeOneWay"> - <complexType> - <sequence> - <element name="requestType" type="string"/> - </sequence> - </complexType> - </element> - <element name="testDocLitFault"> - <complexType> - <sequence> - <element name="faultType" type="string"/> - </sequence> - </complexType> - </element> - <element name="testDocLitFaultResponse"> - <complexType> - <sequence/> - </complexType> - </element> - <complexType name="ErrorCode"> - <sequence> - <element name="minor" type="short"/> - <element name="major" type="short"/> - </sequence> - </complexType> - <element name="NoSuchCodeLit"> - <complexType> - <sequence> - <element name="code" type="x1:ErrorCode"/> - </sequence> - </complexType> - </element> - <element name="BadRecordLit" type="string"/> - <complexType name="BadRecord"> - <sequence> - <element name="reason" type="string"/> - <element name="code" type="short"/> - </sequence> - </complexType> - <complexType name="addNumbers"> - <sequence> - <element name="arg0" type="int"/> - <element name="arg1" type="int"/> - </sequence> - </complexType> - <element name="addNumbers" type="x1:addNumbers"/> - <complexType name="addNumbersResponse"> - <sequence> - <element name="return" type="int"/> - </sequence> - </complexType> - <element name="addNumbersResponse" type="x1:addNumbersResponse"/> - <element name="BareDocument" type="string"/> - <element name="BareDocumentResponse"> - <complexType> - <sequence> - <element name="company" type="string"/> - </sequence> - <attribute name="id" type="int"/> - </complexType> - </element> - </schema> - </wsdl:types> - <wsdl:message name="sayHiRequest"> - <wsdl:part name="in" element="x1:sayHi"/> - </wsdl:message> - <wsdl:message name="sayHiResponse"> - <wsdl:part name="out" element="x1:sayHiResponse"/> - </wsdl:message> - <wsdl:message name="greetMeRequest"> - <wsdl:part name="in" element="x1:greetMe"/> - </wsdl:message> - <wsdl:message name="greetMeResponse"> - <wsdl:part name="out" element="x1:greetMeResponse"/> - </wsdl:message> - <wsdl:message name="greetMeSometimeRequest"> - <wsdl:part name="in" element="x1:greetMeSometime"/> - </wsdl:message> - <wsdl:message name="greetMeSometimeResponse"> - <wsdl:part name="out" element="x1:greetMeSometimeResponse"/> - </wsdl:message> - <wsdl:message name="greetMeOneWayRequest"> - <wsdl:part name="in" element="x1:greetMeOneWay"/> - </wsdl:message> - <wsdl:message name="testDocLitFaultRequest"> - <wsdl:part name="in" element="x1:testDocLitFault"/> - </wsdl:message> - <wsdl:message name="testDocLitFaultResponse"> - <wsdl:part name="out" element="x1:testDocLitFaultResponse"/> - </wsdl:message> - <wsdl:message name="NoSuchCodeLitFault"> - <wsdl:part name="NoSuchCodeLit" element="x1:NoSuchCodeLit"/> - </wsdl:message> - <wsdl:message name="BadRecordLitFault"> - <wsdl:part name="BadRecordLit" element="x1:BadRecordLit"/> - </wsdl:message> - <wsdl:message name="testDocLitBareRequest"> - <wsdl:part name="in" element="x1:BareDocument"/> - </wsdl:message> - <wsdl:message name="testDocLitBareResponse"> - <wsdl:part name="out" element="x1:BareDocumentResponse"/> - </wsdl:message> - <wsdl:portType name="Greeter"> - <wsdl:operation name="sayHi"> - <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/> - <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/> - </wsdl:operation> - <wsdl:operation name="greetMe"> - <wsdl:input name="greetMeRequest" message="tns:greetMeRequest"/> - <wsdl:output name="greetMeResponse" message="tns:greetMeResponse"/> - </wsdl:operation> - <wsdl:operation name="greetMeSometime"> - <wsdl:input name="greetMeSometimeRequest" message="tns:greetMeSometimeRequest"/> - <wsdl:output name="greetMeSometimeResponse" message="tns:greetMeSometimeResponse"/> - </wsdl:operation> - <wsdl:operation name="greetMeOneWay"> - <wsdl:input name="greetMeOneWayRequest" message="tns:greetMeOneWayRequest"/> - </wsdl:operation> - <wsdl:operation name="testDocLitFault"> - <wsdl:input name="testDocLitFaultRequest" message="tns:testDocLitFaultRequest"/> - <wsdl:output name="testDocLitFaultResponse" message="tns:testDocLitFaultResponse"/> - <wsdl:fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault"/> - <wsdl:fault name="BadRecordLitFault" message="tns:BadRecordLitFault"/> - </wsdl:operation> - <wsdl:operation name="testDocLitBare"> - <wsdl:input name="testDocLitBareRequest" message="tns:testDocLitBareRequest"/> - <wsdl:output name="testDocLitBareResponse" message="tns:testDocLitBareResponse"/> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="sayHi"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - <wsdl:operation name="greetMe"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - <wsdl:operation name="greetMeSometime"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - <wsdl:operation name="greetMeOneWay"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - </wsdl:operation> - <wsdl:operation name="testDocLitFault"> - <soap:operation style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - <wsdl:fault name="NoSuchCodeLitFault"> - <soap:fault name="NoSuchCodeLitFault" use="literal"/> - </wsdl:fault> - <wsdl:fault name="BadRecordLitFault"> - <soap:fault name="BadRecordLitFault" use="literal"/> - </wsdl:fault> - </wsdl:operation> - <wsdl:operation name="testDocLitBare"> - <soap:operation style="document" soapAction="http://cxf.apache.org/w2j/hello_world_soap_http/testDocLitBare"/> - <wsdl:input name="testDocLitBareRequest"> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output name="testDocLitBareResponse"> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="SOAPService"> - <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:9000/SoapContext/SoapPort"/> - <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/> - </wsdl:port> - </wsdl:service> - <wsdl:service name="SOAPService_Test1"> - <wsdl:port name="SoapPort_Test1" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:9100"/> - </wsdl:port> - <wsdl:port name="SoapPort_Test2" binding="tns:Greeter_SOAPBinding"> - <soap:address location="http://localhost:9101"/> - </wsdl:port> - </wsdl:service> -</wsdl:definitions> -
