Author: thomas.diesler(a)jboss.com
Date: 2006-11-21 15:58:12 -0500 (Tue, 21 Nov 2006)
New Revision: 1496
Modified:
trunk/ant.properties.example
trunk/src/main/java/org/jboss/ws/binding/EndpointInvocation.java
trunk/src/main/java/org/jboss/ws/common/CommonClient.java
trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java
trunk/src/main/java/org/jboss/ws/server/AbstractServiceEndpointInvoker.java
trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/StandardTypesBean.java
Log:
Fix opMetaData initialization when SEI mapping was not found.
Message style parameters should not cause a wrapped endpoint to become bare
FIXME: [JBWS-1333] Fix marshalling of null values in base64Binary, hexBinary
Add marshalling of null values in base64Binary and hexBinary
Modified: trunk/ant.properties.example
===================================================================
--- trunk/ant.properties.example 2006-11-21 20:29:19 UTC (rev 1495)
+++ trunk/ant.properties.example 2006-11-21 20:58:12 UTC (rev 1496)
@@ -3,9 +3,8 @@
#
# Required JBoss Home
-#jboss.jdk15.home=/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta
+#jboss.jdk15.home=/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta1
-
# Optional JBoss Home
#jboss.jdk14.home=/home/tdiesler/svn/jbossas/tags/JBoss_4_0_4_GA/build/output/jboss-4.0.4.GA
Modified: trunk/src/main/java/org/jboss/ws/binding/EndpointInvocation.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/binding/EndpointInvocation.java 2006-11-21 20:29:19
UTC (rev 1495)
+++ trunk/src/main/java/org/jboss/ws/binding/EndpointInvocation.java 2006-11-21 20:58:12
UTC (rev 1496)
@@ -229,7 +229,7 @@
}
else if (paramValue instanceof SOAPContentElement)
{
- // For xsd:anyType we return the SOAPElement
+ // For type other than xsd:anyType we return the object value
if (xmlType.getLocalPart().equals("anyType") == false)
{
SOAPContentElement soapElement = (SOAPContentElement)paramValue;
@@ -294,7 +294,7 @@
Method method = opMetaData.getJavaMethod();
Class[] targetParameterTypes = method.getParameterTypes();
- if (opMetaData.isDocumentWrapped() && paramMetaData.isInHeader() == false)
+ if (opMetaData.isDocumentWrapped() && paramMetaData.isInHeader() == false
&& paramMetaData.isMessageType() == false)
{
outParameters = ParameterWrapping.unwrapRequestParameters(paramMetaData,
paramValue, payload);
syncOutWrappedParameters(targetParameterTypes);
Modified: trunk/src/main/java/org/jboss/ws/common/CommonClient.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/common/CommonClient.java 2006-11-21 20:29:19 UTC (rev
1495)
+++ trunk/src/main/java/org/jboss/ws/common/CommonClient.java 2006-11-21 20:58:12 UTC (rev
1496)
@@ -363,7 +363,7 @@
if (retMetaData != null)
{
retValue = epInv.getReturnValue();
- if (opMetaData.isDocumentWrapped())
+ if (opMetaData.isDocumentWrapped() && retMetaData.isMessageType() ==
false)
retValue = ParameterWrapping.unwrapResponseParameters(retMetaData, retValue,
inParams);
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java 2006-11-21 20:29:19
UTC (rev 1495)
+++ trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java 2006-11-21 20:58:12
UTC (rev 1496)
@@ -25,6 +25,7 @@
import java.lang.reflect.Method;
import java.lang.reflect.Type;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -81,6 +82,13 @@
public AccessorFactory create(ParameterMetaData parameter);
}
+ private static final List<String> messageTypes = new ArrayList<String>();
+ static
+ {
+ messageTypes.add("javax.xml.soap.SOAPElement");
+ messageTypes.add("org.w3c.dom.Element");
+ }
+
public ParameterMetaData(OperationMetaData opMetaData, QName xmlName, QName xmlType,
String javaTypeName)
{
this(opMetaData, xmlName, javaTypeName);
@@ -195,7 +203,8 @@
ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
tmpJavaType = JavaUtils.loadJavaType(javaTypeName, loader);
- if
(opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().isEagerInitialized())
+ UnifiedMetaData wsMetaData =
opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData();
+ if (wsMetaData.isEagerInitialized())
{
// This should not happen, see the warning in setJavaTypeName
javaType = tmpJavaType;
@@ -292,6 +301,16 @@
{
this.soapArrayCompType = xmlType;
}
+
+ public boolean isMessageType()
+ {
+ return messageTypes.contains(javaTypeName);
+ }
+
+ public static boolean isMessageType(String javaTypeName)
+ {
+ return messageTypes.contains(javaTypeName);
+ }
/** Converts a proprietary JBossWS attachment xml type to the MIME type that it
represents.
*/
@@ -350,7 +369,7 @@
// references like this is not very flexible.
if (opMetaData.isDocumentWrapped())
{
- (new DynamicWrapperGenerator(getClassLoader())).generate(this);
+ new DynamicWrapperGenerator(getClassLoader()).generate(this);
// Initialize accessors
AccessorFactory factory = accessorFactoryCreator.create(this);
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java 2006-11-21 20:29:19
UTC (rev 1495)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java 2006-11-21 20:58:12
UTC (rev 1496)
@@ -359,7 +359,7 @@
// <xsd:import
namespace="http://org.jboss.webservice/example/types"
schemaLocation="Hello.xsd"/>
// <xsd:import
namespace="http://org.jboss.webservice/example/types/arrays/org/jboss/test/webservice/admindevel"
schemaLocation="subdir/HelloArr.xsd"/>
// </xsd:schema>
- if (targetNS.length() == 0)
+ if (targetNS == null)
{
log.trace("Schema element without target namespace in: " + wsdlLoc);
}
Modified: trunk/src/main/java/org/jboss/ws/server/AbstractServiceEndpointInvoker.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/server/AbstractServiceEndpointInvoker.java 2006-11-21
20:29:19 UTC (rev 1495)
+++ trunk/src/main/java/org/jboss/ws/server/AbstractServiceEndpointInvoker.java 2006-11-21
20:58:12 UTC (rev 1496)
@@ -208,9 +208,9 @@
msgContext.setSOAPMessage(faultMessage);
// call the handler chain
- boolean handlersPass = handlerDelegate.callFaultHandlerChain(seInfo,
HandlerType.POST, ex);
- handlersPass = handlersPass &&
handlerDelegate.callFaultHandlerChain(seInfo, HandlerType.ENDPOINT, ex);
- handlersPass = handlersPass &&
handlerDelegate.callFaultHandlerChain(seInfo, HandlerType.PRE, ex);
+ boolean handlersPass = callFaultHandlerChain(seInfo, HandlerType.POST, ex);
+ handlersPass = handlersPass && callFaultHandlerChain(seInfo,
HandlerType.ENDPOINT, ex);
+ handlersPass = handlersPass && callFaultHandlerChain(seInfo,
HandlerType.PRE, ex);
}
catch (Exception subEx)
{
Modified: trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java 2006-11-21 20:29:19 UTC
(rev 1495)
+++ trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java 2006-11-21 20:58:12 UTC
(rev 1496)
@@ -809,7 +809,6 @@
expandingToDOM = true;
// DOM expansion should only happen when a handler accesses the DOM API.
- // We do not allow DOM expansion on a dev release.
CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
if (msgContext != null && UnifiedMetaData.isFinalRelease() == false)
{
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java 2006-11-21
20:29:19 UTC (rev 1495)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java 2006-11-21
20:58:12 UTC (rev 1496)
@@ -206,15 +206,23 @@
public void testBase64Binary() throws Exception
{
byte[] in = "base64Binary".getBytes();
- byte[] out = base64BinaryTest(in);
- assertEquals(new String(in), new String(out));
+ Object out = base64BinaryTest(in);
+ assertEquals(new String(in), new String((byte[])out));
+
+ System.out.println("FIXME: [JBWS-1333] Fix marshalling of null values in
base64Binary, hexBinary");
+ //out = base64BinaryTest(null);
+ //assertNull(out);
}
public void testHexBinary() throws Exception
{
byte[] in = "hexBinary".getBytes();
byte[] out = hexBinaryTest(in);
- assertEquals(new String(in), new String(out));
+ assertEquals(new String(in), new String((byte[])out));
+
+ System.out.println("FIXME: [JBWS-1333] Fix marshalling of null values in
base64Binary, hexBinary");
+ //out = hexBinaryTest(null);
+ //assertNull(out);
}
public void testCalendar() throws Exception
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/StandardTypesBean.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/StandardTypesBean.java 2006-11-21
20:29:19 UTC (rev 1495)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/StandardTypesBean.java 2006-11-21
20:58:12 UTC (rev 1496)
@@ -166,13 +166,13 @@
public byte[] base64BinaryTest(byte[] param)
{
- log.info("base64BinaryTest: " + new String(param));
+ log.info("base64BinaryTest: " + (param != null ? new String(param) :
null));
return param;
}
public byte[] hexBinaryTest(byte[] param)
{
- log.info("hexBinaryTest: " + new String(param));
+ log.info("hexBinaryTest: " + (param != null ? new String(param) :
null));
return param;
}