[jbossws-commits] JBossWS SVN: r12736 - in thirdparty/cxf/tags/cxf-2.2.6-patch-01: systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault and 2 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Aug 4 15:47:09 EDT 2010


Author: fnasser at redhat.com
Date: 2010-08-04 15:47:08 -0400 (Wed, 04 Aug 2010)
New Revision: 12736

Added:
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/LoggingHandler.java
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultImpl.java
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultRequestTestCase.java
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/Server.java
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/handlers.xml
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/resources/wsdl_systest/soap_fault.wsdl
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/DefaultServiceBuilderFactory.java
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/SpringServiceBuilderFactory.java
Removed:
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/LoggingHandler.java
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultImpl.java
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultRequestTestCase.java
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/Server.java
   thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/handlers.xml
Log:
Re-sync tag with branch, several files were missing from commits in there

Copied: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault (from rev 12735, thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault)

Deleted: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/LoggingHandler.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/LoggingHandler.java	2010-08-04 19:21:42 UTC (rev 12735)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/LoggingHandler.java	2010-08-04 19:47:08 UTC (rev 12736)
@@ -1,101 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.soapfault;
-
-import java.io.PrintStream;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.soap.SOAPHandler;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-
-/*
- * This simple SOAPHandler will output the contents of incoming
- * and outgoing messages.
- */
-public class LoggingHandler implements SOAPHandler<SOAPMessageContext> {
-
-    private PrintStream out;
-
-    public LoggingHandler() {
-        setLogStream(System.out);
-    }
-
-    protected final void setLogStream(PrintStream ps) {
-        out = ps;
-    }
-
-    public void init(Map c) {
-    }
-
-    public Set<QName> getHeaders() {
-        return null;
-    }
-
-    public boolean handleMessage(SOAPMessageContext smc) {
-        //System.out.println("LoggingHandler : handleMessage Called....");
-        logToSystemOut(smc);
-        return true;
-    }
-
-    public boolean handleFault(SOAPMessageContext smc) {
-        //System.out.println("LoggingHandler : handleFault Called....");
-        logToSystemOut(smc);
-        return true;
-    }
-
-    // nothing to clean up
-    public void close(MessageContext messageContext) {
-        //System.out.println("LoggingHandler : close() Called....");
-    }
-
-    // nothing to clean up
-    public void destroy() {
-        //System.out.println("LoggingHandler : destroy() Called....");
-    }
-
-    /*
-     * Check the MESSAGE_OUTBOUND_PROPERTY in the context
-     * to see if this is an outgoing or incoming message.
-     * Write a brief message to the print stream and
-     * output the message. The writeTo() method can throw
-     * SOAPException or IOException
-     */
-    protected void logToSystemOut(SOAPMessageContext smc) {
-        Boolean outboundProperty = (Boolean)smc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
-
-        if (outboundProperty.booleanValue()) {
-            //out.println("\nOutbound message:");
-        } else {
-            //out.println("\nInbound message:");
-        }
-
-        SOAPMessage message = smc.getMessage();
-        try {
-            message.writeTo(out);
-            //out.println();
-        } catch (Exception e) {
-            //out.println("Exception in handler: " + e);
-            e.printStackTrace();
-        }
-    }
-}

Copied: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/LoggingHandler.java (from rev 12735, thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/LoggingHandler.java)
===================================================================
--- thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/LoggingHandler.java	                        (rev 0)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/LoggingHandler.java	2010-08-04 19:47:08 UTC (rev 12736)
@@ -0,0 +1,101 @@
+/**
+ * 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.soapfault;
+
+import java.io.PrintStream;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+/*
+ * This simple SOAPHandler will output the contents of incoming
+ * and outgoing messages.
+ */
+public class LoggingHandler implements SOAPHandler<SOAPMessageContext> {
+
+    private PrintStream out;
+
+    public LoggingHandler() {
+        setLogStream(System.out);
+    }
+
+    protected final void setLogStream(PrintStream ps) {
+        out = ps;
+    }
+
+    public void init(Map c) {
+    }
+
+    public Set<QName> getHeaders() {
+        return null;
+    }
+
+    public boolean handleMessage(SOAPMessageContext smc) {
+        //System.out.println("LoggingHandler : handleMessage Called....");
+        logToSystemOut(smc);
+        return true;
+    }
+
+    public boolean handleFault(SOAPMessageContext smc) {
+        //System.out.println("LoggingHandler : handleFault Called....");
+        logToSystemOut(smc);
+        return true;
+    }
+
+    // nothing to clean up
+    public void close(MessageContext messageContext) {
+        //System.out.println("LoggingHandler : close() Called....");
+    }
+
+    // nothing to clean up
+    public void destroy() {
+        //System.out.println("LoggingHandler : destroy() Called....");
+    }
+
+    /*
+     * Check the MESSAGE_OUTBOUND_PROPERTY in the context
+     * to see if this is an outgoing or incoming message.
+     * Write a brief message to the print stream and
+     * output the message. The writeTo() method can throw
+     * SOAPException or IOException
+     */
+    protected void logToSystemOut(SOAPMessageContext smc) {
+        Boolean outboundProperty = (Boolean)smc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+        if (outboundProperty.booleanValue()) {
+            //out.println("\nOutbound message:");
+        } else {
+            //out.println("\nInbound message:");
+        }
+
+        SOAPMessage message = smc.getMessage();
+        try {
+            message.writeTo(out);
+            //out.println();
+        } catch (Exception e) {
+            //out.println("Exception in handler: " + e);
+            e.printStackTrace();
+        }
+    }
+}

Deleted: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultImpl.java	2010-08-04 19:21:42 UTC (rev 12735)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultImpl.java	2010-08-04 19:47:08 UTC (rev 12736)
@@ -1,38 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.systest.soapfault;
-
-import javax.jws.HandlerChain;
-import javax.jws.WebService;
-
-import org.apache.cxf.soapfault.SoapFaultPortType;
-import org.xmlsoap.schemas.soap.envelope.Fault;
-
- at WebService(endpointInterface = "org.apache.cxf.soapfault.SoapFaultPortType", 
-            serviceName = "SoapFaultService")
- at HandlerChain(file = "./handlers.xml", name = "TestHandlerChain")
-public class SOAPFaultImpl implements SoapFaultPortType {
-    public void soapFault(Fault fault) {
-        System.out.println("Received soap fault message");
-        System.out.println("FaultString: " + fault.getFaultstring());
-        System.out.println("FaulCode: " + fault.getFaultcode());
-    }
-
-}

Copied: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultImpl.java (from rev 12735, thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultImpl.java)
===================================================================
--- thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultImpl.java	                        (rev 0)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultImpl.java	2010-08-04 19:47:08 UTC (rev 12736)
@@ -0,0 +1,38 @@
+/**
+ * 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.soapfault;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebService;
+
+import org.apache.cxf.soapfault.SoapFaultPortType;
+import org.xmlsoap.schemas.soap.envelope.Fault;
+
+ at WebService(endpointInterface = "org.apache.cxf.soapfault.SoapFaultPortType", 
+            serviceName = "SoapFaultService")
+ at HandlerChain(file = "./handlers.xml", name = "TestHandlerChain")
+public class SOAPFaultImpl implements SoapFaultPortType {
+    public void soapFault(Fault fault) {
+        System.out.println("Received soap fault message");
+        System.out.println("FaultString: " + fault.getFaultstring());
+        System.out.println("FaulCode: " + fault.getFaultcode());
+    }
+
+}

Deleted: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultRequestTestCase.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultRequestTestCase.java	2010-08-04 19:21:42 UTC (rev 12735)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultRequestTestCase.java	2010-08-04 19:47:08 UTC (rev 12736)
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.soapfault;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.soapfault.SoapFaultPortType;
-import org.apache.cxf.soapfault.SoapFaultService;
-import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import org.xmlsoap.schemas.soap.envelope.Fault;
-
-public class SOAPFaultRequestTestCase extends AbstractClientServerTestBase {
-    private final QName portName = new QName("http://cxf.apache.org/soapfault", "SoapFaultPortType");
-
-    @BeforeClass
-    public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", launchServer(Server.class));
-    }
-
-    @Test
-    public void testSendSoapFaultRequest() throws Exception {
-
-        SoapFaultService service = new SoapFaultService();
-        assertNotNull(service);
-
-        SoapFaultPortType soapFaultPort = service.getPort(portName, SoapFaultPortType.class);
-
-        Fault fault = new Fault();
-        fault.setFaultstring("ClientSetFaultString");
-        fault.setFaultcode(new QName("http://cxf.apache.org/soapfault", "ClientSetError"));
-        soapFaultPort.soapFault(fault);
-
-    }
-
-}

Copied: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultRequestTestCase.java (from rev 12735, thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultRequestTestCase.java)
===================================================================
--- thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultRequestTestCase.java	                        (rev 0)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultRequestTestCase.java	2010-08-04 19:47:08 UTC (rev 12736)
@@ -0,0 +1,55 @@
+/**
+ * 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.soapfault;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.soapfault.SoapFaultPortType;
+import org.apache.cxf.soapfault.SoapFaultService;
+import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.xmlsoap.schemas.soap.envelope.Fault;
+
+public class SOAPFaultRequestTestCase extends AbstractClientServerTestBase {
+    private final QName portName = new QName("http://cxf.apache.org/soapfault", "SoapFaultPortType");
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        assertTrue("server did not launch correctly", launchServer(Server.class));
+    }
+
+    @Test
+    public void testSendSoapFaultRequest() throws Exception {
+
+        SoapFaultService service = new SoapFaultService();
+        assertNotNull(service);
+
+        SoapFaultPortType soapFaultPort = service.getPort(portName, SoapFaultPortType.class);
+
+        Fault fault = new Fault();
+        fault.setFaultstring("ClientSetFaultString");
+        fault.setFaultcode(new QName("http://cxf.apache.org/soapfault", "ClientSetError"));
+        soapFaultPort.soapFault(fault);
+
+    }
+
+}

Deleted: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/Server.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/Server.java	2010-08-04 19:21:42 UTC (rev 12735)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/Server.java	2010-08-04 19:47:08 UTC (rev 12736)
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.soapfault;
-
-import javax.xml.ws.Endpoint;
-
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-
-public class Server extends AbstractBusTestServerBase {    
-    protected void run() {
-        String address = "http://localhost:9199/SoapFault";
-
-        Object implementor1 = new SOAPFaultImpl();
-        Endpoint.publish(address, implementor1);
-    }
-
-    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!");
-        }
-    }
-}
-

Copied: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/Server.java (from rev 12735, thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/Server.java)
===================================================================
--- thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/Server.java	                        (rev 0)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/Server.java	2010-08-04 19:47:08 UTC (rev 12736)
@@ -0,0 +1,46 @@
+/**
+ * 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.soapfault;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+
+public class Server extends AbstractBusTestServerBase {    
+    protected void run() {
+        String address = "http://localhost:9199/SoapFault";
+
+        Object implementor1 = new SOAPFaultImpl();
+        Endpoint.publish(address, implementor1);
+    }
+
+    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!");
+        }
+    }
+}
+

Deleted: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/handlers.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/handlers.xml	2010-08-04 19:21:42 UTC (rev 12735)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/handlers.xml	2010-08-04 19:47:08 UTC (rev 12736)
@@ -1,35 +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.
--->
-<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" 
-xmlns:cfg="http://cxf.apache.org/configuration/cfg" 
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
-    <handler-chain>
-        <handler>
-		<handler-name>ph1</handler-name>
-		<handler-class>org.apache.cxf.systest.soapfault.LoggingHandler</handler-class>
-		<init-param>
-			<param-name>token</param-name>
-			<param-value>String</param-value>
-		</init-param>
-	</handler>
-    </handler-chain>
-</handler-chains>

Copied: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/handlers.xml (from rev 12735, thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/handlers.xml)
===================================================================
--- thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/handlers.xml	                        (rev 0)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/handlers.xml	2010-08-04 19:47:08 UTC (rev 12736)
@@ -0,0 +1,35 @@
+<?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.
+-->
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" 
+xmlns:cfg="http://cxf.apache.org/configuration/cfg" 
+xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+    <handler-chain>
+        <handler>
+		<handler-name>ph1</handler-name>
+		<handler-class>org.apache.cxf.systest.soapfault.LoggingHandler</handler-class>
+		<init-param>
+			<param-name>token</param-name>
+			<param-value>String</param-value>
+		</init-param>
+	</handler>
+    </handler-chain>
+</handler-chains>

Copied: thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/resources/wsdl_systest/soap_fault.wsdl (from rev 12735, thirdparty/cxf/branches/cxf-2.2.6/systests/uncategorized/src/test/resources/wsdl_systest/soap_fault.wsdl)
===================================================================
--- thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/resources/wsdl_systest/soap_fault.wsdl	                        (rev 0)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/systests/uncategorized/src/test/resources/wsdl_systest/soap_fault.wsdl	2010-08-04 19:47:08 UTC (rev 12736)
@@ -0,0 +1,63 @@
+<?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.
+-->
+<definitions
+        xmlns:s="http://www.w3.org/2001/XMLSchema"
+        xmlns:tns="http://cxf.apache.org/soapfault"
+        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+        xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
+        targetNamespace="http://cxf.apache.org/soapfault"
+    xmlns="http://schemas.xmlsoap.org/wsdl/">
+    <types>
+        <s:schema>
+            <s:import namespace="http://schemas.xmlsoap.org/soap/envelope/"
+                      schemaLocation="http://schemas.xmlsoap.org/soap/envelope/"/>
+        </s:schema>
+    </types>
+    <message name="SoapFault">
+         <part name="fault" element="soapenv:Fault" />
+    </message>
+
+ 
+
+    <portType name="SoapFaultPortType">
+        <operation name="SoapFault">
+            <input name="SoapFault" message="tns:SoapFault" />
+        </operation>
+    </portType>
+
+ 
+
+    <binding name="SoapFault_SOAPBinding" type="tns:SoapFaultPortType">
+      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+      <operation name="SoapFault">
+        <input message="tns:Soapfault">
+          <soap:body use="literal"/>
+        </input>
+      </operation>
+    </binding>
+
+    <service name="SoapFaultService">
+      <port binding="tns:SoapFault_SOAPBinding" name="SoapFaultPortType">
+    <wsaw:UsingAddressing required="true"/>
+    <soap:address location="http://localhost:9199/SoapFault"/>
+      </port>
+    </service> 
+</definitions>

Copied: thirdparty/cxf/tags/cxf-2.2.6-patch-01/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/DefaultServiceBuilderFactory.java (from rev 12735, thirdparty/cxf/branches/cxf-2.2.6/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/DefaultServiceBuilderFactory.java)
===================================================================
--- thirdparty/cxf/tags/cxf-2.2.6-patch-01/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/DefaultServiceBuilderFactory.java	                        (rev 0)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/DefaultServiceBuilderFactory.java	2010-08-04 19:47:08 UTC (rev 12736)
@@ -0,0 +1,63 @@
+/**
+ * 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.tools.java2wsdl.processor.internal;
+
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.frontend.AbstractServiceFactory;
+import org.apache.cxf.jaxb.JAXBDataBinding;
+import org.apache.cxf.jaxws.JaxwsServiceBuilder;
+import org.apache.cxf.service.ServiceBuilder;
+import org.apache.cxf.simple.SimpleServiceBuilder;
+import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.tools.common.ToolException;
+import org.apache.cxf.tools.java2wsdl.processor.FrontendFactory;
+import org.apache.cxf.tools.java2wsdl.processor.FrontendFactory.Style;
+
+/**
+ * This class constructs ServiceBuilder objects. These objects are used to access the services and the data
+ * bindings to generate the wsdl.
+ */
+public final class DefaultServiceBuilderFactory extends ServiceBuilderFactory {
+
+    @Override
+    public ServiceBuilder newBuilder(FrontendFactory.Style s) {
+        DataBinding dataBinding;
+        final String dbn = getDatabindingName();
+        if (ToolConstants.JAXB_DATABINDING.equals(dbn)) {
+            dataBinding = new JAXBDataBinding();
+        } else if (ToolConstants.AEGIS_DATABINDING.equals(dbn)) {
+            dataBinding = new AegisDatabinding();
+        } else {
+            throw new ToolException("Unsupported databinding: " + s);
+        }
+        AbstractServiceFactory builder = null;
+        if (Style.Jaxws.equals(s)) {
+            builder = new JaxwsServiceBuilder();
+        } else if (Style.Simple.equals(s)) {
+            builder = new SimpleServiceBuilder();
+        } else {
+            throw new ToolException("Unsupported frontend style: " + s);
+        }
+        builder.setDataBinding(dataBinding);
+        builder.setServiceClass(serviceClass);
+        return builder;
+    }
+}

Copied: thirdparty/cxf/tags/cxf-2.2.6-patch-01/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/SpringServiceBuilderFactory.java (from rev 12735, thirdparty/cxf/branches/cxf-2.2.6/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/SpringServiceBuilderFactory.java)
===================================================================
--- thirdparty/cxf/tags/cxf-2.2.6-patch-01/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/SpringServiceBuilderFactory.java	                        (rev 0)
+++ thirdparty/cxf/tags/cxf-2.2.6-patch-01/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/SpringServiceBuilderFactory.java	2010-08-04 19:47:08 UTC (rev 12736)
@@ -0,0 +1,136 @@
+/**
+ * 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.tools.java2wsdl.processor.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.BusApplicationContext;
+import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.frontend.AbstractServiceFactory;
+import org.apache.cxf.service.ServiceBuilder;
+import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.tools.common.ToolException;
+import org.apache.cxf.tools.java2wsdl.processor.FrontendFactory;
+import org.apache.cxf.tools.util.NameUtil;
+
+import org.springframework.beans.factory.BeanDefinitionStoreException;
+import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.GenericApplicationContext;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.FileSystemResource;
+
+/**
+ * This class constructs ServiceBuilder objects using Spring. These objects are used to access the services
+ * and the data bindings to generate the wsdl.
+ */
+public final class SpringServiceBuilderFactory extends ServiceBuilderFactory {
+
+    private List<String> beanDefinitions;
+
+    public SpringServiceBuilderFactory(List<String> beanDefinitions) {
+        super();
+        this.beanDefinitions = beanDefinitions;
+    }
+
+    public SpringServiceBuilderFactory() {
+        super();
+        this.beanDefinitions = new ArrayList<String>(0);
+    }
+
+    /**
+     * Convert a parameter value to the name of a bean we'd use for a data binding.
+     * 
+     * @param databindingName
+     * @return
+     */
+    public static String databindingNameToBeanName(String dbName) {
+        return NameUtil.capitalize(dbName.toLowerCase()) + ToolConstants.DATABIND_BEAN_NAME_SUFFIX;
+    }
+
+    @Override
+    public ServiceBuilder newBuilder(FrontendFactory.Style s) {
+        ApplicationContext applicationContext = getApplicationContext(beanDefinitions);
+        DataBinding dataBinding;
+        String databindingBeanName = databindingNameToBeanName(databindingName);
+        try {
+            dataBinding = (DataBinding)applicationContext.getBean(databindingBeanName);
+        } catch (RuntimeException e) {
+            throw new ToolException("Cannot get databinding bean " + databindingBeanName
+                                    + " for databinding " + databindingName);
+        }
+
+        String beanName = getBuilderBeanName(s);
+        ServiceBuilder builder = null;
+
+        try {
+            builder = (ServiceBuilder)applicationContext.getBean(beanName, ServiceBuilder.class);
+            AbstractServiceFactory serviceFactory = (AbstractServiceFactory)builder;
+            serviceFactory.setDataBinding(dataBinding);
+        } catch (RuntimeException e) {
+            throw new ToolException("Can not get ServiceBuilder bean " + beanName
+                                    + "to initialize the ServiceBuilder for style: " + s + " Reason: \n"
+                                    + e.getMessage(), e);
+        }
+        builder.setServiceClass(serviceClass);
+        return builder;
+    }
+
+    /**
+     * Return the name of a prototype bean from Spring that can provide the service. The use of a bean allows
+     * for the possibility of an override.
+     * 
+     * @param s Style of service
+     * @return name of bean.
+     */
+    protected String getBuilderBeanName(FrontendFactory.Style s) {
+        return s + "ServiceBuilderBean";
+    }
+
+    /**
+     * This is factored out to permit use in a unit test.
+     * 
+     * @param bus
+     * @return
+     */
+    public static ApplicationContext getApplicationContext(List<String> additionalFilePathnames) {
+        BusApplicationContext busApplicationContext = BusFactory.getDefaultBus()
+            .getExtension(BusApplicationContext.class);
+        GenericApplicationContext appContext = new GenericApplicationContext(busApplicationContext);
+        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(appContext);
+        reader.loadBeanDefinitions(new ClassPathResource("META-INF/cxf/java2wsbeans.xml"));
+        for (String pathname : additionalFilePathnames) {
+            try {
+                reader.loadBeanDefinitions(new FileSystemResource(pathname));
+            } catch (BeanDefinitionStoreException bdse) {
+                throw new ToolException("Unable to open bean definition file " + pathname, bdse.getCause());
+            }
+        }
+
+        return appContext;
+    }
+
+    public void setBeanDefinitions(List<String> beanDefinitions) {
+        this.beanDefinitions = beanDefinitions;
+    }
+
+}



More information about the jbossws-commits mailing list