Author: bimargulies
Date: Fri Nov 23 09:27:44 2007
New Revision: 597705
URL: http://svn.apache.org/viewvc?rev=597705&view=rev
Log:
Successfully get the response back.
Modified:
incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/types/SchemaJavascriptBuilder.java
incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JavascriptTestUtilities.java
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsSimpleDomNode.java
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrapped.java
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/service/DocLitWrappedTest.java
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/types/SerializationTest.java
incubator/cxf/trunk/rt/javascript/src/test/resources/logging.properties
Modified:
incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
(original)
+++
incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
Fri Nov 23 09:27:44 2007
@@ -285,6 +285,8 @@
+ ";\n\n");
}
+ // Note: the response XML that we get from the XMLHttpRequest is the
document element,
+ // not the root element.
private void buildSuccessFunction(MessageInfo outputMessage) {
// Here are the success and error callbacks. They have the job of
// calling
@@ -298,18 +300,23 @@
utils.startIf("this._onsuccess");
utils.appendLine("var responseObject = null;");
if (outputMessage != null) {
+ utils.appendLine("var element = responseXml.documentElement;");
+ utils.appendLine("this.jsutils.trace('responseXml: ' "
+ + "+ this.jsutils.traceElementName(element));");
+
if (soapBindingInfo != null) { // soap
// The following code is probably only right for basic
// Doc/Literal/Wrapped services.
// the top element should be the Envelope, then the Body, then
// the actual response item.
- utils.appendLine("var element =
this.jsutils.getFirstElementChild(responseXml);");
+ utils.appendLine("element =
this.jsutils.getFirstElementChild(element);");
+ utils.appendLine("this.jsutils.trace('first element child: ' "
+ + "+
this.jsutils.traceElementName(element));");
// Go down one more from the body to the response item.
- utils.appendLine("element =
this.jsutils.getFirstElementChild(responseXml);");
- } else if (xmlBindingInfo != null) {
- utils.appendLine("var element = responseXml;");
- }
-
+ utils.appendLine("element =
this.jsutils.getFirstElementChild(element);");
+ utils.appendLine("this.jsutils.trace('part element: ' "
+ + "+
this.jsutils.traceElementName(element));");
+ }
String deserializerFunctionName =
outputDeserializerFunctionName(outputMessage);
utils.appendLine("this.jsutils.trace('calling " +
deserializerFunctionName + "');");
utils.appendLine("responseObject = " + deserializerFunctionName +
"(this.jsutils, element);");
@@ -533,7 +540,7 @@
@Override
public void end(ServiceInfo service) {
- LOG.fine(getCode());
+ LOG.finer(getCode());
}
private void unsupportedConstruct(String messageKey, Object... args) {
Modified:
incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/types/SchemaJavascriptBuilder.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/types/SchemaJavascriptBuilder.java?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/types/SchemaJavascriptBuilder.java
(original)
+++
incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/types/SchemaJavascriptBuilder.java
Fri Nov 23 09:27:44 2007
@@ -266,8 +266,9 @@
code.append("function " + typeObjectName + "_deserialize (cxfjsutils,
element) {\n");
// create the object we are deserializing into.
utils.appendLine("var newobject = new " + typeObjectName + "();");
-
+ utils.appendLine("cxfjsutils.trace('element: ' +
cxfjsutils.traceElementName(element));");
utils.appendLine("var curElement =
cxfjsutils.getFirstElementChild(element);");
+
utils.appendLine("var item;");
for (int i = 0; i < sequence.getItems().getCount(); i++) {
Modified:
incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
(original)
+++
incubator/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
Fri Nov 23 09:27:44 2007
@@ -50,9 +50,9 @@
function org_apache_cxf_element_name_for_trace(node)
{
if(node == null)
- return "null";
+ return "Null";
else if(node == undefined)
- return "undefined";
+ return "Undefined";
else {
var n = '';
if(node.namespaceURI != null && node.namespaceURI != '') {
Modified:
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
(original)
+++
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
Fri Nov 23 09:27:44 2007
@@ -36,6 +36,7 @@
import org.junit.Before;
import org.junit.Test;
import org.mozilla.javascript.Context;
+import org.mozilla.javascript.Scriptable;
import org.springframework.context.support.GenericApplicationContext;
public class DocLitWrappedClientTest extends AbstractCXFSpringTest {
@@ -94,8 +95,11 @@
String errorText =
testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
assertNull(errorText);
- Object responseObject =
testUtilities.rhinoEvaluate("globalResponseObject");
+ Scriptable responseObject =
(Scriptable)testUtilities.rhinoEvaluate("globalResponseObject");
assertNotNull(responseObject);
+ String returnString =
+ testUtilities.rhinoCallMethodInContext(String.class,
responseObject, "getReturnValue");
+ assertEquals("eels", returnString);
return null; // well, null AND void.
}
});
Modified:
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JavascriptTestUtilities.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JavascriptTestUtilities.java?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JavascriptTestUtilities.java
(original)
+++
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JavascriptTestUtilities.java
Fri Nov 23 09:27:44 2007
@@ -37,6 +37,7 @@
import org.mozilla.javascript.Function;
import org.mozilla.javascript.JavaScriptException;
import org.mozilla.javascript.RhinoException;
+import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.ScriptableObject;
import org.mozilla.javascript.tools.debugger.Main;
@@ -223,6 +224,51 @@
}
/**
+ * Call a method on a Javascript object.
+ *
+ * @param that the object.
+ * @param methodName method name.
+ * @param args arguments.
+ * @return
+ */
+ public Object rhinoCallMethod(Scriptable that, String methodName,
Object... args) {
+ return ScriptableObject.callMethod(rhinoContext, that, methodName,
args);
+ }
+
+ /**
+ * Call a method on a Javascript object and convert result to specified
class.
+ * @param <T> type
+ * @param clazz class object.
+ * @param that Javascript object.
+ * @param methodName method
+ * @param args arguments
+ * @return return value.
+ */
+ public <T> T rhinoCallMethodConvert(Class<T> clazz, Scriptable that,
String methodName, Object... args) {
+ return clazz.cast(rhinoCallMethod(that, methodName, args));
+ }
+
+ /**
+ * Call a method on a Javascript object inside context brackets.
+ * @param <T> return type.
+ * @param clazz class for the return type.
+ * @param that object
+ * @param methodName method
+ * @param args arguments. Caller must run javaToJS as appropriate
+ * @return return value.
+ */
+ public <T> T rhinoCallMethodInContext(final Class<T> clazz, final
Scriptable that,
+ final String methodName,
+ final Object... args) {
+ // we end up performing the cast twice to make the compiler happy.
+ return runInsideContext(clazz, new JSRunnable<T>() {
+ public T run(Context context) {
+ return clazz.cast(rhinoCallMethod(that, methodName, args));
+ }
+ });
+ }
+
+ /**
* Evaluate a Javascript expression, converting the return value to a
* convenient Java type.
*
@@ -236,9 +282,9 @@
}
/**
- * Call a JavaScript function. Optionally, require it to throw an exception
- * equal to a supplied object. If the exception is called for, this
function
- * will either return null or Assert.
+ * Call a JavaScript function within the Context. Optionally, require it to
+ * throw an exception equal to a supplied object. If the exception is
called
+ * for, this function will either return null or Assert.
*
* @param expectingException Exception desired, or null.
* @param functionName Function to call.
@@ -246,39 +292,57 @@
* appropriate.
* @return
*/
- public Object rhinoCallExpectingException(final Object expectingException,
final String functionName,
- final Object... args) {
+ public Object rhinoCallExpectingExceptionInContext(final Object
expectingException,
+ final String
functionName, final Object... args) {
return runInsideContext(Object.class, new JSRunnable<Object>() {
public Object run(Context context) {
- Object fObj = rhinoScope.get(functionName, rhinoScope);
- if (!(fObj instanceof Function)) {
- throw new RuntimeException("Missing test function " +
functionName);
- }
- Function function = (Function)fObj;
- try {
- return function.call(rhinoContext, rhinoScope, rhinoScope,
args);
- } catch (RhinoException angryRhino) {
- if (expectingException != null && angryRhino instanceof
JavaScriptException) {
- JavaScriptException jse =
(JavaScriptException)angryRhino;
- Assert.assertEquals(jse.getValue(),
expectingException);
- return null;
- }
- String trace = angryRhino.getScriptStackTrace();
- Assert.fail("JavaScript error: " + angryRhino.toString() +
" " + trace);
- } catch (JavaScriptAssertionFailed assertion) {
- Assert.fail(assertion.getMessage());
- }
- return null;
+ return rhinoCallExpectingException(expectingException,
functionName, args);
}
});
}
+ /**
+ * Call a Javascript function, identified by name, on a set of arguments.
+ * Optionally, expect it to throw an exception.
+ *
+ * @param expectingException
+ * @param functionName
+ * @param args
+ * @return
+ */
+ public Object rhinoCallExpectingException(final Object expectingException,
final String functionName,
+ final Object... args) {
+ Object fObj = rhinoScope.get(functionName, rhinoScope);
+ if (!(fObj instanceof Function)) {
+ throw new RuntimeException("Missing test function " +
functionName);
+ }
+ Function function = (Function)fObj;
+ try {
+ return function.call(rhinoContext, rhinoScope, rhinoScope, args);
+ } catch (RhinoException angryRhino) {
+ if (expectingException != null && angryRhino instanceof
JavaScriptException) {
+ JavaScriptException jse = (JavaScriptException)angryRhino;
+ Assert.assertEquals(jse.getValue(), expectingException);
+ return null;
+ }
+ String trace = angryRhino.getScriptStackTrace();
+ Assert.fail("JavaScript error: " + angryRhino.toString() + " " +
trace);
+ } catch (JavaScriptAssertionFailed assertion) {
+ Assert.fail(assertion.getMessage());
+ }
+ return null;
+ }
+
+ public Object rhinoCallInContext(String functionName, Object... args) {
+ return rhinoCallExpectingExceptionInContext(null, functionName, args);
+ }
+
public Object rhinoCall(String functionName, Object... args) {
return rhinoCallExpectingException(null, functionName, args);
}
public <T> T rhinoCallConvert(String functionName, Class<T> clazz,
Object... args) {
- return clazz.cast(Context.jsToJava(rhinoCall(functionName, args),
clazz));
+ return clazz.cast(Context.jsToJava(rhinoCallInContext(functionName,
args), clazz));
}
public void loadJavascriptForService(ServiceInfo serviceInfo) {
Modified:
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
(original)
+++
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
Fri Nov 23 09:27:44 2007
@@ -78,13 +78,13 @@
// just one test function to avoid muddles with engine startup/shutdown
@Test
public void runTests() throws Exception {
- testUtilities.rhinoCallExpectingException("SYNTAX_ERR",
"testOpaqueURI");
- testUtilities.rhinoCallExpectingException("SYNTAX_ERR",
"testNonAbsolute");
- testUtilities.rhinoCallExpectingException("SYNTAX_ERR", "testNonHttp");
- testUtilities.rhinoCallExpectingException("INVALID_STATE_ERR",
"testSendNotOpenError");
- testUtilities.rhinoCall("testStateNotificationSync");
+ testUtilities.rhinoCallExpectingExceptionInContext("SYNTAX_ERR",
"testOpaqueURI");
+ testUtilities.rhinoCallExpectingExceptionInContext("SYNTAX_ERR",
"testNonAbsolute");
+ testUtilities.rhinoCallExpectingExceptionInContext("SYNTAX_ERR",
"testNonHttp");
+
testUtilities.rhinoCallExpectingExceptionInContext("INVALID_STATE_ERR",
"testSendNotOpenError");
+ testUtilities.rhinoCallInContext("testStateNotificationSync");
Notifier notifier =
testUtilities.rhinoCallConvert("testAsyncHttpFetch1", Notifier.class);
- testUtilities.rhinoCall("testAsyncHttpFetch2");
+ testUtilities.rhinoCallInContext("testAsyncHttpFetch2");
boolean notified = notifier.waitForJavascript(10);
assertTrue(notified);
assertEquals("HEADERS_RECEIVED", Boolean.TRUE,
@@ -101,7 +101,7 @@
testUtilities.rhinoEvaluateConvert("asyncStatusText",
String.class));
assertTrue("headers",
testUtilities.rhinoEvaluateConvert("asyncResponseHeaders", String.class)
.contains("Content-Type: text/html"));
- Object httpObj = testUtilities.rhinoCall("testSyncHttpFetch");
+ Object httpObj = testUtilities.rhinoCallInContext("testSyncHttpFetch");
assertNotNull(httpObj);
assertTrue(httpObj instanceof String);
String httpResponse = (String) httpObj;
Modified:
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsSimpleDomNode.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsSimpleDomNode.java?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsSimpleDomNode.java
(original)
+++
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsSimpleDomNode.java
Fri Nov 23 09:27:44 2007
@@ -100,6 +100,16 @@
return wrappedNode.getNodeValue();
}
+ // in a more complete version of this, we'd use a different object type to
wrap documents.
+ public Object jsGet_documentElement() {
+ if(9 /* Document */ != wrappedNode.getNodeType()) {
+ return null;
+ } else {
+ establishChildren();
+ return children[0]; // it is, after all, just a convenience
feature.
+ }
+ }
+
public Object[] jsGet_childNodes() {
establishChildren();
return children;
Modified:
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
(original)
+++
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
Fri Nov 23 09:27:44 2007
@@ -367,6 +367,7 @@
CharBuffer contentChars =
contentCharset.decode(ByteBuffer.wrap(contentBytes)); // not
the most efficient way.
responseText = contentChars.toString();
+ LOG.fine(responseText);
// throw away any encoding modifier.
String contentType = connection.getContentType().split(";")[0];
Modified:
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrapped.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrapped.java?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrapped.java
(original)
+++
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrapped.java
Fri Nov 23 09:27:44 2007
@@ -21,6 +21,7 @@
import javax.jws.WebMethod;
import javax.jws.WebParam;
+import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
@@ -32,6 +33,7 @@
public interface SimpleDocLitWrapped {
@RequestWrapper(className =
"org.apache.cxf.javascript.fortest.BasicTypeFunctionReturnStringWrapper")
@ResponseWrapper(className =
"org.apache.cxf.javascript.fortest.StringWrapper")
+ @WebResult(name = "returnValue", targetNamespace =
"uri:org.apache.cxf.javascript.testns")
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=597705&r1=597704&r2=597705&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
Fri Nov 23 09:27:44 2007
@@ -108,7 +108,7 @@
}
});
Object xmlString = null;
- xmlString =
testUtilities.rhinoCall(BASIC_TYPE_FUNCTION_RETURN_STRING_SERIALIZER_NAME,
+ xmlString =
testUtilities.rhinoCallInContext(BASIC_TYPE_FUNCTION_RETURN_STRING_SERIALIZER_NAME,
jsParamArray);
assertTrue(xmlString instanceof String);
DataReader<XMLStreamReader> reader =
dataBinding.createReader(XMLStreamReader.class);
@@ -158,7 +158,7 @@
Element messageElement = document.getDocumentElement();
Object jsUtils = testUtilities.rhinoNewObject("CxfApacheOrgUtil");
Object jsResult =
-
testUtilities.rhinoCall(BASIC_TYPE_FUNCTION_RETURN_STRING_RESPONSE_DESERIALIZE_RESPONSE,
+
testUtilities.rhinoCallInContext(BASIC_TYPE_FUNCTION_RETURN_STRING_RESPONSE_DESERIALIZE_RESPONSE,
jsUtils,
JsSimpleDomNode.wrapNode(testUtilities.getRhinoScope(),
messageElement));
Modified:
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/types/SerializationTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/types/SerializationTest.java?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/types/SerializationTest.java
(original)
+++
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/types/SerializationTest.java
Fri Nov 23 09:27:44 2007
@@ -90,7 +90,7 @@
bean.stringItem = "bean1>stringItem";
bean.doubleItem = -1.0;
String serialized = serializeObject(dataBinding, bean);
- testUtilities.rhinoCall("deserializeTestBean1_1", serialized);
+ testUtilities.rhinoCallInContext("deserializeTestBean1_1", serialized);
bean = new TestBean1();
bean.stringItem = null;
@@ -104,7 +104,7 @@
bean.optionalIntArrayItem[3] = 1;
bean.doubleItem = -1.0;
serialized = serializeObject(dataBinding, bean);
- testUtilities.rhinoCall("deserializeTestBean1_2", serialized);
+ testUtilities.rhinoCallInContext("deserializeTestBean1_2", serialized);
}
private String serializeObject(DataBinding dataBinding, TestBean1 bean)
throws XMLStreamException {
@@ -125,7 +125,7 @@
DataBinding dataBinding =
clientProxyFactory.getServiceFactory().getDataBinding();
assertNotNull(dataBinding);
- Object serialized = testUtilities.rhinoCall("serializeTestBean1_1");
+ Object serialized =
testUtilities.rhinoCallInContext("serializeTestBean1_1");
assertTrue(serialized instanceof String);
String xml = (String)serialized;
DataReader<XMLStreamReader> reader =
dataBinding.createReader(XMLStreamReader.class);
@@ -144,7 +144,7 @@
assertEquals(1, testBean.optionalIntArrayItem.length);
assertEquals(543, testBean.optionalIntArrayItem[0]);
- serialized = testUtilities.rhinoCall("serializeTestBean1_2");
+ serialized = testUtilities.rhinoCallInContext("serializeTestBean1_2");
assertTrue(serialized instanceof String);
xml = (String)serialized;
reader = dataBinding.createReader(XMLStreamReader.class);
@@ -164,7 +164,7 @@
assertEquals(0, testBean.optionalIntArrayItem[1]);
assertEquals(345, testBean.optionalIntArrayItem[2]);
- serialized = testUtilities.rhinoCall("serializeTestBean1_3");
+ serialized = testUtilities.rhinoCallInContext("serializeTestBean1_3");
assertTrue(serialized instanceof String);
xml = (String)serialized;
reader = dataBinding.createReader(XMLStreamReader.class);
Modified:
incubator/cxf/trunk/rt/javascript/src/test/resources/logging.properties
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/resources/logging.properties?rev=597705&r1=597704&r2=597705&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/resources/logging.properties
(original)
+++ incubator/cxf/trunk/rt/javascript/src/test/resources/logging.properties Fri
Nov 23 09:27:44 2007
@@ -20,8 +20,10 @@
#
# logging for the javascript tests
handlers= java.util.logging.ConsoleHandler
-.level= WARNING
-java.util.logging.ConsoleHandler.level = FINE
+.level= INFO
+java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
-#org.apache.cxf.javascript.service.ServiceJavascriptBuilder.level=FINE
-#org.apache.cxf.javascript.JavascriptTestUtilities.level=FINE
+org.apache.cxf.javascript.service.ServiceJavascriptBuilder.level=FINE
+org.apache.cxf.javascript.JavascriptTestUtilities.level=FINE
+org.apache.cxf.javascript.JsXMLHttpRequest.level = FINE
+