Using schemas.gumartinm.name where it is required (trying to make different namespace...
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Mon, 18 Jul 2016 19:19:45 +0000 (21:19 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Mon, 18 Jul 2016 19:19:45 +0000 (21:19 +0200)
17 files changed:
SOAP/cxf/web-services-spring-cxf-client/src/main/build-resources/bindings/custombinding.xjb
SOAP/cxf/web-services-spring-cxf-client/src/main/build-resources/wsdl/example.wsdl
SOAP/cxf/web-services-spring-cxf-client/src/main/resources/examples.xsd
SOAP/cxf/web-services-spring-cxf-client/src/main/resources/spring-configuration/ws/client-spring-configuration.xml
SOAP/cxf/web-services-spring-cxf-client/src/test/java/de/spring/webservices/client/ExampleClientServiceIntegrationTest.java
SOAP/cxf/web-services-spring-cxf-server/src/main/java/de/spring/webservices/endpoints/ExampleEndPoint.java
SOAP/cxf/web-services-spring-cxf-server/src/main/resources/examples.xsd
SOAP/cxf/web-services-spring-cxf-server/src/main/resources/spring-configuration/ws/soap-ws.xml
SOAP/cxf/web-services-spring-cxf-server/src/test/java/de/spring/webservices/endpoints/ExampleEndPointIntegrationTest.java
SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/build-resources/wsdl/example.wsdl
SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/resources/schemas/examples.xsd
SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/resources/spring-configuration/ws/client-spring-configuration.xml
SOAP/jaxb2/web-services-spring-jaxb2-client/src/test/java/de/spring/webservices/client/ExampleClientServiceIntegrationTest.java
SOAP/jaxb2/web-services-spring-jaxb2-server/src/main/java/de/spring/webservices/endpoints/ExampleEndPoint.java
SOAP/jaxb2/web-services-spring-jaxb2-server/src/main/resources/schemas/examples.xsd
SOAP/jaxb2/web-services-spring-jaxb2-server/src/main/resources/spring-configuration/ws/soap-ws.xml
SOAP/jaxb2/web-services-spring-jaxb2-server/src/test/java/de/spring/webservices/endpoints/ExampleEndPointIntegrationTest.java

index d573e11..3b5e4b1 100644 (file)
     
 
     <!--
-        XSD namespace for included schema in WSDL: http://gumartinm.name/spring-ws/example
+        XSD namespace for included schema in WSDL: http://gumartinm.name/spring-ws/exampleService
 
         I am skiping the XSD namespace for imported schema in WSDL: http://gumartinm.name/spring-ws/parent because I guess,
         there must be some way of using the already generated code in web-services-spring-globalxsds instead of generating new one
         (perhaps using maven-jaxb2-plugin with episodes)
      -->
     <jaxws:bindings
-        node="wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://gumartinm.name/spring-ws/example']">
+        node="wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://schemas.gumartinm.name/spring-ws/example']">
 
                <!--
                        Perhaps it would be better to relay on the package generated automatically from WSDL
index c4c1a9a..c4919f8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://gumartinm.name/spring-ws/example" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://gumartinm.name/spring-ws/exampleService" targetNamespace="http://gumartinm.name/spring-ws/exampleService">
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://schemas.gumartinm.name/spring-ws/example" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://gumartinm.name/spring-ws/exampleService" targetNamespace="http://gumartinm.name/spring-ws/exampleService">
   <wsdl:types>
-    <xsd:schema xmlns="http://gumartinm.name/spring-ws/example" xmlns:annox="http://annox.dev.java.net" xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:parent="http://schemas.gumartinm.name/spring-ws/parent" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="inheritance annox" jaxb:version="2.1" targetNamespace="http://gumartinm.name/spring-ws/example">
+    <xsd:schema xmlns="http://schemas.gumartinm.name/spring-ws/example" xmlns:annox="http://annox.dev.java.net" xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:parent="http://schemas.gumartinm.name/spring-ws/parent" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="inheritance annox" jaxb:version="2.1" targetNamespace="http://schemas.gumartinm.name/spring-ws/example">
     
     <!--
          When should an item be declared as an element versus when should it be defined as a type?
   </wsdl:binding>
   <wsdl:service name="ExamplesService">
     <wsdl:port binding="tns:ExamplesSoap12" name="ExamplesSoap12">
-      <soap12:address location="http://localhost:8080/web-services-spring-cxf-server/spring-ws/example"/>
+      <soap12:address location="http://localhost:8080/web-services-spring-cxf-server/spring-ws/exampleService"/>
     </wsdl:port>
   </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file
+</wsdl:definitions>
index b770328..8798ed0 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<xsd:schema xmlns="http://gumartinm.name/spring-ws/example"
+<xsd:schema xmlns="http://schemas.gumartinm.name/spring-ws/example"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:parent="http://schemas.gumartinm.name/spring-ws/parent"
     xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
@@ -7,7 +7,7 @@
     xmlns:annox="http://annox.dev.java.net"
     jaxb:version="2.1"
     jaxb:extensionBindingPrefixes="inheritance annox"
-    targetNamespace="http://gumartinm.name/spring-ws/example"
+    targetNamespace="http://schemas.gumartinm.name/spring-ws/example"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified">
     
index 1780e9c..ef7a0c4 100644 (file)
         <property name="marshaller" ref="marshaller" />
         <property name="unmarshaller" ref="marshaller" />
 
-        <!-- For local deployments change to http://localhost:8080/web-services-spring-cxf-server/spring-ws/example -->
-        <property name="defaultUri" value="http://gumartinm.name/spring-ws/example"/>
+        <!-- For local deployments change to http://localhost:8080/web-services-spring-cxf-server/spring-ws/exampleService -->
+        <property name="defaultUri" value="http://gumartinm.name/spring-ws/exampleService"/>
 
         <property name="interceptors">
             <list>
index 4877a5d..49b5e59 100644 (file)
@@ -40,11 +40,11 @@ public class ExampleClientServiceIntegrationTest {
     @Test
     public void customerClient() throws Exception {
         final Source requestPayload = new StringSource(
-                "<ExampleRequest xmlns='http://gumartinm.name/spring-ws/example'>"
+                "<ExampleRequest xmlns='http://schemas.gumartinm.name/spring-ws/example'>"
                         + "<data>SCARLETT SPRING. IT IS CANON.</data>"
                         + "</ExampleRequest>");
         final Source responsePayload = new StringSource(
-                "<ns2:ExampleResponse xmlns:ns2='http://gumartinm.name/spring-ws/example'>"
+                "<ns2:ExampleResponse xmlns:ns2='http://schemas.gumartinm.name/spring-ws/example'>"
                         + "<ns2:data>SNAKE EYES AND SCARLETT SPRING. IT IS CANON.</ns2:data>"
                         + "</ns2:ExampleResponse>");
         mockServer.expect(payload(requestPayload)).andRespond(
@@ -59,11 +59,11 @@ public class ExampleClientServiceIntegrationTest {
     @Test
     public void customerCustomClient() throws Exception { 
         final Source customRequestPayload = new StringSource(
-                "<CustomBindingExampleRequest xmlns='http://gumartinm.name/spring-ws/example'>" +
+                "<CustomBindingExampleRequest xmlns='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<data>CUSTOM BINDING SPRING. SCARLETT. IT IS CANON.</data>" +
                 "</CustomBindingExampleRequest>");
         final Source customResponsePayload = new StringSource(
-                "<ns2:CustomBindingExampleResponse xmlns:ns2='http://gumartinm.name/spring-ws/example'>" +
+                "<ns2:CustomBindingExampleResponse xmlns:ns2='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<ns2:data>CUSTOM BINDING SNAKE EYES AND SCARLETT SPRING. IT IS CANON.</ns2:data>" +
                 "</ns2:CustomBindingExampleResponse>");
         mockServer.expect(payload(customRequestPayload)).andRespond(
index 41da49b..dd1ea37 100644 (file)
@@ -19,7 +19,7 @@ import de.spring.webservices.services.ExampleService;
 
 @Endpoint
 public class ExampleEndPoint {
-    private static final String NAMESPACE_URI = "http://gumartinm.name/spring-ws/example";
+    private static final String NAMESPACE_URI = "http://schemas.gumartinm.name/spring-ws/example";
     
     private final Operations.RequestResponse
        <CustomBindingExampleResponse, CustomBindingExampleRequest> customBindingExampleService;  
index b770328..8798ed0 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<xsd:schema xmlns="http://gumartinm.name/spring-ws/example"
+<xsd:schema xmlns="http://schemas.gumartinm.name/spring-ws/example"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:parent="http://schemas.gumartinm.name/spring-ws/parent"
     xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
@@ -7,7 +7,7 @@
     xmlns:annox="http://annox.dev.java.net"
     jaxb:version="2.1"
     jaxb:extensionBindingPrefixes="inheritance annox"
-    targetNamespace="http://gumartinm.name/spring-ws/example"
+    targetNamespace="http://schemas.gumartinm.name/spring-ws/example"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified">
     
index cf3e7d7..d90e533 100644 (file)
     -->
     <sws:dynamic-wsdl id="example" portTypeName="Examples"
         createSoap12Binding="true" createSoap11Binding="false"
-        locationUri="/spring-ws/example"
+        locationUri="/spring-ws/exampleService"
         targetNamespace="http://gumartinm.name/spring-ws/exampleService">
         <sws:xsd location="classpath:examples.xsd"/>
     </sws:dynamic-wsdl>
index f0204cb..6600f3a 100644 (file)
@@ -33,11 +33,11 @@ public class ExampleEndPointIntegrationTest {
     @Test
     public void exampleEndpoint() throws Exception {
         final Source requestPayload = new StringSource(
-                "<ExampleRequest xmlns='http://gumartinm.name/spring-ws/example'>" +
+                "<ExampleRequest xmlns='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<data>SCARLETT</data>" +
                 "</ExampleRequest>");
         final Source responsePayload = new StringSource(
-                "<ns2:ExampleResponse xmlns:ns2='http://gumartinm.name/spring-ws/example'>" +
+                "<ns2:ExampleResponse xmlns:ns2='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<ns2:data>SNAKE EYES AND SCARLETT</ns2:data>" +
                 "</ns2:ExampleResponse>");
         mockClient.sendRequest(withPayload(requestPayload)).andExpect(
@@ -45,13 +45,13 @@ public class ExampleEndPointIntegrationTest {
         
 
         final Source customRequestPayload = new StringSource(
-                "<CustomBindingExampleRequest xmlns='http://gumartinm.name/spring-ws/example'>" +
+                "<CustomBindingExampleRequest xmlns='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<data>SCARLETT</data>" +
                                "<exampleDate>2015-06-03T10:20:30Z</exampleDate>" +
                         "<parentEnum>FIRST</parentEnum>" +
                 "</CustomBindingExampleRequest>");
         final Source customResponsePayload = new StringSource(
-                "<ns2:CustomBindingExampleResponse xmlns:ns2='http://gumartinm.name/spring-ws/example'>" +
+                "<ns2:CustomBindingExampleResponse xmlns:ns2='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<ns2:data>CUSTOM BINDING SNAKE EYES AND SCARLETT</ns2:data>" +
                         "<ns2:parentEnum>FIRST</ns2:parentEnum>" +
                 "</ns2:CustomBindingExampleResponse>");
index 8891cb8..1bc4187 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://gumartinm.name/spring-ws/example" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://gumartinm.name/spring-ws/exampleService" targetNamespace="http://gumartinm.name/spring-ws/exampleService">
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://schemas.gumartinm.name/spring-ws/example" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://gumartinm.name/spring-ws/exampleService" targetNamespace="http://gumartinm.name/spring-ws/exampleService">
   <wsdl:types>
-    <xsd:schema xmlns="http://gumartinm.name/spring-ws/example" xmlns:annox="http://annox.dev.java.net" xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:parent="http://schemas.gumartinm.name/spring-ws/parent" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="inheritance annox" jaxb:version="2.1" targetNamespace="http://gumartinm.name/spring-ws/example">
+    <xsd:schema xmlns="http://schemas.gumartinm.name/spring-ws/example" xmlns:annox="http://annox.dev.java.net" xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:parent="http://schemas.gumartinm.name/spring-ws/parent" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="inheritance annox" jaxb:version="2.1" targetNamespace="http://schemas.gumartinm.name/spring-ws/example">
     
     <!--
          When should an item be declared as an element versus when should it be defined as a type?
   </wsdl:binding>
   <wsdl:service name="ExamplesService">
     <wsdl:port binding="tns:ExamplesSoap12" name="ExamplesSoap12">
-      <soap12:address location="http://localhost:8080/web-services-spring-jaxb2-server/spring-ws/example"/>
+      <soap12:address location="http://localhost:8080/web-services-spring-jaxb2-server/spring-ws/exampleService"/>
     </wsdl:port>
   </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file
+</wsdl:definitions>
index b770328..8798ed0 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<xsd:schema xmlns="http://gumartinm.name/spring-ws/example"
+<xsd:schema xmlns="http://schemas.gumartinm.name/spring-ws/example"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:parent="http://schemas.gumartinm.name/spring-ws/parent"
     xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
@@ -7,7 +7,7 @@
     xmlns:annox="http://annox.dev.java.net"
     jaxb:version="2.1"
     jaxb:extensionBindingPrefixes="inheritance annox"
-    targetNamespace="http://gumartinm.name/spring-ws/example"
+    targetNamespace="http://schemas.gumartinm.name/spring-ws/example"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified">
     
index ff12bd2..06799df 100644 (file)
         <property name="marshaller" ref="marshaller" />
         <property name="unmarshaller" ref="marshaller" />
 
-        <!-- For local deployments change to http://localhost:8080/web-services-spring-jaxb2-server/spring-ws/example -->
-        <property name="defaultUri" value="http://gumartinm.name/spring-ws/example"/>
+        <!-- For local deployments change to http://localhost:8080/web-services-spring-jaxb2-server/spring-ws/exampleService -->
+        <property name="defaultUri" value="http://gumartinm.name/spring-ws/exampleService"/>
 
         <property name="interceptors">
             <list>
index 4877a5d..49b5e59 100644 (file)
@@ -40,11 +40,11 @@ public class ExampleClientServiceIntegrationTest {
     @Test
     public void customerClient() throws Exception {
         final Source requestPayload = new StringSource(
-                "<ExampleRequest xmlns='http://gumartinm.name/spring-ws/example'>"
+                "<ExampleRequest xmlns='http://schemas.gumartinm.name/spring-ws/example'>"
                         + "<data>SCARLETT SPRING. IT IS CANON.</data>"
                         + "</ExampleRequest>");
         final Source responsePayload = new StringSource(
-                "<ns2:ExampleResponse xmlns:ns2='http://gumartinm.name/spring-ws/example'>"
+                "<ns2:ExampleResponse xmlns:ns2='http://schemas.gumartinm.name/spring-ws/example'>"
                         + "<ns2:data>SNAKE EYES AND SCARLETT SPRING. IT IS CANON.</ns2:data>"
                         + "</ns2:ExampleResponse>");
         mockServer.expect(payload(requestPayload)).andRespond(
@@ -59,11 +59,11 @@ public class ExampleClientServiceIntegrationTest {
     @Test
     public void customerCustomClient() throws Exception { 
         final Source customRequestPayload = new StringSource(
-                "<CustomBindingExampleRequest xmlns='http://gumartinm.name/spring-ws/example'>" +
+                "<CustomBindingExampleRequest xmlns='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<data>CUSTOM BINDING SPRING. SCARLETT. IT IS CANON.</data>" +
                 "</CustomBindingExampleRequest>");
         final Source customResponsePayload = new StringSource(
-                "<ns2:CustomBindingExampleResponse xmlns:ns2='http://gumartinm.name/spring-ws/example'>" +
+                "<ns2:CustomBindingExampleResponse xmlns:ns2='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<ns2:data>CUSTOM BINDING SNAKE EYES AND SCARLETT SPRING. IT IS CANON.</ns2:data>" +
                 "</ns2:CustomBindingExampleResponse>");
         mockServer.expect(payload(customRequestPayload)).andRespond(
index f6ff022..411d32c 100644 (file)
@@ -19,7 +19,7 @@ import de.spring.webservices.services.ExampleService;
 
 @Endpoint
 public class ExampleEndPoint {
-    private static final String NAMESPACE_URI = "http://gumartinm.name/spring-ws/example";
+    private static final String NAMESPACE_URI = "http://schemas.gumartinm.name/spring-ws/example";
     
     private final Operations.RequestResponse
        <CustomBindingExampleResponse, CustomBindingExampleRequest> customBindingExampleService;  
index b770328..8798ed0 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<xsd:schema xmlns="http://gumartinm.name/spring-ws/example"
+<xsd:schema xmlns="http://schemas.gumartinm.name/spring-ws/example"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:parent="http://schemas.gumartinm.name/spring-ws/parent"
     xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
@@ -7,7 +7,7 @@
     xmlns:annox="http://annox.dev.java.net"
     jaxb:version="2.1"
     jaxb:extensionBindingPrefixes="inheritance annox"
-    targetNamespace="http://gumartinm.name/spring-ws/example"
+    targetNamespace="http://schemas.gumartinm.name/spring-ws/example"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified">
     
index 40f2901..041b914 100644 (file)
     -->
     <sws:dynamic-wsdl id="example" portTypeName="Examples"
         createSoap12Binding="true" createSoap11Binding="false"
-        locationUri="/spring-ws/example"
+        locationUri="/spring-ws/exampleService"
         targetNamespace="http://gumartinm.name/spring-ws/exampleService">
         <sws:xsd location="classpath:schemas/examples.xsd"/>
     </sws:dynamic-wsdl>
index f0204cb..6600f3a 100644 (file)
@@ -33,11 +33,11 @@ public class ExampleEndPointIntegrationTest {
     @Test
     public void exampleEndpoint() throws Exception {
         final Source requestPayload = new StringSource(
-                "<ExampleRequest xmlns='http://gumartinm.name/spring-ws/example'>" +
+                "<ExampleRequest xmlns='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<data>SCARLETT</data>" +
                 "</ExampleRequest>");
         final Source responsePayload = new StringSource(
-                "<ns2:ExampleResponse xmlns:ns2='http://gumartinm.name/spring-ws/example'>" +
+                "<ns2:ExampleResponse xmlns:ns2='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<ns2:data>SNAKE EYES AND SCARLETT</ns2:data>" +
                 "</ns2:ExampleResponse>");
         mockClient.sendRequest(withPayload(requestPayload)).andExpect(
@@ -45,13 +45,13 @@ public class ExampleEndPointIntegrationTest {
         
 
         final Source customRequestPayload = new StringSource(
-                "<CustomBindingExampleRequest xmlns='http://gumartinm.name/spring-ws/example'>" +
+                "<CustomBindingExampleRequest xmlns='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<data>SCARLETT</data>" +
                                "<exampleDate>2015-06-03T10:20:30Z</exampleDate>" +
                         "<parentEnum>FIRST</parentEnum>" +
                 "</CustomBindingExampleRequest>");
         final Source customResponsePayload = new StringSource(
-                "<ns2:CustomBindingExampleResponse xmlns:ns2='http://gumartinm.name/spring-ws/example'>" +
+                "<ns2:CustomBindingExampleResponse xmlns:ns2='http://schemas.gumartinm.name/spring-ws/example'>" +
                         "<ns2:data>CUSTOM BINDING SNAKE EYES AND SCARLETT</ns2:data>" +
                         "<ns2:parentEnum>FIRST</ns2:parentEnum>" +
                 "</ns2:CustomBindingExampleResponse>");