[jboss-svn-commits] JBossWS SVN: r1057 - in branches/hbraun/jbossws-1.0/src: main/java/org/jboss/ws/jaxrpc main/java/org/jboss/ws/jaxrpc/handler main/java/org/jboss/ws/soap main/java/org/jboss/ws/xop test test/java/org/jboss/test/ws/jaxrpc/xop/rpclit
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Sep 26 11:08:37 EDT 2006
Author: heiko.braun at jboss.com
Date: 2006-09-26 11:08:20 -0400 (Tue, 26 Sep 2006)
New Revision: 1057
Added:
branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJVisitable.java
branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJVisitor.java
branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/xop/RestoreXOPElementVisitor.java
Modified:
branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java
branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerDelegateJAXRPC.java
branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPElementImpl.java
branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/xop/XOPContext.java
branches/hbraun/jbossws-1.0/src/test/build.xml
branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/InlineHandler.java
branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
Log:
restore XOP contents when jaxrpc handlers have been in place
Modified: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java 2006-09-26 15:08:20 UTC (rev 1057)
@@ -45,6 +45,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
+import org.jboss.ws.xop.XOPContext;
import org.jboss.ws.binding.UnboundHeader;
import org.jboss.ws.common.CommonBindingProvider;
import org.jboss.ws.common.CommonClient;
@@ -572,7 +573,12 @@
{
SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
HandlerChainBaseImpl handlerChain = (HandlerChainBaseImpl)jaxrpcService.getHandlerChain(portName);
- return (handlerChain != null ? handlerChain.handleRequest(msgContext, type) : true);
+ boolean status = (handlerChain != null ? handlerChain.handleRequest(msgContext, type) : true);
+
+ if (type == HandlerType.ENDPOINT)
+ XOPContext.visitAndRestoreXOPData();
+
+ return status;
}
@Override
Modified: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerDelegateJAXRPC.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerDelegateJAXRPC.java 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerDelegateJAXRPC.java 2006-09-26 15:08:20 UTC (rev 1057)
@@ -23,27 +23,23 @@
// $Id$
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.HandlerChain;
-import javax.xml.rpc.handler.HandlerInfo;
-
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.xop.XOPContext;
import org.jboss.ws.metadata.HandlerMetaData;
+import org.jboss.ws.metadata.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
import org.jboss.ws.metadata.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.ServerEndpointMetaData;
-import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
-import org.jboss.ws.metadata.HandlerMetaData.HandlerInitParam;
import org.jboss.ws.server.HandlerDelegate;
import org.jboss.ws.server.ServiceEndpointInfo;
import org.jboss.ws.soap.MessageContextAssociation;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.HandlerChain;
+import javax.xml.rpc.handler.HandlerInfo;
+import java.util.*;
+
/** Delegates to JAXRPC handlers
*
* @author Thomas.Diesler at jboss.org
@@ -89,7 +85,7 @@
handlerChain = jaxrpcHandlerChain;
else if (type == HandlerType.POST)
handlerChain = postHandlerChain;
-
+
if (handlerChain != null)
{
roles = handlerChain.getRoles();
@@ -99,23 +95,34 @@
// BP-1.0 R1027
if (type == HandlerType.POST)
HandlerChainBaseImpl.checkMustUnderstand(msgContext, roles);
-
+
return status;
}
public boolean callResponseHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
{
SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
-
+
HandlerChain handlerChain = null;
if (type == HandlerType.PRE)
+ {
handlerChain = preHandlerChain;
+ }
else if (type == HandlerType.ENDPOINT)
+ {
handlerChain = jaxrpcHandlerChain;
+ }
else if (type == HandlerType.POST)
+ {
handlerChain = postHandlerChain;
-
- return (handlerChain != null ? handlerChain.handleResponse(msgContext) : true);
+ }
+
+ boolean status = (handlerChain != null ? handlerChain.handleResponse(msgContext) : true);
+
+ if(type == HandlerType.ENDPOINT)
+ XOPContext.visitAndRestoreXOPData();
+
+ return status;
}
public boolean callFaultHandlerChain(ServiceEndpointInfo seInfo, HandlerType type, Exception ex)
@@ -124,13 +131,26 @@
HandlerChain handlerChain = null;
if (type == HandlerType.PRE)
+ {
handlerChain = preHandlerChain;
+ }
else if (type == HandlerType.ENDPOINT)
+ {
handlerChain = jaxrpcHandlerChain;
+ XOPContext.visitAndRestoreXOPData();
+ }
else if (type == HandlerType.POST)
+ {
handlerChain = postHandlerChain;
-
- return (handlerChain != null ? handlerChain.handleFault(msgContext) : true);
+ }
+
+ boolean status = (handlerChain != null ? handlerChain.handleFault(msgContext) : true);
+
+ if(type == HandlerType.ENDPOINT)
+ XOPContext.visitAndRestoreXOPData();
+
+ return status;
+
}
/**
@@ -165,11 +185,11 @@
{
hConfig.put(param.getParamName(), param.getParamValue());
}
-
+
Set<QName> headers = jaxrpcMetaData.getSoapHeaders();
QName[] headerArr = new QName[headers.size()];
headers.toArray(headerArr);
-
+
hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);
Added: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJVisitable.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJVisitable.java 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJVisitable.java 2006-09-26 15:08:20 UTC (rev 1057)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.soap;
+
+/**
+ * @author Heiko Braun <heiko.braun at jboss.com>
+ * @version $Id$
+ * @since Sep 26, 2006
+ */
+public interface SAAJVisitable {
+ public void accept(SAAJVisitor visitor);
+}
Property changes on: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJVisitable.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJVisitor.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJVisitor.java 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJVisitor.java 2006-09-26 15:08:20 UTC (rev 1057)
@@ -0,0 +1,34 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.soap;
+
+import javax.xml.soap.SOAPElement;
+
+/**
+ * @author Heiko Braun <heiko.braun at jboss.com>
+ * @version $Id$
+ * @since Sep 26, 2006
+ */
+public interface SAAJVisitor {
+ void visitSOAPElement(SOAPElementImpl soapElement);
+ void visitSOAPContentElement(SOAPContentElement scElement);
+}
Property changes on: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJVisitor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPContentElement.java 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPContentElement.java 2006-09-26 15:08:20 UTC (rev 1057)
@@ -965,51 +965,6 @@
}
}
- /*public void writeElement(Writer writer)
- {
- try
- {
- if (isDOMValid)
- {
- if (isXOPParameter() && XOPContext.isMTOMEnabled())
- {
- // When the DOM representation is valid (i.e. XOP is inlined),
- // and MTOM is enabled we need to convert the inlined
- // element back to an xop:Include element and create the attachment part
-
- log.debug("Transitioning to xml-valid state, MTOM enabled");
- XOPContext.restoreXOPData(this);
- }
- new DOMWriter(writer).print(this);
- }
- else
- {
- if (isXOPParameter() && XOPContext.isMTOMEnabled() == false)
- {
- // When the DOM representation is not valid (i.e. XOP is not inlined),
- // and MTOM is disabled we need to inlined the xop:Include element.
- // This happens when we expand to DOM
-
- log.debug("Expand to DOM, MTOM disabled");
- expandToDOM();
- new DOMWriter(writer).print(this);
- }
- else
- {
- writer.write(getXMLFragment());
- }
- }
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException(ex);
- }
- }*/
-
public void writeElement(Writer writer) {
try
{
@@ -1043,7 +998,7 @@
* it's needs to be decided wether or not the <code>xop:Include</code> should be restored.
* This as well depends upon the message context property.
*/
- private void handleMTOMTransitions() {
+ public void handleMTOMTransitions() {
boolean mtomEnabled = isXOPParameter() && XOPContext.isMTOMEnabled();
@@ -1066,11 +1021,15 @@
// element back to an xop:Include element and create the attachment part
log.debug("MTOM enabled: Restore XOP data");
- XOPContext.restoreXOPData(this);
+ XOPContext.restoreXOPDataDOM(this);
}
}
private boolean isXOPParameter()
{
return paramMetaData != null && paramMetaData.isXOP();
}
+
+ public void accept(SAAJVisitor visitor) {
+ visitor.visitSOAPContentElement(this);
+ }
}
Modified: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPElementImpl.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPElementImpl.java 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPElementImpl.java 2006-09-26 15:08:20 UTC (rev 1057)
@@ -59,7 +59,7 @@
*
* @author Thomas.Diesler at jboss.org
*/
-public class SOAPElementImpl extends NodeImpl implements SOAPElement
+public class SOAPElementImpl extends NodeImpl implements SOAPElement, SAAJVisitable
{
// provide logging
private static Logger log = Logger.getLogger(SOAPElementImpl.class);
@@ -670,6 +670,10 @@
throw new NotImplementedException("setIdAttributeNS");
}
+ public void accept(SAAJVisitor visitor) {
+ visitor.visitSOAPElement(this);
+ }
+
/**
* The default implementation uses a DOMWriter.
* SOAPContentElements overwrite this to optimize DOM callbacks.
Added: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/xop/RestoreXOPElementVisitor.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/xop/RestoreXOPElementVisitor.java 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/xop/RestoreXOPElementVisitor.java 2006-09-26 15:08:20 UTC (rev 1057)
@@ -0,0 +1,73 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.xop;
+
+import org.jboss.ws.soap.SAAJVisitor;
+import org.jboss.ws.soap.SOAPContentElement;
+import org.jboss.ws.soap.SOAPElementImpl;
+
+import java.util.Iterator;
+
+/**
+ * Visit soap object model and restore XOP contents.
+ * This visitor is invoked when:
+ * <ul>
+ * <li>Client side request handler chain has been executed
+ * <li>Server side response or fault handler chain been executed
+ * </ul>
+ *
+ * It basically takes care that when jaxrpc handlers have been in place,
+ * the XOP contents are being restored upon request and response.
+ *
+ * @author Heiko Braun <heiko.braun at jboss.com>
+ * @version $Id$
+ * @since Sep 26, 2006
+ */
+public class RestoreXOPElementVisitor implements SAAJVisitor {
+
+ public void visitXOPElements(SOAPElementImpl root)
+ {
+ boolean isSCE = (root instanceof SOAPContentElement);
+
+ // don't expand SOAPContentElements
+ if(isSCE)
+ {
+ root.accept(this);
+ }
+ else
+ {
+ Iterator it = root.getChildElements();
+ while(it.hasNext())
+ {
+ visitXOPElements((SOAPElementImpl)it.next());
+ }
+ }
+ }
+
+ public void visitSOAPElement(SOAPElementImpl soapElement) {
+ // nada
+ }
+
+ public void visitSOAPContentElement(SOAPContentElement scElement) {
+ scElement.handleMTOMTransitions();
+ }
+}
Property changes on: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/xop/RestoreXOPElementVisitor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/xop/XOPContext.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/xop/XOPContext.java 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/main/java/org/jboss/ws/xop/XOPContext.java 2006-09-26 15:08:20 UTC (rev 1057)
@@ -29,6 +29,7 @@
import org.jboss.ws.soap.MessageContextAssociation;
import org.jboss.ws.soap.NameImpl;
import org.jboss.ws.soap.SOAPMessageImpl;
+import org.jboss.ws.soap.SOAPElementImpl;
import org.jboss.ws.utils.DOMUtils;
import org.jboss.ws.utils.JavaUtils;
import org.jboss.ws.utils.MimeUtils;
@@ -41,18 +42,18 @@
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPBody;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.util.Iterator;
/**
* XOP context associated with a message context.
- * Acts as a facade to the current soap message and supports the various
- * XOP transitions.<p>
+ * Acts as a facade to the current soap message and supports the various XOP transitions.<p>
* A good starting point to understand how MTOM in JBossWS works is to take a
* look at the SOAPContentElement implementation.
*
- * @see org.jboss.ws.soap.SOAPContentElement
+ * @see org.jboss.ws.soap.SOAPContentElement#handleMTOMTransitions()
* @see XOPUnmarshallerImpl
* @see XOPMarshallerImpl
*
@@ -173,12 +174,33 @@
}
/**
+ * Visit the soap object model elements and restore xop data.
+ */
+ public static void visitAndRestoreXOPData()
+ {
+ try
+ {
+ if(!isXOPPackage() && isMTOMEnabled())
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ SOAPBody body = msgContext.getSOAPMessage().getSOAPBody();
+ RestoreXOPElementVisitor visitor = new RestoreXOPElementVisitor();
+ visitor.visitXOPElements((SOAPElementImpl)body);
+ }
+ }
+ catch (SOAPException e)
+ {
+ throw new WSException("Failed to restore XOP data", e);
+ }
+ }
+
+ /**
* Restore previously inlined XOP elements.
* All base64 representations will be replaced by <code>xop:Include</code>
* elements and the attachment parts will be recreated. <br>
* This happens when a SOAPContentElement is written to an output stream.
*/
- public static void restoreXOPData(SOAPElement xopElement)
+ public static void restoreXOPDataDOM(SOAPElement xopElement)
{
String contentType = xopElement.getAttributeNS(NS_XOP_JBOSSWS, "content-type");
if(contentType != null && contentType.length()>0)
@@ -192,7 +214,7 @@
while(it.hasNext())
{
SOAPElement childElement = (SOAPElement)it.next();
- restoreXOPData(childElement);
+ restoreXOPDataDOM(childElement);
}
}
}
@@ -212,7 +234,7 @@
xopObject.setContentType(contentType);
XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
- String cid = xopMarshaller.addMtomAttachment(xopObject, xopElement.getNamespaceURI(), xopElement.getLocalName());
+ String cid = xopMarshaller.addMtomAttachment(xopObject, xopElement.getNamespaceURI(), xopElement.getLocalName());
// remove base64 node with the xop:Include element
org.w3c.dom.Node child = (org.w3c.dom.Node)xopElement.getFirstChild();
@@ -281,8 +303,8 @@
// leave soap object model in a valid state
setXOPMessage(false);
- log.warn("Further MTOM processing disabled. The XOP encoding will not be restored.");
- setMTOMEnabled(false);
+ //log.warn("Further MTOM processing disabled. The XOP encoding will not be restored.");
+ //setMTOMEnabled(false);
}
/**
@@ -325,7 +347,7 @@
{
dataHandler = new DataHandler(o, getContentTypeForClazz(o.getClass()));
}
-
+
return dataHandler;
}
Modified: branches/hbraun/jbossws-1.0/src/test/build.xml
===================================================================
--- branches/hbraun/jbossws-1.0/src/test/build.xml 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/test/build.xml 2006-09-26 15:08:20 UTC (rev 1057)
@@ -384,6 +384,7 @@
<sysproperty key="org.jboss.ws.wsse.trustStorePassword" value="jbossws"/>
<sysproperty key="org.jboss.ws.wsse.keyStoreType" value="jks"/>
<sysproperty key="org.jboss.ws.wsse.trustStoreType" value="jks"/>
+ <sysproperty key="client.scenario" value="${client.scenario}"/>
<classpath>
<path refid="test.client.classpath"/>
<pathelement location="${build.test.dir}/classes"/>
Modified: branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/InlineHandler.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/InlineHandler.java 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/InlineHandler.java 2006-09-26 15:08:20 UTC (rev 1057)
@@ -59,7 +59,7 @@
}
catch (Exception e)
{
- log.warn("Failed to access inline XOP values, ingored:" + e.getMessage());
+ // ingore, happens when simple types are send
}
}
}
Modified: branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2006-09-26 14:56:00 UTC (rev 1056)
+++ branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2006-09-26 15:08:20 UTC (rev 1057)
@@ -82,7 +82,7 @@
DataHandler dh = new DataHandler("Simple type plain text attachment", "text/plain");
byte[] bytesIn = IOUtils.convertToBytes(dh);
((Stub)port)._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
- byte[] bytesOut = port.pingSimple("1|1", bytesIn);
+ byte[] bytesOut = port.pingSimple("s1|s1", bytesIn);
assertNotNull("Return xopContent was null", bytesOut);
assertEquals("Content length doesn't match", bytesIn.length, bytesOut.length);
@@ -93,8 +93,9 @@
DataHandler dh = new DataHandler("Simple type plain text attachment", "text/plain");
byte[] bytesIn = IOUtils.convertToBytes(dh);
((Stub)port)._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
- byte[] bytesOut = port.pingSimple("0|1", bytesIn);
+ byte[] bytesOut = port.pingSimple("s0|s1", bytesIn);
+
assertNotNull("Return xopContent was null", bytesOut);
assertEquals("Content length doesn't match", bytesIn.length, bytesOut.length);
More information about the jboss-svn-commits
mailing list