Repository: cxf Updated Branches: refs/heads/2.6.x-fixes 1c471e63f -> 20179968f
[CXF-4910]:Schema can not be retrived if two included schemas have the same relative schema location Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/20179968 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/20179968 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/20179968 Branch: refs/heads/2.6.x-fixes Commit: 20179968fdf118a9361537c4d357062b8dbcd483 Parents: 1c471e6 Author: Jim Ma <[email protected]> Authored: Mon Apr 14 15:03:52 2014 +0800 Committer: Jim Ma <[email protected]> Committed: Mon Apr 14 15:17:59 2014 +0800 ---------------------------------------------------------------------- .../org/apache/cxf/frontend/WSDLGetUtils.java | 10 +-- .../cxf/systest/schemaimport/RequestType.java | 51 +++++++++++++++ .../cxf/systest/schemaimport/ResponseType.java | 49 ++++++++++++++ .../systest/schemaimport/SchemaImportTest.java | 22 +++++++ .../apache/cxf/systest/schemaimport/Server.java | 3 + .../cxf/systest/schemaimport/ServiceImpl.java | 36 ++++++++++ .../cxf/systest/schemaimport/ServiceV1Port.java | 36 ++++++++++ .../systest/schemaimport/SomeFeatureType.java | 45 +++++++++++++ .../test/resources/wsdl_systest/d1/d1/test.xsd | 46 +++++++++++++ .../src/test/resources/wsdl_systest/d1/test.xsd | 22 +++++++ .../wsdl_systest/d2/test_included_1b.xsd | 22 +++++++ .../wsdl_systest/d2/test_included_2.xsd | 22 +++++++ .../test/resources/wsdl_systest/service.wsdl | 69 ++++++++++++++++++++ 13 files changed, 429 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java ---------------------------------------------------------------------- diff --git a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java index f5734a3..0ccd701 100644 --- a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java +++ b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java @@ -318,8 +318,9 @@ public class WSDLGetUtils { "include"); for (Element el : elementList) { String sl = el.getAttribute("schemaLocation"); - if (smp.containsKey(URLDecoder.decode(sl, "utf-8"))) { - el.setAttribute("schemaLocation", base + "?xsd=" + sl.replace(" ", "%20")); + sl = mapUri(base, smp, sl, xsd); + if (sl != null) { + el.setAttribute("schemaLocation", sl); } } elementList = DOMUtils.findAllElementsByTagNameNS(doc.getDocumentElement(), @@ -327,8 +328,9 @@ public class WSDLGetUtils { "redefine"); for (Element el : elementList) { String sl = el.getAttribute("schemaLocation"); - if (smp.containsKey(URLDecoder.decode(sl, "utf-8"))) { - el.setAttribute("schemaLocation", base + "?xsd=" + sl.replace(" ", "%20")); + sl = mapUri(base, smp, sl, xsd); + if (sl != null) { + el.setAttribute("schemaLocation", sl); } } elementList = DOMUtils.findAllElementsByTagNameNS(doc.getDocumentElement(), http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/RequestType.java ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/RequestType.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/RequestType.java new file mode 100644 index 0000000..1c8b4d2 --- /dev/null +++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/RequestType.java @@ -0,0 +1,51 @@ +/** + * 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.cxf.systest.schemaimport; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RequestType", propOrder = { "request" }) +public class RequestType { + + @XmlElement(required = true) + protected SomeFeatureType request; + + /** + * Gets the value of the request property. + * + * @return possible object is {@link SomeFeatureType } + */ + public SomeFeatureType getRequest() { + return request; + } + + /** + * Sets the value of the request property. + * + * @param value allowed object is {@link SomeFeatureType } + */ + public void setRequest(SomeFeatureType value) { + this.request = value; + } + +} http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ResponseType.java ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ResponseType.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ResponseType.java new file mode 100644 index 0000000..c9b547f --- /dev/null +++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ResponseType.java @@ -0,0 +1,49 @@ +/** + * 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.cxf.systest.schemaimport; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ResponseType", propOrder = { "text" }) +public class ResponseType { + + protected String text; + + /** + * Gets the value of the text property. + * + * @return possible object is {@link String } + */ + public String getText() { + return text; + } + + /** + * Sets the value of the text property. + * + * @param value allowed object is {@link String } + */ + public void setText(String value) { + this.text = value; + } + +} http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/SchemaImportTest.java ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/SchemaImportTest.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/SchemaImportTest.java index 48c4877..1428b18 100644 --- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/SchemaImportTest.java +++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/SchemaImportTest.java @@ -95,5 +95,27 @@ public class SchemaImportTest extends AbstractBusClientServerTestBase { } } } + + + @Test + public void testSchemaInclude() throws Exception { + String schemaURL = "http://localhost:" + PORT + "/schemainclude/service?xsd=d1/d1/test.xsd"; + URL url = new URL(schemaURL); + InputStream ins = null; + try { + ins = url.openStream(); + String output = IOUtils.toString(ins); + assertTrue(output.indexOf("msg:RequestType") > -1); + assertTrue(output.indexOf("msg:SomeFeatureType") > -1); + } catch (Exception e) { + e.printStackTrace(); + fail("Can not access the include schema"); + + } finally { + if (ins != null) { + ins.close(); + } + } + } } http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/Server.java ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/Server.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/Server.java index d240898..7d0643d 100644 --- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/Server.java +++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/Server.java @@ -35,6 +35,9 @@ public class Server extends AbstractBusTestServerBase { Object implementor2 = new TestEndpointImpl(); String address2 = "http://localhost:" + PORT + "/schemaimport/service"; Endpoint.publish(address2, implementor2); + Object implementor3 = new ServiceImpl(); + String address3 = "http://localhost:" + PORT + "/schemainclude/service"; + Endpoint.publish(address3, implementor3); } public static void main(String[] args) { http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ServiceImpl.java ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ServiceImpl.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ServiceImpl.java new file mode 100644 index 0000000..ec60988 --- /dev/null +++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ServiceImpl.java @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.systest.schemaimport; + +import javax.jws.WebService; +@WebService(targetNamespace = "http://cxf.apache.org/xsd/test/", name = "service_v1_port", +wsdlLocation = "classpath:/wsdl_systest/service.wsdl", +serviceName = "service_v1", +endpointInterface = "org.apache.cxf.systest.schemaimport.ServiceV1Port") +public class ServiceImpl implements ServiceV1Port { + + @Override + public ResponseType testRequest(RequestType request) { + System.out.println(request.getRequest().getSomeMeasure()); + ResponseType responseType = new ResponseType(); + responseType.setText("Response from server"); + return responseType; + } + +} http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ServiceV1Port.java ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ServiceV1Port.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ServiceV1Port.java new file mode 100644 index 0000000..c5add63 --- /dev/null +++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/ServiceV1Port.java @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.systest.schemaimport; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; + +@WebService(targetNamespace = "http://cxf.apache.org/xsd/test/", name = "service_v1_port") +@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) +public interface ServiceV1Port { + + @WebResult(name = "responseMessage", targetNamespace = "http://cxf.apache.org/xsd/test/messages", + partName = "response") + @WebMethod(action = "http://cxf.apache.org/xsd/test/requestMessage") + ResponseType testRequest(@WebParam(partName = "request", name = "requestMessage", + targetNamespace = "http://cxf.apache.org/xsd/test/messages") RequestType request); +} http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/SomeFeatureType.java ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/SomeFeatureType.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/SomeFeatureType.java new file mode 100644 index 0000000..703ee22 --- /dev/null +++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/schemaimport/SomeFeatureType.java @@ -0,0 +1,45 @@ +/** + * 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.cxf.systest.schemaimport; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SomeFeatureType", propOrder = { "someMeasure" }) +public class SomeFeatureType { + + protected int someMeasure; + + /** + * Gets the value of the someMeasure property. + */ + public int getSomeMeasure() { + return someMeasure; + } + + /** + * Sets the value of the someMeasure property. + */ + public void setSomeMeasure(int value) { + this.someMeasure = value; + } + +} http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/resources/wsdl_systest/d1/d1/test.xsd ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/resources/wsdl_systest/d1/d1/test.xsd b/systests/uncategorized/src/test/resources/wsdl_systest/d1/d1/test.xsd new file mode 100644 index 0000000..c73436d --- /dev/null +++ b/systests/uncategorized/src/test/resources/wsdl_systest/d1/d1/test.xsd @@ -0,0 +1,46 @@ +<?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. +--> +<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:msg="http://cxf.apache.org/xsd/test/messages" targetNamespace="http://cxf.apache.org/xsd/test/messages" elementFormDefault="qualified" version="1.0.0"> + <element name="SomeFeature" type="msg:SomeFeatureType"/> + <complexType name="SomeFeatureType"> + <sequence> + <element name="someMeasure" minOccurs="1" maxOccurs="1"> + <simpleType> + <restriction base="integer"> + <minInclusive value="0"/> + <maxInclusive value="9"/> + </restriction> + </simpleType> + </element> + </sequence> + </complexType> + <element name="requestMessage" type="msg:RequestType"/> + <complexType name="RequestType"> + <sequence> + <element name="request" type="msg:SomeFeatureType" minOccurs="1" maxOccurs="1"/> + </sequence> + </complexType> + <element name="responseMessage" type="msg:ResponseType"/> + <complexType name="ResponseType"> + <sequence> + <element name="text" type="string" minOccurs="0" maxOccurs="1"/> + </sequence> + </complexType> +</schema> http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/resources/wsdl_systest/d1/test.xsd ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/resources/wsdl_systest/d1/test.xsd b/systests/uncategorized/src/test/resources/wsdl_systest/d1/test.xsd new file mode 100644 index 0000000..0ae8f42 --- /dev/null +++ b/systests/uncategorized/src/test/resources/wsdl_systest/d1/test.xsd @@ -0,0 +1,22 @@ +<?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. +--> +<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:msg="http://cxf.apache.org/xsd/test/messages" targetNamespace="http://cxf.apache.org/xsd/test/messages" elementFormDefault="qualified" version="1.0.0"> + <include schemaLocation="d1/test.xsd"/> +</schema> http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/resources/wsdl_systest/d2/test_included_1b.xsd ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/resources/wsdl_systest/d2/test_included_1b.xsd b/systests/uncategorized/src/test/resources/wsdl_systest/d2/test_included_1b.xsd new file mode 100644 index 0000000..8e24c49 --- /dev/null +++ b/systests/uncategorized/src/test/resources/wsdl_systest/d2/test_included_1b.xsd @@ -0,0 +1,22 @@ +<?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. +--> +<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:msg="http://cxf.apache.org/xsd/test/messages" targetNamespace="http://cxf.apache.org/xsd/test/messages" elementFormDefault="qualified" version="1.0.0"> + <include schemaLocation="test_included_2.xsd"/> +</schema> http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/resources/wsdl_systest/d2/test_included_2.xsd ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/resources/wsdl_systest/d2/test_included_2.xsd b/systests/uncategorized/src/test/resources/wsdl_systest/d2/test_included_2.xsd new file mode 100644 index 0000000..b3bab62 --- /dev/null +++ b/systests/uncategorized/src/test/resources/wsdl_systest/d2/test_included_2.xsd @@ -0,0 +1,22 @@ +<?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. +--> +<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:msg="http://cxf.apache.org/xsd/test/messages" targetNamespace="http://cxf.apache.org/xsd/test/messages" elementFormDefault="qualified" version="1.0.0"> +</schema> + http://git-wip-us.apache.org/repos/asf/cxf/blob/20179968/systests/uncategorized/src/test/resources/wsdl_systest/service.wsdl ---------------------------------------------------------------------- diff --git a/systests/uncategorized/src/test/resources/wsdl_systest/service.wsdl b/systests/uncategorized/src/test/resources/wsdl_systest/service.wsdl new file mode 100644 index 0000000..baefe9c --- /dev/null +++ b/systests/uncategorized/src/test/resources/wsdl_systest/service.wsdl @@ -0,0 +1,69 @@ +<?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 name="service_v1" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:msg="http://cxf.apache.org/xsd/test/messages" + xmlns:tns="http://cxf.apache.org/xsd/test/" + targetNamespace="http://cxf.apache.org/xsd/test/"> + + <wsdl:types> + <xsd:schema> + <xsd:import namespace="http://cxf.apache.org/xsd/test/messages" schemaLocation="d1/test.xsd" /> + </xsd:schema> + </wsdl:types> + + <wsdl:message name="requestMessage"> + <wsdl:part element="msg:requestMessage" name="request" /> + </wsdl:message> + + <wsdl:message name="responseMessage"> + <wsdl:part element="msg:responseMessage" name="response" /> + </wsdl:message> + + + <wsdl:portType name="service_v1_port"> + <wsdl:operation name="testRequest"> + <wsdl:input message="tns:requestMessage" /> + <wsdl:output message="tns:responseMessage"/> + </wsdl:operation> + </wsdl:portType> + + <wsdl:binding name="service_v1_binding" type="tns:service_v1_port"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="testRequest"> + <soap:operation soapAction="http://cxf.apache.org/xsd/test/requestMessage"/> + <wsdl:input> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap:body use="literal" /> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + + <wsdl:service name="service_v1"> + <wsdl:port name="service_v1_port" binding="tns:service_v1_binding"> + <soap:address location="REPLACE_WITH_ACTUAL_URL" /> + </wsdl:port> + </wsdl:service> + +</wsdl:definitions>
