cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1245568 - in /cxf/branches/2.5.x-fixes: rt/core/src/main/java/org/apache/cxf/endpoint/ rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/
Date Fri, 17 Feb 2012 14:31:03 GMT
Author: dkulp
Date: Fri Feb 17 14:31:02 2012
New Revision: 1245568

URL: http://svn.apache.org/viewvc?rev=1245568&view=rev
Log:
Merged revisions 1245305 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1245305 | dkulp | 2012-02-16 21:58:23 -0500 (Thu, 16 Feb 2012) | 3 lines

  [CXF-4106] Re-use the binding, but not the endpoint, if the transports
  don't match.  Allows the mime stuff to be retained.

........

Added:
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
  (with props)
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/Server.java
  (with props)
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAService.java
  (with props)
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAServiceImpl.java
  (with props)
Modified:
    cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
    cxf/branches/2.5.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractWSDLBasedEndpointFactory.java

Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java?rev=1245568&r1=1245567&r2=1245568&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
Fri Feb 17 14:31:02 2012
@@ -39,7 +39,6 @@ import org.apache.cxf.interceptor.Abstra
 import org.apache.cxf.interceptor.AnnotationInterceptors;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.service.model.BindingInfo;
-import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.DestinationFactory;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 
@@ -66,8 +65,6 @@ public abstract class AbstractEndpointFa
 
     protected abstract Endpoint createEndpoint() throws BusException, EndpointException;
 
-    protected abstract EndpointInfo createEndpointInfo() throws BusException;
-
     protected abstract BindingInfo createBindingInfo();
 
     public String getAddress() {

Modified: cxf/branches/2.5.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractWSDLBasedEndpointFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractWSDLBasedEndpointFactory.java?rev=1245568&r1=1245567&r2=1245568&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractWSDLBasedEndpointFactory.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractWSDLBasedEndpointFactory.java
Fri Feb 17 14:31:02 2012
@@ -124,11 +124,7 @@ public abstract class AbstractWSDLBasedE
             if (ei == null && !serviceFactory.isPopulateFromClass()) {
                 ei = ServiceModelUtil.findBestEndpointInfo(serviceFactory.getInterfaceName(),
service
                                                            .getServiceInfos());
-                if (ei != null
-                    && transportId != null
-                    && !ei.getTransportId().equals(transportId)) {
-                    ei = null;
-                }
+
                 if (ei != null) {
                     BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class);
                     bindingFactory = bfm.getBindingFactory(ei.getBinding().getBindingId());
@@ -137,14 +133,20 @@ public abstract class AbstractWSDLBasedE
                 if (ei == null) {
                     LOG.warning("Could not find endpoint/port for " 
                                 + endpointName + " in wsdl. Creating default.");
-                } else {
+                } else if (!ei.getName().equals(endpointName)) {
                     LOG.warning("Could not find endpoint/port for " 
                                 + endpointName + " in wsdl. Using " 
                                 + ei.getName() + ".");                        
                 }
             }
             if (ei == null) {
-                ei = createEndpointInfo();
+                ei = createEndpointInfo(null);
+            } else if (transportId != null
+                    && !ei.getTransportId().equals(transportId)) {
+                LOG.warning("Transport for endpoint/port " 
+                    + endpointName + " in wsdl doesn't match " + transportId + ".");
+                BindingInfo bi = ei.getBinding();
+                ei = createEndpointInfo(bi);
             } else if (getAddress() != null) {
                 ei.setAddress(getAddress());
                 if (ei.getAddress().startsWith("camel")
@@ -242,26 +244,26 @@ public abstract class AbstractWSDLBasedE
     protected abstract String detectTransportIdFromAddress(String ad);
     protected abstract WSDLEndpointFactory getWSDLEndpointFactory();
     
-    protected EndpointInfo createEndpointInfo() throws BusException {
-        // Get the Service from the ServiceFactory if specified
-        Service service = serviceFactory.getService();
+    protected EndpointInfo createEndpointInfo(BindingInfo bindingInfo) throws BusException
{
         // setup the transport ID for the soap over jms if there is only address information
         if (transportId == null && getAddress() != null 
             && getAddress().startsWith("jms:") && !"jms://".equals(getAddress()))
{
             // Set the transportId to be soap over jms transport
             transportId = SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID;
         }
-        
-        // SOAP nonsense
-        BindingInfo bindingInfo = createBindingInfo();
-        if (bindingInfo instanceof SoapBindingInfo
-            && (((SoapBindingInfo) bindingInfo).getTransportURI() == null
-            || LocalTransportFactory.TRANSPORT_ID.equals(transportId))) {
-            ((SoapBindingInfo) bindingInfo).setTransportURI(transportId);
-            transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
+        // Get the Service from the ServiceFactory if specified
+        Service service = serviceFactory.getService();
+        if (bindingInfo == null) {
+            // SOAP nonsense
+            bindingInfo = createBindingInfo();
+            if (bindingInfo instanceof SoapBindingInfo
+                && (((SoapBindingInfo) bindingInfo).getTransportURI() == null
+                || LocalTransportFactory.TRANSPORT_ID.equals(transportId))) {
+                ((SoapBindingInfo) bindingInfo).setTransportURI(transportId);
+                transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
+            }
+            service.getServiceInfos().get(0).addBinding(bindingInfo);
         }
-        
-        
         if (transportId == null) {
             if (bindingInfo instanceof SoapBindingInfo) {
                 transportId = ((SoapBindingInfo)bindingInfo).getTransportURI();
@@ -275,8 +277,6 @@ public abstract class AbstractWSDLBasedE
                 transportId = "http://schemas.xmlsoap.org/wsdl/http/";
             }
         }
-        
-        service.getServiceInfos().get(0).addBinding(bindingInfo);
 
         setTransportId(transportId);
         

Added: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java?rev=1245568&view=auto
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
(added)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
Fri Feb 17 14:31:02 2012
@@ -0,0 +1,95 @@
+/**
+ * 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.jms.swa;
+
+import java.io.Closeable;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.activation.DataHandler;
+import javax.mail.util.ByteArrayDataSource;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Holder;
+
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+import org.apache.cxf.testutil.common.TestUtil;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class ClientServerSwaTest extends AbstractBusClientServerTestBase {
+    static String brokerPort = EmbeddedJMSBrokerLauncher.PORT;
+    static String serverPort = TestUtil.getPortNumber(Server.class);
+    
+    @BeforeClass
+    public static void startServers() throws Exception {
+        Map<String, String> props = new HashMap<String, String>();          
     
+        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
+            props.put("org.apache.activemq.default.directory.prefix",
+                      System.getProperty("org.apache.activemq.default.directory.prefix"));
+        }
+        props.put("java.util.logging.config.file", 
+                  System.getProperty("java.util.logging.config.file"));
+        
+        assertTrue("server did not launch correctly", 
+                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
+        
+        assertTrue("server did not launch correctly", launchServer(Server.class));
+    }
+    @Test
+    public void testSwa() throws Exception {
+        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
+        factory.setWsdlLocation("classpath:wsdl/swa-mime.wsdl");
+        factory.setTransportId("http://cxf.apache.org/transports/jms");
+        factory.setServiceName(new QName("http://cxf.apache.org/swa", "SwAService"));
+        factory.setEndpointName(new QName("http://cxf.apache.org/swa", "SwAServiceHttpPort"));
+        factory.setAddress(Server.ADDRESS);
+        factory.getOutInterceptors().add(new LoggingOutInterceptor());
+        SwAService port = factory.create(SwAService.class);
+        
+        
+        Holder<String> textHolder = new Holder<String>();
+        Holder<DataHandler> data = new Holder<DataHandler>();
+        
+        ByteArrayDataSource source = new ByteArrayDataSource("foobar".getBytes(), "application/octet-stream");
+        DataHandler handler = new DataHandler(source);
+        
+        data.value = handler;
+        
+        textHolder.value = "Hi";
+
+        port.echoData(textHolder, data);
+        InputStream bis = null;
+        bis = data.value.getDataSource().getInputStream();
+        byte b[] = new byte[10];
+        bis.read(b, 0, 10);
+        String string = IOUtils.newStringFromBytes(b);
+        assertEquals("testfoobar", string);
+        assertEquals("Hi", textHolder.value);
+        
+        if (port instanceof Closeable) {
+            ((Closeable)port).close();
+        }
+    }
+}

Propchange: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/Server.java?rev=1245568&view=auto
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/Server.java
(added)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/Server.java
Fri Feb 17 14:31:02 2012
@@ -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.systest.jms.swa;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+public class Server extends AbstractBusTestServerBase {
+    public static final String ADDRESS 
+        = "jms:jndi:dynamicQueues/test.cxf.jmstransport.swa.queue"
+        + "?jndiInitialContextFactory"
+        + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
+        + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:"
+        + EmbeddedJMSBrokerLauncher.PORT;
+    
+    protected void run() {
+        try {
+            JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
+            factory.setWsdlLocation("classpath:wsdl/swa-mime.wsdl");
+            factory.setTransportId("http://cxf.apache.org/transports/jms");
+            factory.setServiceName(new QName("http://cxf.apache.org/swa", "SwAService"));
+            factory.setEndpointName(new QName("http://cxf.apache.org/swa", "SwAServiceHttpPort"));
+            factory.setAddress(Server.ADDRESS);
+            factory.setServiceBean(new SwAServiceImpl());
+            factory.create().start();
+        } catch (Exception e) {
+            e.printStackTrace();
+            Thread.currentThread().interrupt();
+        }
+    }
+
+    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!");
+        }
+    }
+}

Propchange: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/Server.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/Server.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAService.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAService.java?rev=1245568&view=auto
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAService.java
(added)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAService.java
Fri Feb 17 14:31:02 2012
@@ -0,0 +1,44 @@
+/**
+ * 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.jms.swa;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * 
+ */
+
+@WebService(targetNamespace = "http://cxf.apache.org/swa", name = "SwAServiceInterface")
+//@javax.xml.bind.annotation.XmlSeeAlso({ org.apache.cxf.swa.types.ObjectFactory.class })
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface SwAService {
+
+    @WebMethod
+    void echoData(
+        @WebParam(partName = "text", mode = WebParam.Mode.INOUT, name = "text",
+            targetNamespace = "http://cxf.apache.org/swa/types")
+        javax.xml.ws.Holder<java.lang.String> text,
+        @WebParam(partName = "data", mode = WebParam.Mode.INOUT, name = "data", targetNamespace
= "")
+        javax.xml.ws.Holder<javax.activation.DataHandler> data
+    );
+}

Propchange: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAServiceImpl.java?rev=1245568&view=auto
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAServiceImpl.java
(added)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAServiceImpl.java
Fri Feb 17 14:31:02 2012
@@ -0,0 +1,149 @@
+/**
+ * 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.jms.swa;
+
+import java.awt.Image;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.activation.DataHandler;
+import javax.jws.WebService;
+import javax.mail.util.ByteArrayDataSource;
+import javax.xml.transform.Source;
+import javax.xml.ws.Holder;
+import javax.xml.ws.WebServiceException;
+
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.swa.SwAServiceInterface;
+import org.apache.cxf.swa.types.DataStruct;
+import org.apache.cxf.swa.types.OutputResponseAll;
+import org.apache.cxf.swa.types.VoidRequest;
+
+
+@WebService(endpointInterface = "org.apache.cxf.swa.SwAServiceInterface", 
+            serviceName = "SwAService", 
+            targetNamespace = "http://cxf.apache.org/swa", 
+            portName = "SwAServiceHttpPort")
+public class SwAServiceImpl implements SwAServiceInterface {
+
+    public void echoDataRef(Holder<DataStruct> data) {
+        try {
+            InputStream bis = null;
+            bis = data.value.getDataRef().getDataSource().getInputStream();
+            byte b[] = new byte[6];
+            bis.read(b, 0, 6);
+            String string = IOUtils.newStringFromBytes(b);
+            
+            ByteArrayDataSource source = 
+                new ByteArrayDataSource(("test" + string).getBytes(), "application/octet-stream");
+            data.value.setDataRef(new DataHandler(source));
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void echoData(Holder<String> text, Holder<DataHandler> data) {
+
+        try {
+            InputStream bis = null;
+            bis = data.value.getDataSource().getInputStream();
+            byte b[] = new byte[6];
+            bis.read(b, 0, 6);
+            String string = IOUtils.newStringFromBytes(b);
+            
+            ByteArrayDataSource source = 
+                new ByteArrayDataSource(("test" + string).getBytes(), "application/octet-stream");
+            data.value = new DataHandler(source);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+    
+    public void echoDataWithHeader(Holder<String> text, 
+                                   Holder<DataHandler> data,
+                                   Holder<String> headerText) {
+        try {
+            InputStream bis = null;
+            bis = data.value.getDataSource().getInputStream();
+            byte b[] = new byte[6];
+            bis.read(b, 0, 6);
+            String string = IOUtils.newStringFromBytes(b);
+            
+            ByteArrayDataSource source = 
+                new ByteArrayDataSource(("test" + string).getBytes(), "application/octet-stream");
+            data.value = new DataHandler(source);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public OutputResponseAll echoAllAttachmentTypes(VoidRequest request, Holder<DataHandler>
attach1,
+                                                    Holder<DataHandler> attach2, Holder<Source>
attach3,
+                                                    Holder<Image> attach4, Holder<Image>
attach5) {
+        try {
+            OutputResponseAll theResponse = new OutputResponseAll();
+            theResponse.setResult("ok");
+            theResponse.setReason("ok");
+            if (attach1 == null || attach1.value == null) {
+                System.err.println("attach1.value is null (unexpected)");
+                theResponse.setReason("attach1.value is null (unexpected)");
+                theResponse.setResult("not ok");
+            }
+            if (attach2 == null || attach2.value == null) {
+                System.err.println("attach2.value is null (unexpected)");
+                if (theResponse.getReason().equals("ok")) {
+                    theResponse.setReason("attach2.value is null (unexpected)");
+                } else {
+                    theResponse.setReason(theResponse.getReason() + "\nattach2.value is null
(unexpected)");
+                }
+                theResponse.setResult("not ok");
+            }
+            if (attach3 == null || attach3.value == null) {
+                System.err.println("attach3.value is null (unexpected)");
+                if (theResponse.getReason().equals("ok")) {
+                    theResponse.setReason("attach3.value is null (unexpected)");
+                } else {
+                    theResponse.setReason(theResponse.getReason() + "\nattach3.value is null
(unexpected)");
+                }
+                theResponse.setResult("not ok");
+            }
+            if (attach4 == null || attach4.value == null) {
+                System.err.println("attach4.value is null (unexpected)");
+                if (theResponse.getReason().equals("ok")) {
+                    theResponse.setReason("attach4.value is null (unexpected)");
+                } else {
+                    theResponse.setReason(theResponse.getReason() + "\nattach4.value is null
(unexpected)");
+                }
+                theResponse.setResult("not ok");
+            }
+            if (attach5 == null || attach5.value == null) {
+                System.err.println("attach5.value is null (unexpected)");
+                if (theResponse.getReason().equals("ok")) {
+                    theResponse.setReason("attach5.value is null (unexpected)");
+                } else {
+                    theResponse.setReason(theResponse.getReason() + "\nattach5.value is null
(unexpected)");
+                }
+                theResponse.setResult("not ok");
+            }
+            return theResponse;
+        } catch (Exception e) {
+            throw new WebServiceException(e.getMessage());
+        }
+    }
+}

Propchange: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/SwAServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message