cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r443324 - in /incubator/cxf/trunk: rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/ rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/ rt/bindings/xml/s...
Date Thu, 14 Sep 2006 11:53:10 GMT
Author: tli
Date: Thu Sep 14 04:53:09 2006
New Revision: 443324

URL: http://svn.apache.org/viewvc?view=rev&rev=443324
Log:
add xml bindingsystem test, refactor the xml binding namespace from xmlformat to xformat

Added:
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java
  (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLBareTest.java
  (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLWrapTest.java
  (with props)
    incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/bare/
    incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/bare/GreeterImpl.java
  (with props)
Modified:
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFault.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultInInterceptor.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/bus-extensions.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
    incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/bus-extensions.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadXMLBindingProvider.java
    incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/wrapped/GreeterImpl.java
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_bare.wsdl
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_wrapped.wsdl
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/type_test/type_test_xml_wsdl.xsl

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
Thu Sep 14 04:53:09 2006
@@ -122,11 +122,11 @@
         sb.getInInterceptors().add(new MustUnderstandInterceptor());
         sb.getInInterceptors().add(new StaxInInterceptor());
 
+        sb.getOutInterceptors().add(new AttachmentOutInterceptor());
         sb.getOutInterceptors().add(new StaxOutInterceptor());
         sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
         sb.getOutInterceptors().add(new SoapOutInterceptor());
 
-        sb.getOutFaultInterceptors().add(new AttachmentOutInterceptor());
         sb.getOutFaultInterceptors().add(new StaxOutInterceptor());
         sb.getOutFaultInterceptors().add(new SoapOutInterceptor());
         sb.getOutFaultInterceptors().add(sb.getOutFaultInterceptor());

Added: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java?view=auto&rev=443324
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java
(added)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java
Thu Sep 14 04:53:09 2006
@@ -0,0 +1,34 @@
+/**
+ * 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.binding.xml;
+
+import javax.xml.namespace.QName;
+
+public final class XMLConstants {
+    public static final String NS_XML_FORMAT = "http://celtix.objectweb.org/bindings/xformat";
+
+    public static final QName XML_FAULT_ROOT = new QName(NS_XML_FORMAT, "XMLFault");
+    public static final QName XML_FAULT_CODE = new QName(NS_XML_FORMAT, "faultcode");
+    public static final QName XML_FAULT_STRING = new QName(NS_XML_FORMAT, "faultstring");
+    public static final QName XML_FAULT_DETAIL = new QName(NS_XML_FORMAT, "detail");
+
+    public static final QName XML_FAULT_CODE_SERVER = new QName(NS_XML_FORMAT, "SERVER");
+    public static final QName XML_FAULT_CODE_CLIENT = new QName(NS_XML_FORMAT, "CLIENT");
+}
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFault.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFault.java?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFault.java
(original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFault.java
Thu Sep 14 04:53:09 2006
@@ -18,17 +18,33 @@
  */
 package org.apache.cxf.binding.xml;
 
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
 import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.interceptor.Fault;
 
 public class XMLFault extends Fault {
-    
+
     static final long serialVersionUID = 100000;
+
+    private Node faultRoot;
+
+    // private QNname faultCode;
+    private String faultString;
+
+    private Node faultDetail;
+
+    private Node detailRoot;
+
     
+
     public XMLFault(Message message, Throwable throwable) {
         super(message, throwable);
     }
-    
+
     public XMLFault(Message message) {
         super(message);
     }
@@ -37,6 +53,76 @@
         super(t);
     }
 
+    public void setFaultString(String str) {
+        this.faultString = str;
+    }
+
+    public void addFaultString(String str) {
+        assert faultRoot != null;
+
+        Text text = XMLUtils.createTextNode(this.faultRoot, str);
+        Node faultStringNode = XMLUtils.createElementNS(this.faultRoot, XMLConstants.XML_FAULT_STRING);
+        faultStringNode.appendChild(text);
+        this.faultRoot.appendChild(faultStringNode);
+
+        this.faultString = str;
+    }
+
+    public void setFaultDetail(Node detail) {
+        this.detailRoot = detail;
+
+        NodeList list = detail.getChildNodes();
+        for (int i = 0; i < list.getLength(); i++) {
+            Node entry = list.item(i);
+            if (entry.getNodeType() != Node.ELEMENT_NODE) {
+                continue;
+            }
+            this.faultDetail = detail;
+        }
+    }
+
+    public void appendFaultDetail(Node detail) {
+        assert faultRoot != null;
+        assert detailRoot != null;
+
+        this.detailRoot.appendChild(detail);
+        this.faultDetail = detail;
+    }
+
+    public Node addFaultDetail() {
+        assert faultRoot != null;
+
+        this.detailRoot = XMLUtils.createElementNS(this.faultRoot, XMLConstants.XML_FAULT_DETAIL);
+        this.faultRoot.appendChild(this.detailRoot);
+        return this.detailRoot;
+    }
+
+    public String getFaultString() {
+        return this.faultString;
+    }
+
+    public Node getFaultDetail() {
+        return this.faultDetail;
+    }
 
+    public Node getFaultDetailRoot() {
+        return this.detailRoot;
+    }
+
+    public Node getFaultRoot() {
+        return this.faultRoot;
+    }
+
+    protected void setFaultRoot(Node root) {
+        this.faultRoot = root;
+    }
+
+    public void removeChild(Node node) {
+        this.faultRoot.removeChild(node);
+    }
+
+    public boolean hasChildNodes() {
+        return this.faultRoot.hasChildNodes();
+    }
 
 }

Modified: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultInInterceptor.java?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultInInterceptor.java
Thu Sep 14 04:53:09 2006
@@ -16,17 +16,36 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+
 package org.apache.cxf.binding.xml.interceptor;
 
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.cxf.binding.xml.XMLConstants;
 import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.staxutils.DepthXMLStreamReader;
+import org.apache.cxf.staxutils.StaxUtils;
 
 public class XMLFaultInInterceptor extends AbstractInDatabindingInterceptor {
 
     public void handleMessage(Message message) throws Fault {
-        // TODO Auto-generated method stub
 
-    }
+        XMLStreamReader reader = message.getContent(XMLStreamReader.class);
+        DepthXMLStreamReader dr = new DepthXMLStreamReader(reader);
+        // List<Exception> exlist = new ArrayList<Exception>();
 
+        StaxUtils.nextEvent(dr);
+        if (StaxUtils.toNextElement(dr)) {
+            QName startQName = new QName(dr.getNamespaceURI(), dr.getLocalName());
+            if (startQName.equals(XMLConstants.XML_FAULT_ROOT)) {
+                while (StaxUtils.toNextElement(dr)) {
+                    // marshall exception detail by jaxb, and add into exList
+
+                }
+            }
+        }
+    }
 }

Modified: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
Thu Sep 14 04:53:09 2006
@@ -97,7 +97,7 @@
             } else {
                 // bare with one part and part name not equal operation name,
                 // check param match
-                if (!boi.isUnwrapped()) {
+                if (!boi.isUnwrappedCapable()) {
                     if (mi.getMessageParts().size() != 1) {
                         continue;
                     }

Modified: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/bus-extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/bus-extensions.xml?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/bus-extensions.xml (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/bus-extensions.xml Thu
Sep 14 04:53:09 2006
@@ -20,7 +20,7 @@
 <extensions xmlns="http://cxf.apache.org/bus/extension">
 
     <extension class="org.apache.cxf.binding.xml.XMLBindingFactory" deferred="true">
-        <namespace>http://cxf.apache.org/bindings/xmlformat</namespace>     
 
+        <namespace>http://cxf.apache.org/bindings/xformat</namespace>       
     </extension>
     
 </extensions>

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
Thu Sep 14 04:53:09 2006
@@ -59,7 +59,11 @@
 
         List<MessagePartInfo> piList = null;
         if (operation != null) {
-            piList = operation.getOperationInfo().getInput().getMessageParts();
+            if (isRequestor(message)) {
+                piList = operation.getOperationInfo().getOutput().getMessageParts();
+            } else {
+                piList = operation.getOperationInfo().getInput().getMessageParts();
+            }
         }
         while (StaxUtils.toNextElement(xmlReader)) {
             QName streamParaQName = new QName(xmlReader.getNamespaceURI(), xmlReader.getLocalName());
@@ -73,7 +77,10 @@
                         paraQName = mpi.getTypeQName();
                     }
                     if (streamParaQName.equals(paraQName)) {
-                        o = dr.read(paraQName, message);
+                        Class cls = (Class)mpi.getProperty(Class.class.getName());
+                        if (!cls.getName().equals("void")) {
+                            o = dr.read(paraQName, message, cls);
+                        }
                         break;
                     }
                 }

Modified: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/bus-extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/bus-extensions.xml?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/bus-extensions.xml
(original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/bus-extensions.xml
Thu Sep 14 04:53:09 2006
@@ -24,6 +24,6 @@
         <namespace>http://schemas.xmlsoap.org/wsdl/soap/http</namespace>
         <namespace>http://schemas.xmlsoap.org/wsdl/http/</namespace>
         <namespace>http://cxf.apache.org/transports/http/configuration</namespace>
-        <namespace>http://cxf.apache.org/bindings/xmlformat</namespace>
+        <namespace>http://cxf.apache.org/bindings/xformat</namespace>
     </extension>
 </extensions>

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLBareTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLBareTest.java?view=auto&rev=443324
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLBareTest.java
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLBareTest.java
Thu Sep 14 04:53:09 2006
@@ -0,0 +1,111 @@
+/**
+ * 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.jaxws;
+
+import java.lang.reflect.UndeclaredThrowableException;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.cxf.systest.common.ClientServerSetupBase;
+import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.hello_world_xml_http.bare.Greeter;
+import org.apache.hello_world_xml_http.bare.GreeterImpl;
+import org.apache.hello_world_xml_http.bare.XMLService;
+import org.apache.hello_world_xml_http.bare.types.MyComplexStructType;
+
+public class ClientServerXMLBareTest extends TestCase {
+
+    private final QName portName = new QName("http://apache.org/hello_world_xml_http/bare",
"XMLPort");
+
+    public static class Server extends TestServerBase {
+
+        protected void run() {
+            Object implementor = new GreeterImpl();
+            String address = "http://localhost:9031/XMLService/XMLPort";
+            Endpoint.publish(address, implementor);
+        }
+
+        public static void main(String[] args) {
+            try {
+                Server s = new Server();
+                s.start();
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                System.exit(-1);
+            } finally {
+                System.out.println("done!");
+            }
+        }
+    }
+
+    public static Test suite() throws Exception {
+        TestSuite suite = new TestSuite(ClientServerXMLBareTest.class);
+        return new ClientServerSetupBase(suite) {
+            public void startServers() throws Exception {
+                assertTrue("server did not launch correctly", launchServer(Server.class));
+            }
+        };
+    }
+
+    public void testBasicConnection() throws Exception {
+
+        XMLService service = new XMLService();
+        assertNotNull(service);
+
+        String response1 = new String("Hello ");
+        String response2 = new String("Bonjour");
+        try {
+            Greeter greeter = service.getPort(portName, Greeter.class);
+            String username = System.getProperty("user.name");
+            String reply = greeter.greetMe(username);
+
+            assertNotNull("no response received from service", reply);
+            assertEquals(response1 + username, reply);
+
+            reply = greeter.sayHi();
+            assertNotNull("no response received from service", reply);
+            assertEquals(response2, reply);
+            
+            MyComplexStructType argument = new MyComplexStructType();
+            MyComplexStructType retVal = null;
+
+            String str1 = "this is element 1";
+            String str2 = "this is element 2";
+            int int1 = 42;
+            argument.setElem1(str1);
+            argument.setElem2(str2);
+            argument.setElem3(int1);            
+            retVal = greeter.sendReceiveData(argument);
+            
+            assertEquals(str1, retVal.getElem1());
+            assertEquals(str2, retVal.getElem2());
+            assertEquals(int1, retVal.getElem3());
+            
+        } catch (UndeclaredThrowableException ex) {
+            throw (Exception) ex.getCause();
+        }
+    }
+
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLBareTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLWrapTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLWrapTest.java?view=auto&rev=443324
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLWrapTest.java
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLWrapTest.java
Thu Sep 14 04:53:09 2006
@@ -0,0 +1,98 @@
+/**
+ * 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.jaxws;
+
+import java.lang.reflect.UndeclaredThrowableException;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.cxf.systest.common.ClientServerSetupBase;
+import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.hello_world_xml_http.wrapped.Greeter;
+import org.apache.hello_world_xml_http.wrapped.GreeterImpl;
+import org.apache.hello_world_xml_http.wrapped.XMLService;
+
+
+public class ClientServerXMLWrapTest extends TestCase {
+    
+    private final QName portName = new QName("http://apache.org/hello_world_xml_http/wrapped",
"XMLPort");
+
+    public static class Server extends TestServerBase {
+
+        protected void run() {
+            Object implementor = new GreeterImpl();
+            String address = "http://localhost:9032/XMLService/XMLPort";
+            Endpoint.publish(address, implementor);
+        }
+
+        public static void main(String[] args) {
+            try {
+                Server s = new Server();
+                s.start();
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                System.exit(-1);
+            } finally {
+                System.out.println("done!");
+            }
+        }
+    }
+
+    public static Test suite() throws Exception {
+        TestSuite suite = new TestSuite(ClientServerXMLWrapTest.class);
+        return new ClientServerSetupBase(suite) {
+            public void startServers() throws Exception {
+                assertTrue("server did not launch correctly", launchServer(Server.class));
+            }
+        };
+    }
+
+    public void testBasicConnection() throws Exception {
+
+        XMLService service = new XMLService();
+        assertNotNull(service);
+
+        String response1 = new String("Hello ");
+        String response2 = new String("Bonjour");
+        try {
+            Greeter greeter = service.getPort(portName, Greeter.class);
+            String username = System.getProperty("user.name");
+            String reply = greeter.greetMe(username);
+
+            assertNotNull("no response received from service", reply);
+            assertEquals(response1 + username, reply);
+
+            reply = greeter.sayHi();
+            assertNotNull("no response received from service", reply);
+            assertEquals(response2, reply);
+            
+            greeter.greetMeOneWay(System.getProperty("user.name"));
+            
+        } catch (UndeclaredThrowableException ex) {
+            throw (Exception) ex.getCause();
+        }
+    }
+    
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerXMLWrapTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadXMLBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadXMLBindingProvider.java?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadXMLBindingProvider.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadXMLBindingProvider.java
Thu Sep 14 04:53:09 2006
@@ -38,7 +38,7 @@
         targetNamespace = "http://apache.org/hello_world_rpclit",
         wsdlLocation = "/wsdl/hello_world_rpc_lit.wsdl")
 @ServiceMode(value = Service.Mode.PAYLOAD)
-@javax.xml.ws.BindingType(value = "http://cxf.apache.org/bindings/xmlformat")
+@javax.xml.ws.BindingType(value = "http://cxf.apache.org/bindings/xformat")
 public class HWDOMSourcePayloadXMLBindingProvider implements
         Provider<DOMSource> {
 

Added: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/bare/GreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/bare/GreeterImpl.java?view=auto&rev=443324
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/bare/GreeterImpl.java
(added)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/bare/GreeterImpl.java
Thu Sep 14 04:53:09 2006
@@ -0,0 +1,54 @@
+/**
+ * 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.hello_world_xml_http.bare;
+
+import org.apache.hello_world_xml_http.bare.types.MyComplexStructType;
+
+@javax.jws.WebService(serviceName = "XMLService", 
+                portName = "XMLPort",
+                endpointInterface = "org.apache.hello_world_xml_http.bare.Greeter",
+                targetNamespace = "http://apache.org/hello_world_xml_http/bare")
+
+@javax.xml.ws.BindingType(value = "http://cxf.apache.org/bindings/xformat")
+
+public class GreeterImpl implements Greeter {
+
+    public String greetMe(String me) {
+        // TODO Auto-generated method stub
+        return "Hello " + me;        
+    }
+
+    public String sayHi() {
+        // TODO Auto-generated method stub
+        return "Bonjour";
+    }
+
+    public MyComplexStructType sendReceiveData(MyComplexStructType in) {
+        // TODO Auto-generated method stub        
+        return in;
+    }
+
+    public String testMultiParamPart(MyComplexStructType in2, String in1) {
+        // TODO Auto-generated method stub
+        in2.setElem1(in1);
+        return "Bonjour";
+    }
+
+}

Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/bare/GreeterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/wrapped/GreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/wrapped/GreeterImpl.java?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/wrapped/GreeterImpl.java
(original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/wrapped/GreeterImpl.java
Thu Sep 14 04:53:09 2006
@@ -26,7 +26,7 @@
                       endpointInterface = "org.apache.hello_world_xml_http.wrapped.Greeter",
                       targetNamespace = "http://apache.org/hello_world_xml_http/wrapped")
 
-@javax.xml.ws.BindingType(value = "http://cxf.apache.org/bindings/xmlformat")
+@javax.xml.ws.BindingType(value = "http://cxf.apache.org/bindings/xformat")
 
 public class GreeterImpl implements Greeter {
 

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl Thu Sep
14 04:53:09 2006
@@ -22,7 +22,7 @@
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
-xmlns:xformat="http://cxf.apache.org/bindings/xmlformat"
+xmlns:xformat="http://cxf.apache.org/bindings/xformat"
 xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
 xmlns:jms="http://cxf.apache.org/transports/jms"
 xmlns:tns="http://apache.org/hello_world_doc_lit"

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_bare.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_bare.wsdl?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_bare.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_bare.wsdl Thu Sep
14 04:53:09 2006
@@ -127,7 +127,7 @@
     
     <wsdl:service name="XMLService">
 	<wsdl:port binding="tns:Greeter_XMLBinding" name="XMLPort">
-	    <http:address location="http://localhost:9090/XMLService/XMLPort"/>
+	    <http:address location="http://localhost:9031/XMLService/XMLPort"/>
 	</wsdl:port>
     </wsdl:service>
 </wsdl:definitions>

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_wrapped.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_wrapped.wsdl?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_wrapped.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_wrapped.wsdl Thu
Sep 14 04:53:09 2006
@@ -24,7 +24,7 @@
 	xmlns:tns="http://apache.org/hello_world_xml_http/wrapped"
 	xmlns:x1="http://apache.org/hello_world_xml_http/wrapped/types"
 	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-	xmlns:xformat="http://cxf.apache.org/bindings/xmlformat"
+	xmlns:xformat="http://cxf.apache.org/bindings/xformat"
 	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 	<wsdl:types>
 		<schema
@@ -161,7 +161,7 @@
 	<wsdl:service name="XMLService">
 		<wsdl:port binding="tns:Greeter_XMLBinding" name="XMLPort">
 			<http:address
-				location="http://localhost:9000/XMLService/XMLPort" />
+				location="http://localhost:9032/XMLService/XMLPort" />
 		</wsdl:port>
 		
 		<wsdl:port binding="tns:Greeter_XMLBinding" name="XMLDispatchPort">

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/type_test/type_test_xml_wsdl.xsl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/type_test/type_test_xml_wsdl.xsl?view=diff&rev=443324&r1=443323&r2=443324
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/type_test/type_test_xml_wsdl.xsl
(original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/type_test/type_test_xml_wsdl.xsl
Thu Sep 14 04:53:09 2006
@@ -4,7 +4,7 @@
     xmlns:xalan="http://xml.apache.org/xslt"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-    xmlns:xformat="http://cxf.apache.org/bindings/xmlformat"
+    xmlns:xformat="http://cxf.apache.org/bindings/xformat"
     xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
     xmlns:x1="http://apache.org/type_test/types1"
     xmlns:x2="http://apache.org/type_test/types2"



Mime
View raw message