You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/10/20 21:11:11 UTC

svn commit: r586777 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/model/ rt/core/src/main/java/org/apache/cxf/interceptor/ rt/core/src/main/java/org/apache/cxf/wsdl11/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databi...

Author: dkulp
Date: Sat Oct 20 12:11:10 2007
New Revision: 586777

URL: http://svn.apache.org/viewvc?rev=586777&view=rev
Log:
[CXF-1124, CXF-1105, CXF-1116] Fix problems with arrays in Aegis
Fix issues with wrapped doc/lit with elements that don't match the opnam


Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
    incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml
    incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/authservice/AuthService.java
    incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/authservice/AuthServiceImpl.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPrice.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPriceResponse.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_with_wrapperclass.wsdl

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java Sat Oct 20 12:11:10 2007
@@ -21,11 +21,14 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.xml.namespace.QName;
 
 import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.service.Service;
 import org.apache.ws.commons.schema.XmlSchemaAnnotated;
@@ -64,7 +67,39 @@
         BindingInfo service = ep.getEndpointInfo().getBinding();
         return service.getOperation(opName);
     }
-
+    public static BindingOperationInfo getOperationForWrapperElement(Exchange exchange,
+                                                                     QName opName,
+                                                                     boolean output) {
+        
+        Endpoint ep = exchange.get(Endpoint.class);
+        BindingInfo service = ep.getEndpointInfo().getBinding();
+        Map<QName, BindingOperationInfo> wrapperMap = 
+            CastUtils.cast(service.getProperty("ServiceModel.WRAPPER.MAP"
+                                               + (output ? "" : "_OUT"), Map.class)); 
+        
+        
+        if (wrapperMap == null) {
+            wrapperMap = new HashMap<QName, BindingOperationInfo>();
+            for (BindingOperationInfo b : service.getOperations()) {
+                if (b.isUnwrappedCapable()) {
+                    MessagePartInfo part = null;
+                    if (output && b.getOutput() != null
+                        && !b.getOutput().getMessageParts().isEmpty()) {
+                        part = b.getOutput().getMessageParts().get(0);
+                    } else if (!output
+                        && !b.getInput().getMessageParts().isEmpty()) {
+                        part = b.getInput().getMessageParts().get(0);
+                    }
+                    if (part != null) {
+                        wrapperMap.put(part.getConcreteName(), b);
+                    }
+                }
+            }
+            service.setProperty("ServiceModel.WRAPPER.MAP"
+                                + (output ? "" : "_OUT"), wrapperMap);
+        }
+        return wrapperMap.get(opName);
+    }
     public static SchemaInfo getSchema(ServiceInfo serviceInfo, MessagePartInfo messagePartInfo) {
         SchemaInfo schemaInfo = null;
         String tns = null;

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java Sat Oct 20 12:11:10 2007
@@ -46,6 +46,7 @@
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.service.model.ServiceModelUtil;
 import org.apache.cxf.staxutils.DepthXMLStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.ws.commons.schema.XmlSchemaElement;
@@ -276,5 +277,18 @@
 
         return msgInfo;
     }
-
+    
+    protected BindingOperationInfo getBindingOperationInfo(Exchange exchange, QName name,
+                                                           boolean client) {
+        BindingOperationInfo bop = ServiceModelUtil.getOperationForWrapperElement(exchange, name, client);
+        if (bop == null) {
+            bop = super.getBindingOperationInfo(exchange, name, client);
+        }
+            
+        if (bop != null) {
+            exchange.put(BindingOperationInfo.class, bop);
+            exchange.put(OperationInfo.class, bop.getOperationInfo());
+        }
+        return bop;
+    }
 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Sat Oct 20 12:11:10 2007
@@ -619,7 +619,7 @@
         checkForWrapped(opInfo, false);
     }
 
-    public static void checkForWrapped(OperationInfo opInfo, boolean allowRefs) {
+    public static void checkForWrapped(OperationInfo opInfo, boolean relaxed) {
         MessageInfo inputMessage = opInfo.getInput();
         MessageInfo outputMessage = opInfo.getOutput();
         boolean passedRule = true;
@@ -650,8 +650,10 @@
         } else {
             QName inputElementName = inputPart.getElementQName();
             inputEl = schemas.getElementByQName(inputElementName);
-            if (inputEl == null || !opInfo.getName().getLocalPart().equals(inputElementName.getLocalPart())) {
+            if (inputEl == null) {
                 passedRule = false;
+            } else if (!opInfo.getName().getLocalPart().equals(inputElementName.getLocalPart())) {
+                passedRule = relaxed;
             }
         }
 
@@ -690,7 +692,7 @@
             xsct = (XmlSchemaComplexType)inputEl.getSchemaType();
             if (hasAttributes(xsct)
                 || !isWrappableSequence(xsct, inputEl.getQName().getNamespaceURI(),
-                                        unwrappedInput, allowRefs)) {
+                                        unwrappedInput, relaxed)) {
                 passedRule = false;
             }
         } else {
@@ -711,7 +713,7 @@
                 }
                 if (hasAttributes(xsct)
                     || !isWrappableSequence(xsct, outputEl.getQName().getNamespaceURI(), unwrappedOutput,
-                                            allowRefs)) {
+                                            relaxed)) {
                     passedRule = false;
                 }
             } else {

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java (original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java Sat Oct 20 12:11:10 2007
@@ -439,7 +439,16 @@
             } else {
                 info = typeCreator.createBasicClassInfo(param.getTypeClass());
             }
-            
+            if (param.getMessageInfo().getOperation().isUnwrapped()
+                && param.getTypeClass().isArray()) {
+                //The service factory expects arrays going into the wrapper to be
+                //mapped to the array component type and will then add
+                //min=0/max=unbounded.   That doesn't work for Aegis where we
+                //already created a wrapper ArrayType so we'll let it know we want the default.
+                param.setProperty("minOccurs", "1");
+                param.setProperty("maxOccurs", "1");
+                param.setProperty("nillable", Boolean.TRUE);
+            }
             if (info.getMappedName() != null) {
                 param.setConcreteName(info.getMappedName());
                 param.setName(info.getMappedName());

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java Sat Oct 20 12:11:10 2007
@@ -41,6 +41,7 @@
 
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.util.PackageUtils;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.service.factory.AbstractServiceConfiguration;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
@@ -435,12 +436,20 @@
     public QName getRequestWrapperName(OperationInfo op, Method method) {
         Method m = getDeclaredMethod(method);
         RequestWrapper rw = m.getAnnotation(RequestWrapper.class);
-        if (rw == null) {
-            return null;
+        String nm = null;
+        String lp = null;
+        if (rw != null) {
+            nm = rw.targetNamespace();
+            lp = rw.localName();
+        }
+        WebMethod meth = m.getAnnotation(WebMethod.class);
+        if (meth != null && StringUtils.isEmpty(lp)) {
+            lp = meth.operationName();
+        }
+        if (StringUtils.isEmpty(nm)) {
+            nm = op.getName().getNamespaceURI();
         }
-        String nm = rw.targetNamespace();
-        String lp = rw.localName();
-        if (nm.length() > 0 && lp.length() > 0) {            
+        if (!StringUtils.isEmpty(nm) && !StringUtils.isEmpty(lp)) {            
             return new QName(nm, lp); 
         } 
         return null;        
@@ -450,15 +459,26 @@
     public QName getResponseWrapperName(OperationInfo op, Method method) {
         Method m = getDeclaredMethod(method);
         ResponseWrapper rw = m.getAnnotation(ResponseWrapper.class);
-        if (rw == null) {
-            return null;
+        String nm = null;
+        String lp = null;
+        if (rw != null) {
+            nm = rw.targetNamespace();
+            lp = rw.localName();
+        }
+        WebMethod meth = m.getAnnotation(WebMethod.class);
+        if (meth != null && StringUtils.isEmpty(lp)) {
+            lp = meth.operationName();
+            if (!StringUtils.isEmpty(lp)) {
+                lp += "Response";
+            }
+        }
+        if (StringUtils.isEmpty(nm)) {
+            nm = op.getName().getNamespaceURI();
         }
-        String nm = rw.targetNamespace();
-        String lp = rw.localName();
-        if (nm.length() > 0 && lp.length() > 0) {            
+        if (!StringUtils.isEmpty(nm) && !StringUtils.isEmpty(lp)) {            
             return new QName(nm, lp); 
         } 
-        return null;      
+        return null;        
     }
     
     

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Sat Oct 20 12:11:10 2007
@@ -709,8 +709,20 @@
                 }
                 if (mpi.getTypeClass() != null && mpi.getTypeClass().isArray()
                     && !Byte.TYPE.equals(mpi.getTypeClass().getComponentType())) {
-                    el.setMinOccurs(0);
-                    el.setMaxOccurs(Long.MAX_VALUE);
+                    String min = (String)mpi.getProperty("minOccurs");
+                    String max = (String)mpi.getProperty("maxOccurs");
+                    if (min == null) {
+                        min = "0";
+                    }
+                    if (max == null) {
+                        max = "unbounded";
+                    }
+                    el.setMinOccurs(Long.parseLong(min));
+                    el.setMaxOccurs("unbounded".equals(max) ? Long.MAX_VALUE : Long.parseLong(max));
+                    Boolean b = (Boolean)mpi.getProperty("nillable");
+                    if (b != null && b.booleanValue()) {
+                        el.setNillable(b.booleanValue());
+                    }
                 } else if (Collection.class.isAssignableFrom(mpi.getTypeClass())
                            && mpi.getTypeClass().isInterface()) {
                     Type type = (Type)mpi.getProperty(GENERIC_TYPE);

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java Sat Oct 20 12:11:10 2007
@@ -78,7 +78,7 @@
     private SequenceIdentifierGenerator idGenerator;
     private RetransmissionQueue retransmissionQueue;
     private Map<Endpoint, RMEndpoint> reliableEndpoints = new HashMap<Endpoint, RMEndpoint>();
-    private Timer timer = new Timer(true);
+    private Timer timer = new Timer("RMManager-Timer-" + System.identityHashCode(this), true);
     private RMAssertion rmAssertion;
     private DeliveryAssuranceType deliveryAssurance;
     private SourcePolicyType sourcePolicy;

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java Sat Oct 20 12:11:10 2007
@@ -20,15 +20,20 @@
 package org.apache.cxf.systest.aegis;
 
 
+import java.net.URL;
 import java.util.List;
 import java.util.logging.Logger;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.authservice.AuthService;
 import org.apache.cxf.authservice.Authenticate;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.apache.cxf.test.TestUtilities;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -52,8 +57,15 @@
         assertTrue(service.authenticate("Joe", "Joe", "123"));
         assertFalse(service.authenticate("Joe1", "Joe", "fang"));      
         List<String> list = service.getRoles("Joe");
-        assertEquals(1, list.size());
+        assertEquals(3, list.size());
         assertEquals("Joe", list.get(0));
+        assertEquals("Joe-1", list.get(1));
+        assertEquals("Joe-2", list.get(2));
+        String roles[] = service.getRolesAsArray("Joe");
+        assertEquals(2, roles.length);
+        assertEquals("Joe", roles[0]);
+        assertEquals("Joe-1", roles[1]);
+        
         assertEquals("get Joe", service.getAuthentication("Joe"));
         Authenticate au = new Authenticate();
         au.setSid("ffang");
@@ -74,8 +86,21 @@
         assertTrue(service.authenticate("Joe", "Joe", "123"));
         assertFalse(service.authenticate("Joe1", "Joe", "fang"));      
         List<String> list = service.getRoles("Joe");
-        assertEquals(1, list.size());
+        assertEquals(3, list.size());
         assertEquals("Joe", list.get(0));
+        assertEquals("Joe-1", list.get(1));
+        assertEquals("Joe-2", list.get(2));
+        String roles[] = service.getRolesAsArray("Joe");
+        assertEquals(2, roles.length);
+        assertEquals("Joe", roles[0]);
+        assertEquals("Joe-1", roles[1]);
+        
+        roles = service.getRolesAsArray("null");
+        assertNull(roles);
+        
+        roles = service.getRolesAsArray("0");
+        assertEquals(0, roles.length);
+        
         assertEquals("get Joe", service.getAuthentication("Joe"));
         Authenticate au = new Authenticate();
         au.setSid("ffang");
@@ -83,5 +108,21 @@
         assertTrue(service.authenticate(au));
         au.setUid("ffang1");
         assertFalse(service.authenticate(au));
+    }
+    
+    @Test
+    public void testWSDL() throws Exception {
+        URL url = new URL("http://localhost:9002/jaxwsAndAegis?wsdl");
+        Document dom = XMLUtils.parse(url.openStream());
+        TestUtilities util = new TestUtilities(this.getClass());
+        util.addDefaultNamespaces();
+        util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
+                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
+                           + "xsd:sequence/xsd:element[@maxOccurs]",
+                           dom);
+        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
+                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
+                           + "xsd:sequence/xsd:element[@nillable='true']",
+                           dom);
     }
 }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java Sat Oct 20 12:11:10 2007
@@ -58,7 +58,7 @@
 
     @BeforeClass
     public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", launchServer(ServerMisc.class, true));
+        assertTrue("server did not launch correctly", launchServer(ServerMisc.class));
     }
     
     @Test
@@ -226,6 +226,8 @@
     }
     
     private void runDocLitTest(DocLitWrappedCodeFirstService port) throws Exception {
+        assertEquals(24, port.echoIntDifferentWrapperName(24));
+        
         String echoMsg = port.echo("Hello");
         assertEquals("Hello", echoMsg);
         

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java Sat Oct 20 12:11:10 2007
@@ -77,7 +77,7 @@
 
     @BeforeClass
     public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", launchServer(ServerXMLBinding.class));
+        assertTrue("server did not launch correctly", launchServer(ServerXMLBinding.class, true));
     }
 
     @Test

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java Sat Oct 20 12:11:10 2007
@@ -83,6 +83,10 @@
     @WebMethod
     int throwException(int i) throws ServiceTestFault;
     
+    @RequestWrapper(localName = "echoIntX")
+    @ResponseWrapper(localName = "echoIntXResponse")
+    int echoIntDifferentWrapperName(int i);
+    
     @WebMethod
     @WebResult(targetNamespace = "http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService",
                name = "result")

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java Sat Oct 20 12:11:10 2007
@@ -126,4 +126,8 @@
         return msg;
     }
 
+    public int echoIntDifferentWrapperName(int i) {
+        return i;
+    }
+
 }

Modified: incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml (original)
+++ incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml Sat Oct 20 12:11:10 2007
@@ -60,5 +60,11 @@
     </jaxws:serviceBean>
   </jaxws:server>
   
+  <jaxws:server address="/jaxwsAndJaxb"
+    serviceClass="org.apache.cxf.authservice.AuthService">
+    <jaxws:serviceBean>
+      <bean class="org.apache.cxf.authservice.AuthServiceImpl" />
+    </jaxws:serviceBean>
+   </jaxws:server>  
 </beans>
 <!-- END SNIPPET: beans -->

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/authservice/AuthService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/authservice/AuthService.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/authservice/AuthService.java (original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/authservice/AuthService.java Sat Oct 20 12:11:10 2007
@@ -37,7 +37,10 @@
     java.util.List<java.lang.String> getRoles(
                                               String sid
     );
+    
+    java.lang.String[] getRolesAsArray(String sid);
 
+    @WebMethod(operationName = "authenticate1")
     boolean authenticate(
                          String sid,
                          String uid,
@@ -49,4 +52,5 @@
     boolean authenticate(Authenticate auth);
     
     String getAuthentication(String sid);
+    
 }

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/authservice/AuthServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/authservice/AuthServiceImpl.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/authservice/AuthServiceImpl.java (original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/authservice/AuthServiceImpl.java Sat Oct 20 12:11:10 2007
@@ -22,7 +22,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.jws.WebService;
 
+@WebService(targetNamespace = "http://cxf.apache.org/AuthService", name = "AuthService",
+            endpointInterface = "org.apache.cxf.authservice.AuthService")
 public class AuthServiceImpl implements AuthService {
 
     public boolean authenticate(String sid, String uid, String pwd) {
@@ -40,7 +43,18 @@
     public List<String> getRoles(String sid) {
         List<String> list = new ArrayList<String>();
         list.add(sid);
+        list.add(sid + "-1");
+        list.add(sid + "-2");
         return list;
+    }
+    public String[] getRolesAsArray(String sid) {
+        if ("null".equals(sid)) {
+            return null;
+        }
+        if ("0".equals(sid)) {
+            return new String[0];
+        }
+        return new String[] {sid, sid + "-1"};
     }
 
 }

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPrice.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPrice.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPrice.java (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPrice.java Sat Oct 20 12:11:10 2007
@@ -23,7 +23,6 @@
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
 
 
 /**
@@ -48,7 +47,6 @@
  * 
  */
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {"responseType" })
 @XmlRootElement(name = "getPrice")
 public class GetPrice {
 

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPriceResponse.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPriceResponse.java?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPriceResponse.java (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPriceResponse.java Sat Oct 20 12:11:10 2007
@@ -22,7 +22,6 @@
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
 
 
 /**
@@ -47,7 +46,6 @@
  * 
  */
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {"responseType" })
 @XmlRootElement(name = "getPriceResponse")
 public class GetPriceResponse {
 

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl Sat Oct 20 12:11:10 2007
@@ -2,28 +2,28 @@
 <wsdl:definitions name="StockService" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:tns="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://doc.withannotation.fortest.tools.cxf.apache.org/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/">
-<xs:element name="getPrice">
-<xs:complexType>
-<xs:sequence>
-<xs:element name="responseType" type="xs:string"/>
-</xs:sequence>
-</xs:complexType>
-</xs:element>
-<xs:element name="getPriceResponse">
-<xs:complexType>
-<xs:sequence>
-<xs:element name="responseType" type="xs:float"/>
-</xs:sequence>
-</xs:complexType>
-</xs:element>
+    <xs:element name="getPrice" type="getPrice"/>
+    <xs:element name="getPriceResponse" type="getPriceResponse"/>
+    <xs:complexType name="getPriceResponse">
+        <xs:sequence>
+            <xs:element name="responseType" type="xs:float"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="getPrice">
+        <xs:sequence>
+            <xs:element name="responseType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="xXx" nillable="true" type="getPrice"/>
+    <xs:element name="zZz" nillable="true" type="getPriceResponse"/>
 </xs:schema>
   </wsdl:types>
   <wsdl:message name="getPriceResponse">
-    <wsdl:part name="parameters" element="tns:getPriceResponse">
+    <wsdl:part name="parameters" element="tns:zZz">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="getPrice">
-    <wsdl:part name="parameters" element="tns:getPrice">
+    <wsdl:part name="parameters" element="tns:xXx">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="Stock">

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_with_wrapperclass.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_with_wrapperclass.wsdl?rev=586777&r1=586776&r2=586777&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_with_wrapperclass.wsdl (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_with_wrapperclass.wsdl Sat Oct 20 12:11:10 2007
@@ -2,20 +2,18 @@
 <wsdl:definitions name="StockWrappedService" targetNamespace="http://cxf.com/" xmlns:tns="http://cxf.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://cxf.com/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://cxf.com/">
-<xs:element name="getPrice">
-<xs:complexType>
-<xs:sequence>
-<xs:element name="responseType" type="xs:string"/>
-</xs:sequence>
-</xs:complexType>
-</xs:element>
-<xs:element name="getPriceResponse">
-<xs:complexType>
-<xs:sequence>
-<xs:element name="responseType" type="xs:float"/>
-</xs:sequence>
-</xs:complexType>
-</xs:element>
+    <xs:element name="getPrice" type="getPrice"/>
+    <xs:element name="getPriceResponse" type="getPriceResponse"/>
+    <xs:complexType name="getPrice">
+        <xs:sequence>
+            <xs:element name="responseType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="getPriceResponse">
+        <xs:sequence>
+            <xs:element name="responseType" type="xs:float"/>
+        </xs:sequence>
+    </xs:complexType>
 </xs:schema>
   </wsdl:types>
   <wsdl:message name="getPrice">