cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r438909 - in /incubator/cxf/trunk: rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/core/src/main/java/org/apache/cxf/interceptor/ systests/src/test/java/...
Date Thu, 31 Aug 2006 13:24:09 GMT
Author: ffang
Date: Thu Aug 31 06:24:08 2006
New Revision: 438909

URL: http://svn.apache.org/viewvc?rev=438909&view=rev
Log:
get doc/lit/bare working

Added:
    incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DocLitBareGreeterImpl.java
  (with props)
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/soapheader.wsdl
      - copied unchanged from r438320, incubator/cxf/trunk/testutils/src/main/resources/wsdl/soapheader_test.wsdl
Removed:
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/soapheader_test.wsdl
Modified:
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/HeaderClientServerTest.java
    incubator/cxf/trunk/testutils/pom.xml
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl

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?rev=438909&r1=438908&r2=438909&view=diff
==============================================================================
--- 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 Aug 31 06:24:08 2006
@@ -35,6 +35,7 @@
 import javax.wsdl.extensions.soap.SOAPOperation;
 import javax.xml.namespace.QName;
 
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.AbstractBindingFactory;
 import org.apache.cxf.binding.Binding;
@@ -95,6 +96,12 @@
         SoapBinding sb = new SoapBinding();
         SoapBindingInfo sbi = (SoapBindingInfo)binding;
                 
+        for (BindingOperationInfo boi : sbi.getOperations()) {
+            if (boi.getUnwrappedOperation() == null) {
+                sbi.setStyle(SoapConstants.STYLE_BARE);
+            }
+        }
+        
         sb.getInInterceptors().add(new MultipartMessageInterceptor());        
         sb.getInInterceptors().add(new ReadHeadersInterceptor());        
         sb.getInInterceptors().add(new MustUnderstandInterceptor());
@@ -145,7 +152,7 @@
 
     private void initializeBindingOperation(SoapBindingInfo bi, BindingOperationInfo boi)
{
         SoapOperationInfo soi = new SoapOperationInfo();
-
+        
         SOAPOperation soapOp = boi.getExtensor(SOAPOperation.class);
         if (soapOp != null) {
             String action = soapOp.getSoapActionURI();
@@ -155,6 +162,8 @@
 
             soi.setAction(action);
             soi.setStyle(soapOp.getStyle());
+            
+            
         }
 
         boi.addExtensor(soi);

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java?rev=438909&r1=438908&r2=438909&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
Thu Aug 31 06:24:08 2006
@@ -19,12 +19,15 @@
 
 package org.apache.cxf.binding.soap.interceptor;
 
+
 import java.util.ResourceBundle;
 
 
+
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
+
 import org.w3c.dom.Element;
 
 import org.apache.cxf.binding.soap.Soap11;
@@ -32,7 +35,9 @@
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.SoapVersion;
 import org.apache.cxf.common.i18n.BundleUtils;
+
 import org.apache.cxf.phase.Phase;
+
 import org.apache.cxf.staxutils.StaxUtils;
 
 public class SoapOutInterceptor extends AbstractSoapInterceptor {
@@ -45,7 +50,6 @@
     
     public void handleMessage(SoapMessage message) {
         try {
-            handleHeaderPart(message);
             XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
             message.setContent(XMLStreamWriter.class, xtw);
             SoapVersion soapVersion = message.getVersion();
@@ -64,6 +68,9 @@
                                   soapVersion.getEnvelope().getLocalPart(),
                                   soapVersion.getNamespace());
             xtw.writeNamespace(soapVersion.getPrefix(), soapVersion.getNamespace());
+            
+            //handleHeaderPart(message);
+
             Element eleHeaders = message.getHeaders(Element.class);
             
 
@@ -91,8 +98,68 @@
         }
     }
     
-    private void handleHeaderPart(SoapMessage message) {
+    /*private void handleHeaderPart(SoapMessage message) {
         //add MessagePart to soapHeader if necessary
+        Exchange exchange = message.getExchange();
+        BindingOperationInfo operation = (BindingOperationInfo)exchange.get(BindingOperationInfo.class
+                                                                            .getName());
+        Element soapHeaders = message.getHeaders(Element.class);
+         
+         
+         
+        int countParts = 0;
+        List<MessagePartInfo> parts = null;
+        if (!isRequestor(message)) {
+            parts = operation.getOutput().getMessageInfo().getMessageParts();
+        } else {
+            parts = operation.getInput().getMessageInfo().getMessageParts();
+        }
+        countParts = parts.size();
+ 
+        if (countParts > 0) {
+            List<?> objs = message.getContent(List.class);
+            Object[] args = objs.toArray();
+            Object[] els = parts.toArray();
+ 
+            if (args.length != els.length) {
+                message.setContent(Exception.class,
+                                   new RuntimeException("The number of arguments is not equal!"));
+            }
+ 
+            for (int idx = 0; idx < countParts; idx++) {
+                //Object arg = args[idx];
+                MessagePartInfo part = (MessagePartInfo)els[idx];
+                if (!part.isInSoapHeader()) {
+                    //this part should be in header, so write to header
+                    continue;
+                }
+                 
+                // todo write to header
+                if (soapHeaders == null) {
+                    DocumentBuilder builder = null;
+                    try {
+                        builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+                    } catch (ParserConfigurationException e) {
+                        e.printStackTrace();
+                    }
+                    Document doc = builder.newDocument();
+                    SoapVersion version = message.getVersion();
+                    soapHeaders =
+                        doc.createElementNS(version.getNamespace(), version.getHeader().getLocalPart());
+                    QName headerPartQName = ServiceModelUtil.getPartName(part);
+                    soapHeaders.appendChild(
+                        doc.createElementNS(
+                            headerPartQName.getNamespaceURI(), headerPartQName.getLocalPart()));
+                }
+                 
+            }
+        }
+        message.setHeaders(Element.class, soapHeaders);
+
     }       
     
+    protected boolean isRequestor(Message message) {
+        return Boolean.TRUE.equals(message.containsKey(Message.REQUESTOR_ROLE));
+    }*/
+
 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java?rev=438909&r1=438908&r2=438909&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
Thu Aug 31 06:24:08 2006
@@ -20,9 +20,11 @@
 package org.apache.cxf.interceptor;
 
 import java.util.Collection;
+import java.util.Iterator;
 import java.util.List;
 import java.util.ResourceBundle;
 
+import javax.xml.bind.JAXBElement;
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.cxf.common.i18n.BundleUtils;
@@ -31,6 +33,7 @@
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceModelUtil;
 import org.apache.cxf.staxutils.DepthXMLStreamReader;
@@ -70,71 +73,76 @@
         // first check for exact matches
         for (OperationInfo o : operations) {
             List messageParts = o.getInput().getMessageParts();
-            if (messageParts.size() == parameters.size()) {
+            if (messageParts.size() == parameters.size() 
+                    && checkExactParameters(messageParts, parameters)) {
                 return o;
-//                if (checkExactParameters(messageParts, parameters))
-//                    return o;
+                
             }
         }
 
 //        // now check for assignable matches
-//        for (OperationInfo o : operations) {
-//            List messageParts = o.getInput().getMessageParts();
-//            if (messageParts.size() == parameters.size()) {
-//                if (checkParameters(messageParts, parameters))
-//                    return o;
-//            }
-//        }
+        /*for (OperationInfo o : operations) {
+            List messageParts = o.getInput().getMessageParts();
+            if (messageParts.size() == parameters.size()) {
+                if (checkParameters(messageParts, parameters)) {
+                    return o;
+                }
+            }
+        }*/
         return null;
     }
-//
-//    /**
-//     * Return true only if the message parts exactly match the classes of the
-//     * parameters
-//     * 
-//     * @param messageParts
-//     * @param parameters
-//     * @return
-//     */
-//    private boolean checkExactParameters(List messageParts, List parameters) {
-//        Iterator messagePartIterator = messageParts.iterator();
-//        for (Iterator parameterIterator = parameters.iterator(); parameterIterator.hasNext();)
{
-//            Object param = parameterIterator.next();
-//            MessagePartInfo mpi = (MessagePartInfo)messagePartIterator.next();
-//            if (!mpi.getTypeClass().equals(param.getClass())) {
-//                return false;
-//            }
-//        }
-//        return true;
-//    }
-//
-//    private boolean checkParameters(List messageParts, List parameters) {
-//        Iterator messagePartIterator = messageParts.iterator();
-//        for (Iterator parameterIterator = parameters.iterator(); parameterIterator.hasNext();)
{
-//            Object param = parameterIterator.next();
-//            MessagePartInfo mpi = (MessagePartInfo)messagePartIterator.next();
-//
-//            if (!mpi.getTypeClass().isAssignableFrom(param.getClass())) {
-//                if (!param.getClass().isPrimitive() && mpi.getTypeClass().isPrimitive())
{
-//                    return checkPrimitiveMatch(mpi.getTypeClass(), param.getClass());
-//                } else {
-//                    return false;
-//                }
-//            }
-//        }
-//        return true;
-//    }
-//
-//    private boolean checkPrimitiveMatch(Class clazz, Class typeClass) {
-//        if ((typeClass == Integer.class && clazz == int.class)
-//            || (typeClass == Double.class && clazz == double.class)
-//            || (typeClass == Long.class && clazz == long.class)
-//            || (typeClass == Float.class && clazz == float.class)
-//            || (typeClass == Short.class && clazz == short.class)
-//            || (typeClass == Boolean.class && clazz == boolean.class)
-//            || (typeClass == Byte.class && clazz == byte.class))
-//            return true;
-//
-//        return false;
-//    }
+
+      /**
+       * Return true only if the message parts exactly match the classes of the
+       * parameters
+       * 
+       * @param messageParts
+       * @param parameters
+       * @return
+       */
+    private boolean checkExactParameters(List messageParts, List parameters) {
+        Iterator messagePartIterator = messageParts.iterator();
+        for (Iterator parameterIterator = parameters.iterator(); parameterIterator.hasNext();)
{
+            Object param = parameterIterator.next();
+            if (param instanceof JAXBElement) {
+                JAXBElement paramEl = (JAXBElement)param;
+                MessagePartInfo mpi = (MessagePartInfo)messagePartIterator.next();
+                if (!mpi.getElementQName().equals(paramEl.getName())) {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    /*private boolean checkParameters(List messageParts, List parameters) {
+        Iterator messagePartIterator = messageParts.iterator();
+        for (Iterator parameterIterator = parameters.iterator(); parameterIterator.hasNext();)
{
+            Object param = parameterIterator.next();
+            MessagePartInfo mpi = (MessagePartInfo)messagePartIterator.next();
+
+            if (!mpi.getTypeClass().isAssignableFrom(param.getClass())) {
+                if (!param.getClass().isPrimitive() && mpi.getTypeClass().isPrimitive())
{
+                    return checkPrimitiveMatch(mpi.getTypeClass(), param.getClass());
+                } else {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    private boolean checkPrimitiveMatch(Class clazz, Class typeClass) {
+        if ((typeClass == Integer.class && clazz == int.class)
+            || (typeClass == Double.class && clazz == double.class)
+            || (typeClass == Long.class && clazz == long.class)
+            || (typeClass == Float.class && clazz == float.class)
+            || (typeClass == Short.class && clazz == short.class)
+            || (typeClass == Boolean.class && clazz == boolean.class)
+            || (typeClass == Byte.class && clazz == byte.class)) {
+            return true;
+        }
+
+        return false;
+    }*/
 }

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?rev=438909&r1=438908&r2=438909&view=diff
==============================================================================
--- 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 Aug 31 06:24:08 2006
@@ -20,8 +20,10 @@
 package org.apache.cxf.interceptor;
 
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 
+import javax.xml.bind.JAXBElement;
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.cxf.databinding.DataReader;
@@ -51,9 +53,11 @@
         DataReader<XMLStreamReader> dr = getDataReader(message);
         List<Object> parameters = new ArrayList<Object>();
 
-        StaxUtils.nextEvent(xmlReader);
+        //StaxUtils.nextEvent(xmlReader);
         while (StaxUtils.toNextElement(xmlReader)) {
-            parameters.add(dr.read(xmlReader));
+            Object o = dr.read(xmlReader);
+            
+            parameters.add(o);
         }
 
         // If we didn't know the operation going into this, lets try to figure
@@ -72,7 +76,15 @@
                 }
             }
         }
-
-        message.setContent(List.class, parameters);
+        List<Object> newParameters = new ArrayList<Object>();
+        for (Iterator iter = parameters.iterator(); iter.hasNext();) {
+            Object element = (Object)iter.next();
+            if (element instanceof JAXBElement) {
+                element = ((JAXBElement)element).getValue();
+            }
+            newParameters.add(element);
+            
+        }
+        message.setContent(List.class, newParameters);
     }
 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java?rev=438909&r1=438908&r2=438909&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java
Thu Aug 31 06:24:08 2006
@@ -55,7 +55,7 @@
 
             public void run() {
                 Object result = invoker.invoke(message.getExchange(), 
-                    exchange.getInMessage().getContent(List.class));
+                    message.getContent(List.class));
 
                 if (result != null) {
                     if (!(result instanceof List)) {

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerTest.java?rev=438909&r1=438908&r2=438909&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerTest.java
Thu Aug 31 06:24:08 2006
@@ -38,10 +38,13 @@
 import org.apache.cxf.systest.common.ClientServerTestBase;
 import org.apache.cxf.systest.common.TestServerBase;
 import org.apache.hello_world_soap_http.BadRecordLitFault;
+import org.apache.hello_world_soap_http.DocLitBare;
+import org.apache.hello_world_soap_http.DocLitBareGreeterImpl;
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.GreeterImpl;
 import org.apache.hello_world_soap_http.NoSuchCodeLitFault;
 import org.apache.hello_world_soap_http.SOAPService;
+import org.apache.hello_world_soap_http.SOAPServiceDocLitBare;
 import org.apache.hello_world_soap_http.types.BareDocumentResponse;
 import org.apache.hello_world_soap_http.types.GreetMeSometimeResponse;
 
@@ -51,6 +54,10 @@
                                                 "SOAPService");    
     private final QName portName = new QName("http://apache.org/hello_world_soap_http",
                                              "SoapPort");
+    
+    
+    private final QName portName1  = new QName("http://apache.org/hello_world_soap_http",
+                "SoapPort2");
 
     public static class Server extends TestServerBase {
 
@@ -58,7 +65,9 @@
             Object implementor = new GreeterImpl();
             String address = "http://localhost:9000/SoapContext/SoapPort";
             Endpoint.publish(address, implementor);
-            
+            implementor = new DocLitBareGreeterImpl();
+            address = "http://localhost:7600/SoapContext/SoapPort";
+            Endpoint.publish(address, implementor);
         }
         
 
@@ -84,6 +93,7 @@
         };
         
         
+        
     }
     
     public void testBasicConnection() throws Exception {
@@ -95,6 +105,7 @@
 
         String response = new String("Bonjour");
         try {
+            greeter.greetMe("test");
             String reply = greeter.sayHi();
             assertNotNull("no response received from service", reply);
             assertEquals(response, reply);
@@ -103,6 +114,23 @@
         }
     } 
     
+    public void testDocLitBareConnection() throws Exception {
+        
+        SOAPServiceDocLitBare service = new SOAPServiceDocLitBare();
+        assertNotNull(service);
+
+        DocLitBare greeter = service.getPort(portName1, DocLitBare.class);
+        try {
+       
+            BareDocumentResponse bareres = greeter.testDocLitBare("MySimpleDocument");
+            assertNotNull("no response for operation testDocLitBare", bareres);
+            assertEquals("CXF", bareres.getCompany());
+            assertTrue(bareres.getId() == 1);
+        } catch (UndeclaredThrowableException ex) {
+            throw (Exception)ex.getCause();
+        }
+    }
+    
     public void xtestBasicConnection() throws Exception {
         URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
         assertNotNull(wsdl);
@@ -127,10 +155,7 @@
 
                 greeter.greetMeOneWay("Milestone-" + idx);
                 
-                BareDocumentResponse bareres = greeter.testDocLitBare("MySimpleDocument");
-                assertNotNull("no response for operation testDocLitBare", bareres);
-                assertEquals("CXF", bareres.getCompany());
-                assertTrue(bareres.getId() == 1);  
+                
                 
             }            
         } catch (UndeclaredThrowableException ex) {
@@ -164,10 +189,7 @@
 
                 greeter.greetMeOneWay("Milestone-" + idx);
                 
-                BareDocumentResponse bareres = greeter.testDocLitBare("MySimpleDocument");
-                assertNotNull("no response for operation testDocLitBare", bareres);
-                assertEquals("CXF", bareres.getCompany());
-                assertTrue(bareres.getId() == 1);  
+                
                 
             }            
         } catch (UndeclaredThrowableException ex) {

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/HeaderClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/HeaderClientServerTest.java?rev=438909&r1=438908&r2=438909&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/HeaderClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/HeaderClientServerTest.java
Thu Aug 31 06:24:08 2006
@@ -33,7 +33,7 @@
 import junit.framework.TestSuite;
 
 
-import org.apache.cxf.systest.common.ClientServerSetupBase;
+//import org.apache.cxf.systest.common.ClientServerSetupBase;
 import org.apache.cxf.systest.common.ClientServerTestBase;
 import org.apache.cxf.systest.common.TestServerBase;
 import org.apache.header_test.SOAPHeaderService;
@@ -83,11 +83,13 @@
     
     public static Test suite() throws Exception {
         TestSuite suite = new TestSuite(HeaderClientServerTest.class);
-        return new ClientServerSetupBase(suite) {
+        /*return new ClientServerSetupBase(suite) {
             public void startServers() throws Exception {
                 assertTrue("server did not launch correctly", launchServer(MyServer.class));
             }
-        };
+        };*/
+        return suite;
+        
 
     }  
 
@@ -95,7 +97,7 @@
     
      
     public void testInHeader() throws Exception {
-        URL wsdl = getClass().getResource("/wsdl/soapheader_test.wsdl");
+        URL wsdl = getClass().getResource("/wsdl/soapheader.wsdl");
         assertNotNull(wsdl);
         
         SOAPHeaderService service = new SOAPHeaderService(wsdl, serviceName);

Modified: incubator/cxf/trunk/testutils/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?rev=438909&r1=438908&r2=438909&view=diff
==============================================================================
--- incubator/cxf/trunk/testutils/pom.xml (original)
+++ incubator/cxf/trunk/testutils/pom.xml Thu Aug 31 06:24:08 2006
@@ -192,7 +192,7 @@
                                     <wsdl>${basedir}/src/main/resources/wsdl/handler_test.wsdl</wsdl>
                                 </wsdlOption>
                                 <wsdlOption>
-                                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader_test.wsdl</wsdl>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader.wsdl</wsdl>
                                 </wsdlOption>
                                 <wsdlOption>
                                     <wsdl>${basedir}/src/main/resources/wsdl/schema_validation.wsdl</wsdl>

Added: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DocLitBareGreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DocLitBareGreeterImpl.java?rev=438909&view=auto
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DocLitBareGreeterImpl.java
(added)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DocLitBareGreeterImpl.java
Thu Aug 31 06:24:08 2006
@@ -0,0 +1,64 @@
+/**
+ * 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_soap_http;
+
+
+
+
+import java.util.concurrent.Future;
+
+import javax.jws.WebService;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import org.apache.hello_world_soap_http.types.BareDocumentResponse;
+
+
+@WebService(serviceName = "SOAPService_DocLitBare", 
+            portName = "SoapPort2", 
+            endpointInterface = "org.apache.hello_world_soap_http.DocLitBare",
+            targetNamespace = "http://apache.org/hello_world_soap_http")
+
+public class DocLitBareGreeterImpl implements DocLitBare {
+
+    private int invocationCount;
+    
+    public BareDocumentResponse testDocLitBare(String in) {
+        invocationCount++;
+        BareDocumentResponse res = new BareDocumentResponse();
+        res.setCompany("CXF");
+        res.setId(1);
+        return res;
+    }
+
+    public Future<?> testDocLitBareAsync(String in, AsyncHandler<BareDocumentResponse>
asyncHandler) {
+
+        return null;
+    }
+
+    public Response<BareDocumentResponse> testDocLitBareAsync(String in) {
+
+        return null;
+    }
+    
+    public int getInvocationCount() {
+        return invocationCount;
+    }
+}

Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DocLitBareGreeterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DocLitBareGreeterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl?rev=438909&r1=438908&r2=438909&view=diff
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl Thu Aug 31 06:24:08
2006
@@ -194,6 +194,10 @@
             <wsdl:fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault"/>
             <wsdl:fault name="BadRecordLitFault" message="tns:BadRecordLitFault"/>
         </wsdl:operation>
+
+    </wsdl:portType>
+
+    <wsdl:portType name="DocLitBare">
         <wsdl:operation name="testDocLitBare">
             <wsdl:input name="testDocLitBareRequest" message="tns:testDocLitBareRequest"/>
             <wsdl:output name="testDocLitBareResponse" message="tns:testDocLitBareResponse"/>
@@ -249,6 +253,10 @@
                 <soap:fault name="BadRecordLitFault" use="literal"/>
             </wsdl:fault>
         </wsdl:operation>
+
+    </wsdl:binding>
+    <wsdl:binding name="Doc_Lit_Bare_SOAPBinding" type="tns:DocLitBare">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
         <wsdl:operation name="testDocLitBare">
             <soap:operation style="document" soapAction="http://apache.org/hello_world_soap_http/testDocLitBare"/>
             <wsdl:input name="testDocLitBareRequest">
@@ -259,12 +267,20 @@
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
+
+
     <wsdl:service name="SOAPService">
         <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding">
             <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
         </wsdl:port>
 	<wsdl:port name="SoapPort1" binding="tns:Greeter_SOAPBinding">
             <soap:address location="http://localhost:7000/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+
+    <wsdl:service name="SOAPService_DocLitBare">
+        <wsdl:port name="SoapPort2" binding="tns:Doc_Lit_Bare_SOAPBinding">
+            <soap:address location="http://localhost:7600/SoapContext/SoapPort"/>
         </wsdl:port>
     </wsdl:service>
     <wsdl:service name="SOAPService_Test1">



Mime
View raw message