cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r593966 - in /incubator/cxf/trunk/rt/javascript/src: main/java/org/apache/cxf/javascript/ test/java/org/apache/cxf/javascript/fortest/ test/java/org/apache/cxf/javascript/service/
Date Sun, 11 Nov 2007 21:53:47 GMT
Author: bimargulies
Date: Sun Nov 11 13:53:46 2007
New Revision: 593966

URL: http://svn.apache.org/viewvc?rev=593966&view=rev
Log:
Create and declare an explicit request wrapper class for the first of
the test methods to make it easier to code tests of whether Javascript
can marshall them. Unfortunately, while this allows me to avoid the
mess that led me to mistakenly report CXF-1197, it tosses me into the
frying pan of CXF-1198.



Added:
    incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/BasicTypeFunctionReturnStringWrapper.java
Modified:
    incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/XmlSchemaUtils.java
    incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrappedUnqualified.java
    incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/service/DocLitWrappedTest.java

Modified: incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/XmlSchemaUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/XmlSchemaUtils.java?rev=593966&r1=593965&r2=593966&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/XmlSchemaUtils.java
(original)
+++ incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/XmlSchemaUtils.java
Sun Nov 11 13:53:46 2007
@@ -127,6 +127,7 @@
                                                String referencingURI, 
                                                XmlSchemaElement element,
                                                XmlSchemaType containingType) {
+        assert element != null;
         if (referencingURI == null && containingType != null) {
             referencingURI = containingType.getQName().getNamespaceURI();
         }

Added: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/BasicTypeFunctionReturnStringWrapper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/BasicTypeFunctionReturnStringWrapper.java?rev=593966&view=auto
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/BasicTypeFunctionReturnStringWrapper.java
(added)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/BasicTypeFunctionReturnStringWrapper.java
Sun Nov 11 13:53:46 2007
@@ -0,0 +1,66 @@
+/**
+ * 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.javascript.fortest;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * Wrapper class.
+ */
+@XmlRootElement
+public class BasicTypeFunctionReturnStringWrapper {
+    private String s;
+    private int i;
+    private long l;
+    private float f;
+    private double d;
+    
+    public String getS() {
+        return s;
+    }
+    public void setS(String s) {
+        this.s = s;
+    }
+    public int getI() {
+        return i;
+    }
+    public void setI(int i) {
+        this.i = i;
+    }
+    public long getL() {
+        return l;
+    }
+    public void setL(long l) {
+        this.l = l;
+    }
+    public float getF() {
+        return f;
+    }
+    public void setF(float f) {
+        this.f = f;
+    }
+    public double getD() {
+        return d;
+    }
+    public void setD(double d) {
+        this.d = d;
+    }
+
+}

Modified: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrappedUnqualified.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrappedUnqualified.java?rev=593966&r1=593965&r2=593966&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrappedUnqualified.java
(original)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrappedUnqualified.java
Sun Nov 11 13:53:46 2007
@@ -21,12 +21,14 @@
 
 import javax.jws.WebParam;
 import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
 
 /**
  * 
  */
 @WebService(targetNamespace = "uri:org.apache.cxf.javascript.fortest")
 public interface SimpleDocLitWrappedUnqualified {
+    @RequestWrapper(className = "org.apache.cxf.javascript.fortest.BasicTypeFunctionReturnStringWrapper")
     String basicTypeFunctionReturnString(@WebParam(name = "s") String s, 
                                          @WebParam(name = "i") int i, 
                                          @WebParam(name = "l") long l, 

Modified: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/service/DocLitWrappedTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/service/DocLitWrappedTest.java?rev=593966&r1=593965&r2=593966&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/service/DocLitWrappedTest.java
(original)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/service/DocLitWrappedTest.java
Sun Nov 11 13:53:46 2007
@@ -44,7 +44,6 @@
 import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.test.AbstractCXFSpringTest;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.mozilla.javascript.Scriptable;
 
@@ -72,7 +71,7 @@
         return new String[] {"classpath:serializationTestBeans.xml"};
     }
 
-    @Ignore
+    @org.junit.Ignore
     @Test 
     public void testMessageSerialization() throws Exception {
         setupClientAndRhino("simple-dlwu-proxy-factory");
@@ -98,11 +97,7 @@
         MessageInfo inputMessage = serviceInfo.getMessage(messageName);
         assertNotNull(inputMessage);
         MessagePartInfo part = inputMessage.getMessagePartByIndex(0); // has only one part.
-        // we have the entire SOAP message in the string. Readng the entire message is
-        // really organized by the full endpoint. If we want to focus for the moment at the
message
-        // or part part level, either need to invoke Javascript that builds less, or we need
to fish out the 
-        // part from the DOM or the reader.
-        // we can use the DOM to local
+        // Read into the full message to find the part.
         StringReader stringReader = new StringReader((String)xmlString);
         XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(stringReader);
         boolean gotToPart = false;



Mime
View raw message