Author: heiko.braun(a)jboss.com
Date: 2006-12-01 10:44:10 -0500 (Fri, 01 Dec 2006)
New Revision: 1529
Added:
trunk/src/main/java/org/jboss/ws/xop/CreateAttachmentVisitor.java
trunk/src/main/java/org/jboss/ws/xop/JBossXBContentAdapter.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Employee.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecords.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/HRService.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Query.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Status.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPing.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPingImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPingService.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPing.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPingImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPingService.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingDataHandler.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingDataHandlerResponse.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingImage.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingImageResponse.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingSource.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingSourceResponse.java
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/wsdl/EmployeeService.wsdl
trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/service-doclit.wsdl
trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/wsdl0.wsdl
trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/xsd0.xsd
trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/wsdl/service-rpclit.wsdl
Removed:
trunk/.settings/
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPRpcTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPTest.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPTestImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestServiceImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestService_PortType.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestService_Service.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestServiceImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_PortType.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_Service.java
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/wsdl/TestService.wsdl
trunk/src/test/resources/jaxrpc/samples/mtom/attach.gif
trunk/src/test/resources/jaxrpc/samples/mtom/attach.html
trunk/src/test/resources/jaxrpc/samples/mtom/attach.jpeg
trunk/src/test/resources/jaxrpc/samples/mtom/attach.txt
trunk/src/test/resources/jaxrpc/samples/mtom/attach.xml
trunk/src/test/resources/jaxrpc/samples/mtom/disguised_jpeg.xcf
trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/TestService.wsdl
trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/wsdl/TestService.wsdl
Modified:
trunk/src/main/java/org/jboss/ws/common/CommonSOAPBinding.java
trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Deserializer.java
trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Serializer.java
trunk/src/main/java/org/jboss/ws/jbossxb/JBossXBSupport.java
trunk/src/main/java/org/jboss/ws/jbossxb/JBossXBUnmarshallerImpl.java
trunk/src/main/java/org/jboss/ws/jbossxb/SchemaBindingBuilder.java
trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java
trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java
trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
trunk/src/main/java/org/jboss/ws/soap/SOAPMessageImpl.java
trunk/src/main/java/org/jboss/ws/soap/attachment/ByteArrayContentHandler.java
trunk/src/main/java/org/jboss/ws/xop/RestoreXOPElementVisitor.java
trunk/src/main/java/org/jboss/ws/xop/XOPContext.java
trunk/src/main/java/org/jboss/ws/xop/XOPMarshallerImpl.java
trunk/src/main/java/org/jboss/ws/xop/XOPScanner.java
trunk/src/main/java/org/jboss/ws/xop/XOPUnmarshallerImpl.java
trunk/src/test/ant/build-jars-jaxrpc.xml
trunk/src/test/java/org/jboss/test/ws/JBossWSTestSetup.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTestSupport.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPHandlerTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPHandlerTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/jaxrpc-mapping.xml
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/webservices.xml
trunk/src/test/resources/jaxrpc/samples/mtom/META-INF/application-client.xml
trunk/src/test/resources/jaxrpc/samples/mtom/META-INF/jboss-client.xml
trunk/src/test/resources/jaxrpc/samples/mtom/WEB-INF/web.xml
trunk/src/test/resources/jaxrpc/samples/mtom/wstools-config.xml
trunk/src/test/resources/jaxrpc/xop/doclit/META-INF/application-client.xml
trunk/src/test/resources/jaxrpc/xop/doclit/META-INF/jboss-client.xml
trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/jaxrpc-mapping.xml
trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/web.xml
trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/webservices.xml
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/META-INF/application-client.xml
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/META-INF/jboss-client.xml
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/WEB-INF/webservices.xml
trunk/src/test/resources/jaxrpc/xop/rpclit/META-INF/application-client.xml
trunk/src/test/resources/jaxrpc/xop/rpclit/META-INF/jboss-client.xml
trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/jaxrpc-mapping.xml
trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/web.xml
trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/webservices.xml
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/META-INF/application-client.xml
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/META-INF/jboss-client.xml
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/WEB-INF/webservices.xml
trunk/src/test/resources/jaxrpc/xop/schema.xsd
Log:
merged MTOM codebase from branch 1.x
Modified: trunk/src/main/java/org/jboss/ws/common/CommonSOAPBinding.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/common/CommonSOAPBinding.java 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/main/java/org/jboss/ws/common/CommonSOAPBinding.java 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -787,7 +787,7 @@
// When a potential xop parameter is detected and MTOM is enabled
// we flag the SOAP message as a XOP package
- if (paramMetaData.isXOP() && XOPContext.isMTOMEnabled())
+ if (paramMetaData.isXOP() && XOPContext.isMTOMEnabled())
{
log.trace("Add parameter as XOP");
CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
@@ -885,7 +885,7 @@
// When a potential XOP parameter is detected and
// the incomming request is actuall XOP encoded we flag
// the SOAP message a XOP packaged.
- if (paramMetaData.isXOP() && XOPContext.isMultipartXOP())
+ if (paramMetaData.isXOP() && XOPContext.isXOPEncodedRequest())
{
SOAPMessageImpl soapMessage =
(SOAPMessageImpl)MessageContextAssociation.peekMessageContext().getSOAPMessage();
soapMessage.setXOPMessage(true);
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Deserializer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Deserializer.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Deserializer.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -56,7 +56,7 @@
byte[] value = null;
String valueStr = unwrapValueStr(xmlFragment);
- if(XOPContext.isXOPPackage())
+ if(XOPContext.isXOPMessage())
{
try
{
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Serializer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Serializer.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/encoding/Base64Serializer.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -56,7 +56,7 @@
String xmlFragment = null;
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- if(XOPContext.isXOPPackage())
+ if(XOPContext.isXOPMessage())
{
XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
XOPObject xopObject = new XOPObject(value);
Modified: trunk/src/main/java/org/jboss/ws/jbossxb/JBossXBSupport.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jbossxb/JBossXBSupport.java 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/main/java/org/jboss/ws/jbossxb/JBossXBSupport.java 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -45,7 +45,7 @@
QName xmlName = (QName)properties.get(JBossXBConstants.JBXB_ROOT_QNAME);
QName xmlType = (QName)properties.get(JBossXBConstants.JBXB_TYPE_QNAME);
- // Get the eagerly initialized SchameBinding from the ServiceMetaData
+ // Get the eagerly initialized SchemaBinding from the ServiceMetaData
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (msgContext != null)
{
Modified: trunk/src/main/java/org/jboss/ws/jbossxb/JBossXBUnmarshallerImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jbossxb/JBossXBUnmarshallerImpl.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/main/java/org/jboss/ws/jbossxb/JBossXBUnmarshallerImpl.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -23,14 +23,13 @@
// $Id$
-import java.io.InputStream;
-import java.util.HashMap;
-
import org.jboss.ws.WSException;
import org.jboss.ws.xop.XOPUnmarshallerImpl;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.UnmarshallerFactory;
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import java.io.InputStream;
+import java.util.HashMap;
/**
* An implementation of a JAXB Unmarshaller.
@@ -53,7 +52,9 @@
org.jboss.xb.binding.Unmarshaller unm =
UnmarshallerFactory.newInstance().newUnmarshaller();
SchemaBinding schemaBinding = JBossXBSupport.getOrCreateSchemaBinding(properties);
- schemaBinding.setXopUnmarshaller(new XOPUnmarshallerImpl());
+ XOPUnmarshallerImpl xopUnmarshaller = new XOPUnmarshallerImpl();
+ schemaBinding.setXopUnmarshaller(xopUnmarshaller);
+
try
{
return unm.unmarshal(is, schemaBinding);
Modified: trunk/src/main/java/org/jboss/ws/jbossxb/SchemaBindingBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jbossxb/SchemaBindingBuilder.java 2006-12-01 13:40:09
UTC (rev 1528)
+++ trunk/src/main/java/org/jboss/ws/jbossxb/SchemaBindingBuilder.java 2006-12-01 15:44:10
UTC (rev 1529)
@@ -30,6 +30,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.jaxrpcmapping.*;
import org.jboss.ws.utils.JBossWSEntityResolver;
+import org.jboss.ws.xop.JBossXBContentAdapter;
import org.jboss.xb.binding.metadata.ClassMetaData;
import org.jboss.xb.binding.metadata.PackageMetaData;
import org.jboss.xb.binding.metadata.PropertyMetaData;
@@ -80,6 +81,9 @@
bindSchemaToJava(schemaBinding, wsdlMapping);
}
+ // setup MTOM handler
+ JBossXBContentAdapter.register(schemaBinding);
+
return schemaBinding;
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java 2006-12-01 13:40:09
UTC (rev 1528)
+++ trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java 2006-12-01 15:44:10
UTC (rev 1529)
@@ -438,7 +438,7 @@
out++;
if (in > 1 || out > (oneWay ? 0 : 1))
- throw new WSException("The body of a documnet/literal bare message
requires at most 1 input and at most 1 output (or 0 if oneway). method: " + javaName
+ " in: "
+ throw new WSException("The body of a document/literal bare message
requires at most 1 input and at most 1 output (or 0 if oneway). method: " + javaName
+ " in: "
+ in + " out: " + out);
}
}
Modified: trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -38,6 +38,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
+import org.jboss.ws.xop.XOPContext;
import org.jboss.ws.binding.BindingException;
import org.jboss.ws.common.CommonBindingProvider;
import org.jboss.ws.common.CommonMessageContext;
@@ -260,6 +261,7 @@
// Set the outbound headers
if (headerSource != null)
{
+ XOPContext.eagerlyCreateAttachments();
resMessage.saveChanges();
headerSource.setMimeHeaders(resMessage.getMimeHeaders());
}
Modified: trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -47,6 +47,7 @@
import org.jboss.ws.binding.soap.SOAPMessageMarshaller;
import org.jboss.ws.binding.soap.SOAPMessageUnMarshaller;
import org.jboss.ws.jaxrpc.StubExt;
+import org.jboss.ws.xop.XOPContext;
/**
* SOAPConnection implementation
@@ -151,6 +152,13 @@
callProps = null;
}
+ // enforce xop transitions
+ // TODO: there should be a clear transition to an immutable object model
+ XOPContext.eagerlyCreateAttachments();
+
+ // save object model changes
+ if (reqMessage.saveRequired()) reqMessage.saveChanges();
+
try
{
// Get the invoker from Remoting for a given endpoint address
@@ -263,9 +271,6 @@
mimeHeaders.setHeader("SOAPAction", "\"\"");
}
- if (reqMessage.saveRequired())
- reqMessage.saveChanges();
-
Map<String, Object> metadata = new HashMap<String, Object>();
// We need to unmarshall faults (HTTP 500)
Modified: trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -23,21 +23,10 @@
// $Id$
-import java.io.IOException;
-import java.io.Writer;
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.util.Iterator;
-
-import javax.activation.DataHandler;
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.soap.attachment.SwapableMemoryDataSource;
import org.jboss.ws.binding.BindingException;
import org.jboss.ws.binding.DeserializerSupport;
import org.jboss.ws.binding.SerializationContext;
@@ -52,15 +41,24 @@
import org.jboss.ws.utils.DOMUtils;
import org.jboss.ws.utils.DOMWriter;
import org.jboss.ws.utils.JavaUtils;
+import org.jboss.ws.utils.MimeUtils;
import org.jboss.ws.xop.XOPContext;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.TypeInfo;
+import org.w3c.dom.*;
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.activation.DataHandler;
+import javax.activation.DataSource;
+import java.io.IOException;
+import java.io.Writer;
+import java.io.InputStream;
+import java.io.ByteArrayOutputStream;
+import java.lang.reflect.Array;
+import java.lang.reflect.Method;
+import java.util.Iterator;
+
/**
* A SOAPElement that gives access to its content as XML fragment or Java object.
*
@@ -287,27 +285,32 @@
if (isAssignable == false)
{
- Object convertedObj = null;
+ // handle XOP simple types, i.e. in RPC/LIT
+ try
+ {
+ String contentType = MimeUtils.resolveMimeType(javaType);
+ log.debug("Adopt DataHandler to " + javaType +",
contentType "+ contentType);
- if (obj instanceof DataHandler)
- {
- try
+ DataSource ds = new
SwapableMemoryDataSource(((DataHandler)obj).getInputStream(), contentType);
+ DataHandler dh = new DataHandler(ds);
+ obj = dh.getContent();
+
+ // 'application/octet-stream' will return a byte[] instead
fo the stream
+ if(obj instanceof InputStream)
{
- convertedObj = ((DataHandler)obj).getContent();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ dh.writeTo(bout);
+ obj = bout.toByteArray();
}
- catch (IOException e)
- {
- throw new WSException("Failed to convert unassignable
endpoint parameter", e);
- }
}
-
- if (null == convertedObj || !JavaUtils.isAssignableFrom(javaType,
convertedObj.getClass())) // conversion failed
+ catch (IOException e)
{
- throw new WSException("Java type '" + javaType +
"' is not assignable from: " + objType.getName());
+ throw new WSException("Failed to adopt XOP content type",
e);
}
- else
+
+ if(!JavaUtils.isAssignableFrom(javaType, obj.getClass()))
{
- obj = convertedObj;
+ throw new WSException("Java type '" + javaType +
"' is not assignable from: " + objType.getName());
}
}
}
@@ -810,7 +813,7 @@
// DOM expansion should only happen when a handler accesses the DOM API.
CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
- if (msgContext != null && UnifiedMetaData.isFinalRelease() == false)
+ if (msgContext != null && !UnifiedMetaData.isFinalRelease())
{
Boolean allowExpand =
(Boolean)msgContext.getProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
if (Boolean.TRUE.equals(allowExpand) == false)
@@ -989,9 +992,9 @@
* When a SOAPContentElement transitions between dom-valid and xml-valid
* the XOP elements need to transition from XOP optimized to base64 and
reverse.<p>
*
- * If MTOM is disabled through a message context property,
- * then we always enforce the inlined representation by expanding to DOM,
- * the same happens when a JAXRPC handler accesses the SOAPContentElement.<p>
+ * If MTOM is disabled through a message context property we always enforce the
+ * base64 representation by expanding to DOM, the same happens when a JAXRPC handler
+ * accesses the SOAPContentElement.<p>
*
* If the element is in dom-valid state (because a handlers accessed it), upon
marshalling
* it's needs to be decided wether or not the <code>xop:Include</code>
should be restored.
@@ -999,31 +1002,30 @@
*/
public void handleMTOMTransitions()
{
+ // MTOM processing is only required on XOP parameters
+ if( isXOPParameter() == false)
+ return;
- boolean mtomEnabled = isXOPParameter() && XOPContext.isMTOMEnabled();
-
- if (paramMetaData != null && mtomEnabled == false)
+ if ( !XOPContext.isMTOMEnabled() )
{
- // If MTOM is disabled, we force dom expansion.
- // This will inline any XOP include element
- // and remove the attachment part when transitioning.
+ // If MTOM is disabled, we force dom expansion on XOP parameters.
+ // This will inline any XOP include element and remove the attachment part.
// See SOAPFactoryImpl for details.
- log.debug("MTOM disabled: Enforce dom-valid state");
+ log.debug("MTOM disabled: Force inline XOP data");
CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
msgContext.setProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
expandToDOM();
}
- else if (isDOMValid && mtomEnabled)
+ else if ( isDOMValid && XOPContext.isMTOMEnabled() )
{
// When the DOM representation is valid,
- // and MTOM is enabled we need to convert the inlined
+ // but MTOM is enabled we need to convert the inlined
// element back to an xop:Include element and create the attachment part
log.debug("MTOM enabled: Restore XOP data");
XOPContext.restoreXOPDataDOM(this);
}
-
}
private boolean isXOPParameter()
Modified: trunk/src/main/java/org/jboss/ws/soap/SOAPMessageImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/soap/SOAPMessageImpl.java 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/main/java/org/jboss/ws/soap/SOAPMessageImpl.java 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -213,27 +213,32 @@
{
try
{
- if (isXOPMessage() && !XOPContext.isMTOMEnabled() &&
attachments.size() > 0)
+ boolean hasAttachments = attachments.size() > 0;
+
+ if (isXOPMessage() && !XOPContext.isMTOMEnabled() &&
hasAttachments)
throw new IllegalStateException("XOP parameter not properly
inlined");
-
- String contentType;
- if (isXOPMessage() && XOPContext.isMTOMEnabled())
+
+ // default content-type
+ String contentType = MimeConstants.TYPE_SOAP11 + "; charset=" +
getCharSetEncoding();
+
+ if (hasAttachments)
{
- multipartRelatedEncoder = new MultipartRelatedXOPEncoder(this);
- multipartRelatedEncoder.encodeMultipartRelatedMessage();
- contentType = multipartRelatedEncoder.getContentType();
+ if (isXOPMessage() && XOPContext.isMTOMEnabled())
+ {
+ multipartRelatedEncoder = new MultipartRelatedXOPEncoder(this);
+ multipartRelatedEncoder.encodeMultipartRelatedMessage();
+ contentType = multipartRelatedEncoder.getContentType();
+ }
+ else
+ {
+ multipartRelatedEncoder = new MultipartRelatedSwAEncoder(this);
+ multipartRelatedEncoder.encodeMultipartRelatedMessage();
+ contentType = multipartRelatedEncoder.getContentType();
+ }
}
- else if (attachments.size() > 0)
- {
- multipartRelatedEncoder = new MultipartRelatedSwAEncoder(this);
- multipartRelatedEncoder.encodeMultipartRelatedMessage();
- contentType = multipartRelatedEncoder.getContentType();
- }
- else
- {
- contentType = MimeConstants.TYPE_SOAP11 + "; charset=" +
getCharSetEncoding();
- }
+
mimeHeaders.setHeader(MimeConstants.CONTENT_TYPE, contentType);
+
}
catch (MessagingException ex)
{
@@ -406,4 +411,4 @@
iterator.remove();
}
}
-}
\ No newline at end of file
+}
Modified: trunk/src/main/java/org/jboss/ws/soap/attachment/ByteArrayContentHandler.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/soap/attachment/ByteArrayContentHandler.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/main/java/org/jboss/ws/soap/attachment/ByteArrayContentHandler.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -22,10 +22,12 @@
package org.jboss.ws.soap.attachment;
import org.jboss.ws.utils.MimeUtils;
+import org.jboss.ws.utils.IOUtils;
import javax.activation.ActivationDataFlavor;
import javax.activation.DataContentHandler;
import javax.activation.DataSource;
+import javax.activation.DataHandler;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.ByteArrayInputStream;
@@ -57,12 +59,15 @@
}
public void writeTo(Object object, String string, OutputStream outputStream) throws
IOException {
+
if(object instanceof byte[])
{
- // this actually depends on the SwapableMemoryDataSource
- // todo: why is not always a ByteArrayInputStream ?
outputStream.write((byte[])object);
}
+ else if(object instanceof DataHandler)
+ {
+ IOUtils.copyStream(outputStream, ((DataHandler)object).getInputStream());
+ }
else
{
MimeUtils.ByteArrayConverter converter =
MimeUtils.getConverterForJavaType(object.getClass());
Added: trunk/src/main/java/org/jboss/ws/xop/CreateAttachmentVisitor.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/xop/CreateAttachmentVisitor.java 2006-12-01 13:40:09
UTC (rev 1528)
+++ trunk/src/main/java/org/jboss/ws/xop/CreateAttachmentVisitor.java 2006-12-01 15:44:10
UTC (rev 1529)
@@ -0,0 +1,89 @@
+/*
+* 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.SOAPElementImpl;
+import org.jboss.ws.soap.SOAPContentElement;
+
+import java.util.Iterator;
+import java.io.Writer;
+import java.io.IOException;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: CreateAttachmentVisitor.java 1408 2006-11-07 13:42:25Z
heiko.braun(a)jboss.com $
+ * @since Nov 7, 2006
+ */
+public class CreateAttachmentVisitor 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())
+ {
+ final Object o = it.next();
+ if(o instanceof SOAPElementImpl)
+ visitXOPElements((SOAPElementImpl)o);
+ }
+ }
+ }
+
+ public void visitSOAPElement(SOAPElementImpl soapElement) {
+ // nada
+ }
+
+ public void visitSOAPContentElement(SOAPContentElement scElement) {
+ // Calling writeElement will enforce marshalling of this object
+ // Any attachment will be created while doing this.
+ try
+ {
+ scElement.writeElement( new NoopWriter() );
+ }
+ catch (IOException e)
+ {
+ //
+ }
+ }
+
+ class NoopWriter extends Writer {
+ public void write(char cbuf[], int off, int len) throws IOException {
+
+ }
+
+ public void flush() throws IOException {
+
+ }
+
+ public void close() throws IOException {
+
+ }
+ }
+}
Added: trunk/src/main/java/org/jboss/ws/xop/JBossXBContentAdapter.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/xop/JBossXBContentAdapter.java 2006-12-01 13:40:09
UTC (rev 1528)
+++ trunk/src/main/java/org/jboss/ws/xop/JBossXBContentAdapter.java 2006-12-01 15:44:10
UTC (rev 1529)
@@ -0,0 +1,234 @@
+/*
+* 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.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.soap.attachment.ContentHandlerRegistry;
+import org.jboss.ws.soap.attachment.SwapableMemoryDataSource;
+import org.jboss.ws.utils.IOUtils;
+import org.jboss.ws.utils.MimeUtils;
+import org.jboss.xb.binding.sunday.marshalling.MarshallingContext;
+import org.jboss.xb.binding.sunday.marshalling.TermBeforeMarshallingCallback;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TermBeforeSetParentCallback;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.UnmarshallingContext;
+
+import javax.activation.DataHandler;
+import javax.activation.DataSource;
+import javax.xml.namespace.QName;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Adopts raw binary contents to java types.
+ * This class works in conjunction with the <code>XOPUnmarshallerImpl</code>
+ * and <code>XOPMarshallerImpl</code>.
+ *
+ * @see XOPUnmarshallerImpl
+ * @see XOPMarshallerImpl
+ *
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: JBossXBContentAdapter.java 1322 2006-10-27 13:27:04Z
heiko.braun(a)jboss.com $
+ * @since Oct 19, 2006
+ */
+public class JBossXBContentAdapter implements TermBeforeMarshallingCallback,
TermBeforeSetParentCallback {
+
+ private static final Logger log = Logger.getLogger(JBossXBContentAdapter.class);
+ private static final QName XMIME_BASE_64 = new QName(Constants.NS_XML_MIME,
"base64Binary");
+ private static final QName XOP_INCLUDE = new QName(Constants.NS_XOP,
"Include");
+
+ static
+ {
+ // Load JAF content handlers
+ ContentHandlerRegistry.register();
+ }
+
+ /**
+ * When XOP is disabled we need to convert java types to byte[]
+ * before handing off to XB.
+ */
+ public Object beforeMarshalling(Object object, MarshallingContext marshallingContext)
{
+
+ boolean mtomDisabled = !XOPContext.isMTOMEnabled();
+ boolean convertableType = object!=null && !(object instanceof byte[]);
+
+ if( mtomDisabled && convertableType )
+ {
+ String contentType = MimeUtils.resolveMimeType(object);
+ log.debug("Adopt " + object.getClass() + " to byte[], contentType
" + contentType);
+
+ DataHandler dh = new DataHandler(object, contentType);
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ try
+ {
+ IOUtils.copyStream(bout, dh.getInputStream());
+ object = bout.toByteArray();
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to adopt XOP content type", e);
+ }
+ }
+
+ return object;
+ }
+
+ /**
+ * When XOP is disabled (inlined request) we receive a byte[] from XB
+ * that needs to be converted in to java type
+ */
+ public Object beforeSetParent(Object object, UnmarshallingContext ctx) {
+
+ if(null==object)
+ return object;
+
+ // may be null when it's actually an encoded request ?!
+ Class targetClass = ctx.resolvePropertyType();
+
+ if(null==targetClass) {
+ throw new WSException("Failed to resolve target property type on "+
ctx.getParticle());
+ }
+
+ boolean isRegularMessage = !XOPContext.isXOPMessage();
+ boolean isSimpleType = (object instanceof byte[]);
+ boolean doTypesMatch = ( targetClass.equals(object.getClass()) );
+
+ // Handle inlined requests.
+ // In this case XB treats binaries as simple types that are unmarshalled to byte[]
+ // Still type conversion will be necessary.
+ if( isRegularMessage && isSimpleType && !doTypesMatch)
+ {
+ String contentType = MimeUtils.resolveMimeType(targetClass);
+ log.debug("Adopt byte[] to " + targetClass +", contentType
"+ contentType);
+
+ try
+ {
+ DataHandler dh = new DataHandler(
+ wrapAsDataSource(object, contentType)
+ );
+
+ if(targetClass.equals(DataHandler.class))
+ object = dh;
+ else
+ object = dh.getContent();
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to adopt XOP content type", e);
+ }
+ }
+
+ // Handle XOP encoded requests.
+ // XB will use the XOPUnmarshaller callback and receive a DataHandler instance.
+ // In this case we are be able to instantiate the correct content object
+ // from the data handler, with the exception of content-type
'application/octet-stream'.
+ // These attachments will be returned as DataHandler instances.
+ else if(XOPContext.isXOPMessage() && (object instanceof DataHandler)
&& !doTypesMatch)
+ {
+ try
+ {
+ String contentType = MimeUtils.resolveMimeType(targetClass);
+ log.debug("Adopt DataHandler to " + targetClass +",
contentType "+ contentType);
+
+ DataHandler dh = new DataHandler(
+ wrapAsDataSource(object, contentType)
+ );
+ object = dh.getContent();
+
+ // 'application/octet-stream' will return a byte[] instead fo the
stream
+ if(object instanceof InputStream)
+ {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ dh.writeTo(bout);
+ object = bout.toByteArray();
+ }
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to adopt XOP content type", e);
+ }
+ }
+
+ return object;
+ }
+
+ private DataSource wrapAsDataSource(Object object, String contentType) throws
IOException {
+
+ DataSource ds;
+
+ if(object instanceof byte[])
+ {
+ ds = new SwapableMemoryDataSource(new ByteArrayInputStream((byte[])object),
contentType);
+ }
+ else if(object instanceof DataHandler)
+ {
+ ds = new SwapableMemoryDataSource(((DataHandler)object).getInputStream(),
contentType);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Failed to wrap as data source:
"+object.getClass());
+ }
+
+ return ds;
+ }
+
+ /**
+ * A factory method that registers the XB (un)marshalling adapters with schema
binding.
+ * These adapters convert java types into byte[] and reverse,
+ * in order to match the jaxrpc-mapping declaration in case we receive or send an
inlined request.
+ */
+ public static void register(SchemaBinding schemaBinding)
+ {
+ JBossXBContentAdapter contentAdapter = new JBossXBContentAdapter();
+
+ // base64 simple types
+ TypeBinding base64Type =
schemaBinding.getType(org.jboss.xb.binding.Constants.QNAME_BASE64BINARY);
+ base64Type.setBeforeMarshallingCallback( contentAdapter );
+ base64Type.setBeforeSetParentCallback( contentAdapter );
+
+ // xmime complex types
+ TypeBinding xmimeBase64Type = schemaBinding.getType(XMIME_BASE_64);
+ if(xmimeBase64Type!=null)
+ {
+ xmimeBase64Type.setBeforeMarshallingCallback( contentAdapter );
+ xmimeBase64Type.setBeforeSetParentCallback( contentAdapter );
+
+ // xop:Include
+ /*ModelGroupBinding modelGroup =
(ModelGroupBinding)xmimeBase64Type.getParticle().getTerm();
+ ParticleBinding particle =
(ParticleBinding)modelGroup.getParticles().iterator().next();
+ ElementBinding xopInclude = (ElementBinding)particle.getTerm();
+
+ if(! xopInclude.getQName().equals(XOP_INCLUDE))
+ throw new WSException("Looks like the JBossXB XOP implementation has
changed, please open a JIRA issue");
+
+ xopInclude.setBeforeMarshallingCallback(contentAdapter);
+ xopInclude.setBeforeSetParentCallback(contentAdapter);
+ */
+ }
+ }
+
+}
Modified: trunk/src/main/java/org/jboss/ws/xop/RestoreXOPElementVisitor.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/xop/RestoreXOPElementVisitor.java 2006-12-01 13:40:09
UTC (rev 1528)
+++ trunk/src/main/java/org/jboss/ws/xop/RestoreXOPElementVisitor.java 2006-12-01 15:44:10
UTC (rev 1529)
@@ -58,7 +58,9 @@
Iterator it = root.getChildElements();
while(it.hasNext())
{
- visitXOPElements((SOAPElementImpl)it.next());
+ final Object o = it.next();
+ if(o instanceof SOAPElementImpl)
+ visitXOPElements((SOAPElementImpl)o);
}
}
}
Modified: trunk/src/main/java/org/jboss/ws/xop/XOPContext.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/xop/XOPContext.java 2006-12-01 13:40:09 UTC (rev
1528)
+++ trunk/src/main/java/org/jboss/ws/xop/XOPContext.java 2006-12-01 15:44:10 UTC (rev
1529)
@@ -28,8 +28,9 @@
import org.jboss.ws.jaxrpc.StubExt;
import org.jboss.ws.soap.MessageContextAssociation;
import org.jboss.ws.soap.NameImpl;
+import org.jboss.ws.soap.SOAPElementImpl;
import org.jboss.ws.soap.SOAPMessageImpl;
-import org.jboss.ws.soap.SOAPElementImpl;
+import org.jboss.ws.soap.attachment.MimeConstants;
import org.jboss.ws.utils.DOMUtils;
import org.jboss.ws.utils.JavaUtils;
import org.jboss.ws.utils.MimeUtils;
@@ -39,10 +40,7 @@
import javax.activation.DataHandler;
import javax.xml.namespace.QName;
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPBody;
+import javax.xml.soap.*;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.util.Iterator;
@@ -66,11 +64,12 @@
private static final Logger log = Logger.getLogger(XOPContext.class);
private static final String NS_XOP_JBOSSWS = "http://org.jboss.ws/xop";
-
+
/**
- * Check if the current soap message flagged as a XOP package?
+ * Check if the current soap message flagged as a XOP package.
+ * This may differ from the wire format when jaxrpc handlers are in place.
*/
- public static boolean isXOPPackage() {
+ public static boolean isXOPMessage() {
boolean isXOP = false;
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if(msgContext!=null) {
@@ -83,7 +82,7 @@
/**
* Check if the wire format is actually a xop encoded multipart message
*/
- public static boolean isMultipartXOP()
+ public static boolean isXOPEncodedRequest()
{
boolean isMultippartXOP = false;
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
@@ -94,7 +93,7 @@
{
for(String value : contentType)
{
- if(value.indexOf("application/xop+xml") != -1)
+ if(value.indexOf(MimeConstants.TYPE_APPLICATION_XOP_XML) != -1)
{
isMultippartXOP = true;
break;
@@ -174,13 +173,45 @@
}
/**
+ * The XOP attachments need to be created before the actual message is written
+ * to an output stream. This is necessary because it changes the overall message
content-type.
+ * If we would do this lazily (i.e. upon remoting callback) the previous content-type
+ * would already have been written.
+ *
+ * @see org.jboss.ws.soap.SOAPConnectionImpl#callInternal(javax.xml.soap.SOAPMessage,
Object, boolean)
+ * @see org.jboss.ws.binding.soap.SOAPMessageMarshaller#write(Object,
java.io.OutputStream)
+ */
+ public static void eagerlyCreateAttachments()
+ {
+ if(!isXOPMessage())
+ return;
+
+ try
+ {
+ CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
+ SOAPMessage soapMessage = msgContext != null ? msgContext.getSOAPMessage() :
null;
+ SOAPBody body = soapMessage!=null ? soapMessage.getSOAPBody() : null;
+
+ if(body!=null)
+ {
+ CreateAttachmentVisitor visitor = new CreateAttachmentVisitor();
+ visitor.visitXOPElements((SOAPElementImpl)body);
+ }
+ }
+ catch (SOAPException e)
+ {
+ throw new WSException("Failed to eagerly create XOP attachments", e);
+ }
+ }
+
+ /**
* Visit the soap object model elements and restore xop data.
*/
public static void visitAndRestoreXOPData()
{
try
{
- if(!isXOPPackage() && isMTOMEnabled())
+ if(!isXOPMessage() && isMTOMEnabled())
{
CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
SOAPBody body = msgContext.getSOAPMessage().getSOAPBody();
@@ -245,6 +276,8 @@
SOAPElement xopInclude =
xopElement.addChildElement(Constants.NAME_XOP_INCLUDE);
xopInclude.setAttribute("href", cid);
log.debug("Restored xop:Include element on
[xmlName="+xopElement.getLocalName()+"]");
+
+ XOPContext.setXOPMessage(true);
}
catch (SOAPException e)
{
@@ -303,8 +336,6 @@
// 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);
}
/**
Modified: trunk/src/main/java/org/jboss/ws/xop/XOPMarshallerImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/xop/XOPMarshallerImpl.java 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/main/java/org/jboss/ws/xop/XOPMarshallerImpl.java 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -23,14 +23,11 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.CommonMessageContext;
import org.jboss.ws.soap.MessageContextAssociation;
-
import org.jboss.ws.soap.SOAPMessageImpl;
-import org.jboss.ws.soap.attachment.MimeConstants;
import org.jboss.ws.soap.attachment.ContentHandlerRegistry;
-import org.jboss.ws.common.CommonMessageContext;
-import org.jboss.ws.utils.IOUtils;
-import org.jboss.ws.WSException;
+import org.jboss.ws.soap.attachment.MimeConstants;
import org.jboss.xb.binding.sunday.xop.XOPMarshaller;
import org.jboss.xb.binding.sunday.xop.XOPObject;
@@ -39,7 +36,7 @@
import javax.xml.soap.AttachmentPart;
/**
- * The XOPMarshallerImpl allows callbacks from the binding layer towards the
+ * The XOPUnmarshallerImpl allows callbacks from the binding layer towards the
* soap processing components in order to optimize binary processing.
*
* @see org.jboss.ws.xop.XOPUnmarshallerImpl
@@ -60,7 +57,7 @@
public boolean isXOPPackage()
{
- return XOPContext.isXOPPackage();
+ return XOPContext.isXOPMessage();
}
public String addMtomAttachment(XOPObject obj, String elementNamespace, String
elementName)
Modified: trunk/src/main/java/org/jboss/ws/xop/XOPScanner.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/xop/XOPScanner.java 2006-12-01 13:40:09 UTC (rev
1528)
+++ trunk/src/main/java/org/jboss/ws/xop/XOPScanner.java 2006-12-01 15:44:10 UTC (rev
1529)
@@ -23,8 +23,8 @@
import org.apache.xerces.xs.*;
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
/**
* Scans complex type definitions for nested XOP type declarations.
Modified: trunk/src/main/java/org/jboss/ws/xop/XOPUnmarshallerImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/xop/XOPUnmarshallerImpl.java 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/main/java/org/jboss/ws/xop/XOPUnmarshallerImpl.java 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -22,17 +22,18 @@
package org.jboss.ws.xop;
import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.soap.attachment.ContentHandlerRegistry;
import org.jboss.xb.binding.sunday.xop.XOPObject;
import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.SOAPException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.InputStream;
/**
* The XOPUnmarshallerImpl allows callbacks from the binding layer towards the
@@ -47,6 +48,7 @@
public class XOPUnmarshallerImpl implements XOPUnmarshaller {
private static final Logger log = Logger.getLogger(XOPUnmarshallerImpl.class);
+ private static final QName XOP_INCLUDE = new QName(Constants.NS_XOP,
"Include");
static
{
@@ -56,41 +58,27 @@
public boolean isXOPPackage()
{
- return XOPContext.isXOPPackage();
+ return XOPContext.isXOPMessage();
}
public XOPObject getAttachmentAsDataHandler(String cid)
- {
+ {
try
{
AttachmentPart part = XOPContext.getAttachmentByCID(cid);
- Object content = part.getDataHandler().getContent();
+ DataHandler dataHandler = part.getDataHandler();
+ String contentType = dataHandler.getContentType();
- // TODO: XB should actually be able to process any content
- if(content instanceof InputStream)
- {
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- part.getDataHandler().writeTo(bout);
- content = bout.toByteArray();
- }
- else
- {
- throw new WSException("Unsupported content type " + content);
- }
+ // Wrapping the DataHandler shields XB from the JAF dependency
+ XOPObject xopObject = new XOPObject(dataHandler);
+ xopObject.setContentType(contentType);
- XOPObject xopObject = new XOPObject(content);
- xopObject.setContentType(part.getDataHandler().getContentType());
-
return xopObject;
}
catch(SOAPException e)
{
throw new WSException("Failed to access attachment part", e);
}
- catch(IOException e)
- {
- throw new WSException("Failed to extract attachment data", e);
- }
}
public byte[] getAttachmentAsByteArray(String cid)
Modified: trunk/src/test/ant/build-jars-jaxrpc.xml
===================================================================
--- trunk/src/test/ant/build-jars-jaxrpc.xml 2006-12-01 13:40:09 UTC (rev 1528)
+++ trunk/src/test/ant/build-jars-jaxrpc.xml 2006-12-01 15:44:10 UTC (rev 1529)
@@ -16,7 +16,7 @@
<!-- Building -->
<!-- ================================================================== -->
- <target name="build-jars" description="Build the
deployments.">
+ <target name="build-jars" description="Build the jaxrpc
deployments">
<!-- jaxrpc-anonymous -->
<war warfile="${build.tests.dir}/libs/jaxrpc-anonymous.war"
webxml="${build.tests.dir}/resources/jaxrpc/anonymous/WEB-INF/web.xml">
@@ -1355,8 +1355,8 @@
<!-- jaxrpc-samples-mtom -->
<war warfile="${build.tests.dir}/libs/jaxrpc-samples-mtom.war"
webxml="${build.tests.dir}/resources/jaxrpc/samples/mtom/WEB-INF/web.xml">
<classes dir="${build.tests.dir}/classes">
- <include
name="org/jboss/test/ws/jaxrpc/samples/mtom/XOPTestImpl.class"/>
- <include
name="org/jboss/test/ws/jaxrpc/samples/mtom/XOPTest.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/samples/mtom/**"/>
+ <exclude
name="org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.class"/>
</classes>
<webinf
dir="${build.tests.dir}/resources/jaxrpc/samples/mtom/WEB-INF">
<include name="jaxrpc-mapping.xml"/>
@@ -2063,7 +2063,7 @@
</metainf>
</jar>
- <!-- jaxrpc-xop-doclit -->
+ <!-- jaxrpc-xop-doclit without handlers -->
<war warfile="${build.tests.dir}/libs/jaxrpc-xop-doclit.war"
webxml="${build.tests.dir}/resources/jaxrpc/xop/doclit/WEB-INF/web.xml">
<classes dir="${build.tests.dir}/classes">
<include name="org/jboss/test/ws/jaxrpc/xop/doclit/*.class"/>
Modified: trunk/src/test/java/org/jboss/test/ws/JBossWSTestSetup.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/JBossWSTestSetup.java 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/JBossWSTestSetup.java 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -76,6 +76,7 @@
delegate.undeploy(archive);
}
}
+
if (isJ2EEClient)
{
URL archiveURL = delegate.getArchiveURL(archive);
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Employee.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Employee.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Employee.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,60 @@
+/*
+* 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.test.ws.jaxrpc.samples.mtom;
+
+import javax.activation.DataHandler;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: Employee.java 1323 2006-10-27 14:55:38Z heiko.braun(a)jboss.com $
+ * @since Oct 27, 2006
+ */
+public class Employee {
+
+ private String firstname;
+ private String lastname;
+ private DataHandler legacyData;
+
+ public String getFirstname() {
+ return firstname;
+ }
+
+ public void setFirstname(String firstname) {
+ this.firstname = firstname;
+ }
+
+ public String getLastname() {
+ return lastname;
+ }
+
+ public void setLastname(String lastname) {
+ this.lastname = lastname;
+ }
+
+ public DataHandler getLegacyData() {
+ return legacyData;
+ }
+
+ public void setLegacyData(DataHandler legacyData) {
+ this.legacyData = legacyData;
+ }
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecords.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecords.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecords.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,47 @@
+/*
+ * 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.test.ws.jaxrpc.samples.mtom;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import javax.activation.DataHandler;
+import javax.xml.transform.Source;
+
+/**
+ * Service Endpoint Interface for XOP
+ *
+ * image/gif java.awt.Image
+ * image/jpeg java.awt.Image
+ * text/plain java.lang.String
+ * multipart/* javax.mail.internet.MimeMultipart
+ * text/xml javax.xml.transform.Source
+ * application/xml javax.xml.transform.Source
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Jan-2006
+ */
+public interface EmployeeRecords extends Remote
+{
+ public Status updateEmployee(Employee employee) throws RemoteException;
+ public Employee queryEmployee(Query query) throws RemoteException;
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,96 @@
+/*
+ * 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.test.ws.jaxrpc.samples.mtom;
+
+import java.io.IOException;
+import java.io.ByteArrayInputStream;
+import java.rmi.RemoteException;
+
+import javax.activation.DataHandler;
+import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.rpc.server.ServletEndpointContext;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.utils.IOUtils;
+
+/**
+ * EmployeeRecords service endpoint
+ *
+ * @author Heiko.Braun(a)jboss.org
+ */
+public class EmployeeRecordsImpl implements EmployeeRecords
+{
+ public Status updateEmployee(Employee employee) throws RemoteException
+ {
+ try
+ {
+ DataHandler dataHandler = employee.getLegacyData();
+ String contentType = dataHandler.getContentType();
+
+ // Note: An MTOM request is ambiguous.
+ // Some vendors do XOP encoding dpending on a threshold.
+ // In that case you might receive an inlined request for
+ // an MTOM capable endpoint. The example below shows how deal with it.
+
+ if ("text/xml".equals(contentType))
+ {
+ StreamSource xmlStream = (StreamSource)dataHandler.getContent();
+ IOUtils.copyStream(System.out, xmlStream.getInputStream());
+ }
+ else if ("application/octet-stream".equals(contentType))
+ {
+ IOUtils.copyStream(System.out, dataHandler.getInputStream());
+ }
+
+ return new Status("OK");
+ }
+ catch (IOException e)
+ {
+ throw new RemoteException(e.getMessage());
+ }
+ }
+
+ public Employee queryEmployee(Query query) throws RemoteException
+ {
+ Employee employee = new Employee();
+ employee.setFirstname("Peter");
+ employee.setLastname("Pan");
+ employee.setLegacyData(getLegacyData());
+
+ return employee;
+ }
+
+ private DataHandler getLegacyData()
+ {
+ try
+ {
+ return new DataHandler(new StreamSource(new
ByteArrayInputStream("<Payroll><Data/></Payroll>".getBytes())),
"application/xml");
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/HRService.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/HRService.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/HRService.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,33 @@
+/*
+* 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.test.ws.jaxrpc.samples.mtom;
+
+import javax.xml.rpc.ServiceException;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: HRService.java 1323 2006-10-27 14:55:38Z heiko.braun(a)jboss.com $
+ * @since Oct 27, 2006
+ */
+public interface HRService extends javax.xml.rpc.Service{
+ public EmployeeRecords getEmployeeRecordsPort() throws ServiceException;
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,125 @@
+/*
+ * 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.test.ws.jaxrpc.samples.mtom;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import javax.activation.DataHandler;
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.Stub;
+import javax.xml.transform.stream.StreamSource;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.jaxrpc.StubExt;
+
+/**
+ * Test SOAP with XOP through the JAXRPC dynamic proxy layer.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Heiko.Braun(a)jboss.org
+ * @since 18-Jan-2006
+ */
+public class MTOMTestCase extends JBossWSTest
+{
+ private static EmployeeRecords port;
+
+ /** Deploy the test ear */
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(MTOMTestCase.class,
"jaxrpc-samples-mtom.war, jaxrpc-samples-mtom-client.jar");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ if (port == null)
+ {
+ if (isTargetServerJBoss())
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service =
(Service)iniCtx.lookup("java:comp/env/service/XOPTestService");
+ port = (EmployeeRecords)service.getPort(EmployeeRecords.class);
+ }
+ else
+ {
+ ServiceFactoryImpl factory = new ServiceFactoryImpl();
+ URL wsdlURL = new
File("resources/jaxrpc/samples/mtom/WEB-INF/wsdl/EmployeeService.wsdl").toURL();
+ URL mappingURL = new
File("resources/jaxrpc/samples/mtom/WEB-INF/jaxrpc-mapping.xml").toURL();
+ QName qname = new QName("http://org.jboss.ws/samples/mtom",
"EmployeeService");
+ Service service = factory.createService(wsdlURL, qname, mappingURL);
+ port = (EmployeeRecords)service.getPort(EmployeeRecords.class);
+ ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://"
+ getServerHost() + ":8080/jaxrpc-samples-mtom");
+ }
+
+ }
+ }
+
+ public void testUpdate() throws Exception
+ {
+ Employee employee = new Employee();
+ employee.setFirstname("Peter");
+ employee.setLastname("Pan");
+ employee.setLegacyData(getLegacyData());
+
+ Status status = port.updateEmployee(employee);
+ assertEquals("OK", status.getCode());
+ }
+
+ public void testUpdateMTOMDisabled() throws Exception
+ {
+ setMTOMEnabled(Boolean.FALSE);
+ testUpdate();
+ }
+
+ public void testQuery() throws Exception
+ {
+ Query query = new Query("Peter", "Pan");
+ Employee employee = port.queryEmployee(query);
+ assertNotNull(employee);
+ assertNotNull(employee.getLegacyData());
+
+ StreamSource xmlStream = (StreamSource)employee.getLegacyData().getContent();
+ String content = new BufferedReader(new
InputStreamReader(xmlStream.getInputStream())).readLine();
+ assertEquals("<Payroll><Data/></Payroll>", content);
+ }
+
+ private DataHandler getLegacyData()
+ {
+ return new DataHandler(new StreamSource(new
ByteArrayInputStream("<Payroll><Data/></Payroll>".getBytes())),
"application/xml");
+ }
+
+ private void setMTOMEnabled(Boolean b)
+ {
+ ((Stub)port)._setProperty(StubExt.PROPERTY_MTOM_ENABLED, b);
+ }
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Query.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Query.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Query.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,57 @@
+/*
+* 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.test.ws.jaxrpc.samples.mtom;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: Query.java 1323 2006-10-27 14:55:38Z heiko.braun(a)jboss.com $
+ * @since Oct 27, 2006
+ */
+public class Query {
+
+ private String firstname;
+ private String lastname;
+
+ public Query() {
+ }
+
+ public Query(String firstname, String lastname) {
+ this.firstname = firstname;
+ this.lastname = lastname;
+ }
+
+ public String getFirstname() {
+ return firstname;
+ }
+
+ public void setFirstname(String firstname) {
+ this.firstname = firstname;
+ }
+
+ public String getLastname() {
+ return lastname;
+ }
+
+ public void setLastname(String lastname) {
+ this.lastname = lastname;
+ }
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Status.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Status.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/Status.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,46 @@
+/*
+* 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.test.ws.jaxrpc.samples.mtom;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: Status.java 1323 2006-10-27 14:55:38Z heiko.braun(a)jboss.com $
+ * @since Oct 27, 2006
+ */
+public class Status {
+ private String code;
+
+ public Status() {
+ }
+
+ public Status(String code) {
+ this.code = code;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+}
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPRpcTestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPRpcTestCase.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPRpcTestCase.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,171 +0,0 @@
-/*
- * 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.test.ws.jaxrpc.samples.mtom;
-
-import java.io.File;
-import java.net.URL;
-
-import javax.activation.DataHandler;
-import javax.activation.FileDataSource;
-import javax.naming.InitialContext;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.Service;
-import javax.xml.rpc.Stub;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.utils.IOUtils;
-
-/**
- * Test SOAP with XOP through the JAXRPC dynamic proxy layer.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Heiko.Braun(a)jboss.org
- * @since 18-Jan-2006
- */
-public class XOPRpcTestCase extends JBossWSTest
-{
- private static XOPTest port;
-
- /** Deploy the test ear */
- public static Test suite() throws Exception
- {
- return JBossWSTestSetup.newTestSetup(XOPRpcTestCase.class,
"jaxrpc-samples-mtom.war, jaxrpc-samples-mtom-client.jar");
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- if (port == null)
- {
- if (isTargetServerJBoss())
- {
- InitialContext iniCtx = getInitialContext();
- Service service =
(Service)iniCtx.lookup("java:comp/env/service/XOPTestService");
- port = (XOPTest)service.getPort(XOPTest.class);
- }
- else
- {
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- URL wsdlURL = new
File("resources/jaxrpc/samples/mtom/WEB-INF/wsdl/TestService.wsdl").toURL();
- URL mappingURL = new
File("resources/jaxrpc/samples/mtom/WEB-INF/jaxrpc-mapping.xml").toURL();
- QName qname = new QName("http://org.jboss.ws/samples/mtom",
"XOPTest");
- Service service = factory.createService(wsdlURL, qname, mappingURL);
- port = (XOPTest)service.getPort(XOPTest.class);
- ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://"
+ getServerHost() + ":8080/jaxrpc-samples-mtom");
- }
-
- }
-
- //((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8081/jaxrpc-samples-mtom");
- }
-
- /**
- * Send a byte[] XOP encoded.
- *
- */
- public void testSimpleBinary() throws Exception
- {
- DataHandler dh = new DataHandler(
- new
FileDataSource("resources/jaxrpc/samples/mtom/disguised_jpeg.xcf")
- );
- byte[] bytesIn = IOUtils.convertToBytes(dh);
- byte[] bytesOut = port.sendOctets("Some text message", bytesIn);
- assertNotNull(bytesOut);
- assertTrue("Content length is different", bytesIn.length ==
bytesOut.length);
- }
-
- /**
- * Send a inlined message and expect a xop encoded response.
- */
- public void testMTOMDisabledClientside() throws Exception
- {
- URL url = new File("resources/jaxrpc/samples/mtom/attach.jpeg").toURL();
-
- // disable MTOM
- ((Stub)port)._setProperty("org.jboss.ws.mtom.enabled", Boolean.FALSE);
-
- DataHandler dh = new DataHandler(url);
- byte[] bytesIn = IOUtils.convertToBytes(dh);
- byte[] bytesOut = port.sendOctets("MTOM disabled request", bytesIn);
- assertNotNull(bytesOut);
- assertTrue("Content length is different", bytesIn.length ==
bytesOut.length);
- assertEquals(bytesIn, bytesOut);
- }
-
- /**
- * Send a multipart message with a 'image/jpeg' attachment part.
- * Uses a DataHandler as endpoint parameter and return type.
- */
- /*public void testAbstractParameterTypes() throws Exception
- {
- URL url = new File("resources/jaxrpc/samples/mtom/attach.jpeg").toURL();
- DataHandler value = port.sendMimeImageJPEG("Some text message", new
DataHandler(url));
- assertNotNull(value);
- assertTrue("Wrong return content-type returned",
value.getContentType().equals("image/jpeg"));
- } */
-
- /**
- * Send a multipart message with a 'text/plain' attachment part.
- * Uses java.lang.String as endpoint parameter and return type.
- */
- /*public void testConcreteParameterTypes() throws Exception
- {
- String xoppart = "This is a plain text attachment.";
- String value = port.sendMimeTextPlain("Some text message", xoppart);
- assertNotNull(value);
- assertEquals("Value mismatch", value, xoppart);
- } */
-
- /**
- * Send a multipart message with a 'text/xml' attachment part.
- * Uses a DataHandler as endpoint parameter, but javax.xml.transform.Source as return
value.
- */
- /*public void testParameterConversion() throws Exception
- {
- FileInputStream stream = new
FileInputStream("resources/jaxrpc/samples/mtom/attach.xml");
- StreamSource source = new StreamSource(stream);
-
- Source value = port.sendMimeTextXML("Some text message", new
DataHandler(source, "text/xml"));
- assertNotNull(value);
- assertTrue("Wrong return value type", value instanceof Source);
- } */
-
- /**
- * Send a multipart message with a application/xml attachment part.
- * Uses a javax.xml.transform.Source as endpoint parameter, but
javax.activation.DataHandler as return value.
- */
- /*
- public void testParameterConversionReverse() throws Exception
- {
- FileInputStream stream = new
FileInputStream("resources/jaxrpc/samples/mtom/attach.xml");
- StreamSource source = new StreamSource(stream);
-
- DataHandler value = port.sendMimeApplicationXML("Some text message",
source);
- assertNotNull(value);
- assertTrue("Wrong return value content-type",
value.getContentType().equals("application/xml"));
- } */
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPTest.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPTest.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPTest.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,62 +0,0 @@
-/*
- * 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.test.ws.jaxrpc.samples.mtom;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-import javax.activation.DataHandler;
-import javax.xml.transform.Source;
-
-/**
- * Service Endpoint Interface for XOP
- *
- * image/gif java.awt.Image
- * image/jpeg java.awt.Image
- * text/plain java.lang.String
- * multipart/* javax.mail.internet.MimeMultipart
- * text/xml javax.xml.transform.Source
- * application/xml javax.xml.transform.Source
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Jan-2006
- */
-public interface XOPTest extends Remote
-{
- /** Service endpoint method for image/jpeg
- */
- DataHandler sendMimeImageJPEG(String message, DataHandler xoppart) throws
RemoteException;
-
- /** Service endpoint method for text/plain
- */
- String sendMimeTextPlain(String message, String xoppart) throws RemoteException;
-
- /** Service endpoint method for text/xml
- */
- Source sendMimeTextXML(String message, DataHandler xoppart) throws RemoteException;
-
- /** Service endpoint method for application/xml
- */
- DataHandler sendMimeApplicationXML(String message, Source xoppart) throws
RemoteException;
-
- byte[] sendOctets(String message, byte[] xoppart) throws RemoteException;
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPTestImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPTestImpl.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/XOPTestImpl.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,111 +0,0 @@
-/*
- * 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.test.ws.jaxrpc.samples.mtom;
-
-import java.io.IOException;
-import java.rmi.RemoteException;
-
-import javax.activation.DataHandler;
-import javax.xml.rpc.ServiceException;
-import javax.xml.rpc.server.ServiceLifecycle;
-import javax.xml.rpc.server.ServletEndpointContext;
-import javax.xml.transform.Source;
-
-import org.jboss.ws.WSException;
-
-/**
- * Service Endpoint for XOP
- *
- * image/jpeg java.awt.Image
- * text/plain java.lang.String
- * text/xml javax.xml.transform.Source
- * application/xml javax.xml.transform.Source
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Heiko.Braun(a)jboss.org
- *
- * @since 18-Jan-2006
- */
-public class XOPTestImpl implements XOPTest, ServiceLifecycle
-{
- private ServletEndpointContext context;
-
- /**
- * Service endpoint method that processes inlined and optimized values.
- */
- public DataHandler sendMimeImageJPEG(String message, DataHandler xoppart) throws
RemoteException
- {
- String expContentType = message.equals("MTOM disabled request") ?
"application/octet-stream" : "image/jpeg";
-
- if(! xoppart.getContentType().equals(expContentType))
- throw new IllegalArgumentException("Wrong content-type: expected
"+expContentType+", but was " + xoppart.getContentType());
- return xoppart;
- }
-
- /**
- * Service endpoint method for text/plain
- */
- public String sendMimeTextPlain(String message, String xoppart) throws
RemoteException
- {
- return xoppart;
- }
-
- /**
- * Service endpoint method for text/xml
- */
- public Source sendMimeTextXML(String message, DataHandler xoppart) throws
RemoteException
- {
- if(! xoppart.getContentType().equals("text/xml"))
- throw new IllegalArgumentException("Wrong content-type: expected
'text/xml', but was " + xoppart.getContentType());
- try
- {
- Source payload = (Source)xoppart.getContent();
- return payload;
- }
- catch (IOException e)
- {
- throw new WSException(e.getMessage());
- }
- }
-
- /**
- * Service endpoint method for application/xml
- */
- public DataHandler sendMimeApplicationXML(String message, Source xoppart) throws
RemoteException
- {
- return new DataHandler(xoppart, "application/xml");
- }
-
- public byte[] sendOctets(String message, byte[] xoppart) throws RemoteException {
- return xoppart;
- }
-
- public void init(Object context) throws ServiceException
- {
- this.context = (ServletEndpointContext)context;
- }
-
- public void destroy()
- {
- this.context = null;
- }
-}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTestSupport.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTestSupport.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTestSupport.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -21,10 +21,12 @@
*/
package org.jboss.test.ws.jaxrpc.xop;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.FileInputStream;
+import javax.xml.transform.stream.StreamSource;
+import javax.activation.DataHandler;
+import java.io.*;
+import java.awt.*;
+import java.net.URL;
+import java.net.MalformedURLException;
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
@@ -49,4 +51,47 @@
is.close();
return bytes;
}
+
+ public static Image createTestImage()
+ {
+ Image image = null;
+ try
+ {
+ URL url = new
File("resources/jaxrpc/xop/shared/attach.jpeg").toURL();
+
+ image = null;
+ try
+ {
+ image = Toolkit.getDefaultToolkit().createImage(url);
+ }
+ catch (Throwable th)
+ {
+ //log.warn("Cannot create Image: " + th);
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+
+ return image;
+ }
+
+ public static StreamSource createTestSource()
+ {
+ return new StreamSource( new
ByteArrayInputStream("<some><nestedXml/></some>".getBytes()));
+ }
+
+ public static DataHandler createDataHandler()
+ {
+ try
+ {
+ URL url = new
File("resources/jaxrpc/xop/shared/attach.jpeg").toURL();
+ return new DataHandler(url);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -65,6 +65,7 @@
WSSchemaUtils wsUtil = WSSchemaUtils.getInstance(new NamespaceRegistry(),
"http://jboss.org/test/ws/xop/doclit");
JBossXSModel schemaModel = wsUtil.getJBossXSModel(xsModel);
+ // test custom binary declaration
XSTypeDefinition xsType = schemaModel.getTypeDefinition(">PingMsg",
"http://jboss.org/test/ws/xop/doclit");
assertNotNull("Root type def not found", xsType);
@@ -79,6 +80,7 @@
scanner.reset();
+ // test the xmime binary declaration
xsType = schemaModel.getTypeDefinition(">PingMsgResponse",
"http://jboss.org/test/ws/xop/doclit");
assertNotNull("Root type def not found", xsType);
if (xsType instanceof XSComplexTypeDefinition)
@@ -91,9 +93,7 @@
}
public void testMSFTElementScan() throws Exception
- {
- System.out.println("FIXME: [JBWS-1313] Fix XOP tests in trunk");
- if (true) return;
+ {
SchemaUtils utils = SchemaUtils.getInstance();
File f = new File("resources/jaxrpc/xop/schema.xsd");
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestServiceImpl.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestServiceImpl.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestServiceImpl.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,29 +0,0 @@
-package org.jboss.test.ws.jaxrpc.xop.doclit;
-
-import org.jboss.ws.soap.MessageContextAssociation;
-import org.jboss.ws.common.CommonMessageContext;
-import org.jboss.ws.jaxrpc.StubExt;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
-import org.jboss.test.ws.jaxrpc.xop.shared.MTOMServiceBase;
-
-import java.rmi.RemoteException;
-import java.util.StringTokenizer;
-
-/**
- * MTOM test service impl.
- * The 'message' param value determines wether or not the response
- * should be XOP encoded or not.
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 11-Apr-2006
- */
-public class TestServiceImpl extends MTOMServiceBase implements TestService_PortType {
-
- public PingMsgResponse ping(PingMsg pingMsg) throws RemoteException {
-
- toggleXOP(pingMsg.getMessage());
- return new PingMsgResponse(pingMsg.getXopContent());
-
- }
-}
Deleted:
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestService_PortType.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestService_PortType.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestService_PortType.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,11 +0,0 @@
-/*
- * JBoss, the OpenSource EJB server
- * Distributable under LGPL license. See terms of license at
gnu.org.
- */
-//Auto Generated by jbossws - Please do not edit!!!
-
-package org.jboss.test.ws.jaxrpc.xop.doclit;
-public interface TestService_PortType extends java.rmi.Remote
-{
- public org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse
ping(org.jboss.test.ws.jaxrpc.xop.shared.PingMsg pingMsg) throws
java.rmi.RemoteException;
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestService_Service.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestService_Service.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/TestService_Service.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,19 +0,0 @@
-/*
-* JBoss, the OpenSource EJB server
-* Distributable under LGPL license. See terms of license at
gnu.org.
-*/
-
-//Auto Generated by jbossws - Please do not edit!!!
-
-package org.jboss.test.ws.jaxrpc.xop.doclit;
-
-
-import javax.xml.rpc.ServiceException;
-
-
-public interface TestService_Service extends javax.xml.rpc.Service
-{
-
- public org.jboss.test.ws.jaxrpc.xop.doclit.TestService_PortType getTestServicePort()
throws ServiceException;
-
-}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -22,44 +22,48 @@
package org.jboss.test.ws.jaxrpc.xop.doclit;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
+import org.jboss.test.ws.jaxrpc.xop.shared.*;
+import org.jboss.ws.jaxrpc.StubExt;
import org.jboss.ws.utils.IOUtils;
-import org.jboss.ws.jaxrpc.StubExt;
import javax.activation.DataHandler;
import javax.xml.rpc.Stub;
+import javax.xml.transform.Source;
+import java.awt.*;
import java.io.File;
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
- * @version $Id$
+ * @version $Id:XOPBase.java 1321 2006-10-27 11:47:18Z heiko.braun(a)jboss.com $
* @since Sep 25, 2006
*/
public abstract class XOPBase extends JBossWSTest {
- protected TestService_PortType port;
+ protected abstract XOPPing getPort();
+ // ---------------------------------------------------------------------------------
+ // Test raw binary data
+
public void testRequestResponseOptimized() throws Exception {
- DataHandler dh = new DataHandler("Another plain text attachment",
"text/plain");
- byte[] bytesIn = IOUtils.convertToBytes(dh);
- PingMsgResponse value = port.ping(new PingMsg("1|1", bytesIn));
- assertNotNull("Return value was null", value);
- byte[] bytesOut = value.getXopContent();
- assertNotNull("Returned xopContent was null", bytesOut);
- assertEquals("Content length doesn't match", bytesIn.length,
bytesOut.length);
- }
+ DataHandler dh = new DataHandler("Another plain text attachment",
"text/plain");
+ byte[] bytesIn = IOUtils.convertToBytes(dh);
+ PingMsgResponse value = getPort().ping(new PingMsg("1|1", bytesIn));
+ assertNotNull("Return value was null", value);
+ byte[] bytesOut = value.getXopContent();
+ assertNotNull("Returned xopContent was null", bytesOut);
+ assertEquals("Content length doesn't match", bytesIn.length,
bytesOut.length);
+ }
public void testResponseOptimized() throws Exception {
- byte[] bytesIn = XOPTestSupport.getBytesFromFile(new
File("resources/jaxrpc/samples/mtom/attach.jpeg"));
+ byte[] bytesIn = XOPTestSupport.getBytesFromFile(new
File("resources/jaxrpc/xop/shared/attach.jpeg"));
// disable MTOM
- ((Stub)port)._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
- PingMsgResponse value = port.ping(new PingMsg("0|1", bytesIn));
+ PingMsgResponse value = getPort().ping(new PingMsg("0|1", bytesIn));
assertNotNull("Return value was null",value);
byte[] bytesOut = value.getXopContent();
assertNotNull("Return xopContent was null", bytesOut);
@@ -68,15 +72,114 @@
public void testRequestOptimized() throws Exception {
- byte[] bytesIn = XOPTestSupport.getBytesFromFile(new
File("resources/jaxrpc/samples/mtom/attach.jpeg"));
+ byte[] bytesIn = XOPTestSupport.getBytesFromFile(new
File("resources/jaxrpc/xop/shared/attach.jpeg"));
// reusing the stub means cleaning the previous state
- ((Stub)port)._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
- PingMsgResponse value = port.ping(new PingMsg("1|0", bytesIn));
+ PingMsgResponse value = getPort().ping(new PingMsg("1|0", bytesIn));
assertNotNull("Return value was null",value);
byte[] bytesOut = value.getXopContent();
assertNotNull("Return xopContent was null", bytesOut);
assertEquals("Content length doesn't match", bytesIn.length,
bytesOut.length);
}
+
+ // ---------------------------------------------------------------------------------
+ // Test concrete java types
+
+ public void testImageResponseOptimized() throws Exception {
+
+ Image image = XOPTestSupport.createTestImage();
+
+ if(image!=null)
+ {
+ // disable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ PingImage pingImage = new PingImage("0|1", image);
+ PingImageResponse response = getPort().pingImage(pingImage);
+ assertNotNull("Return xopContent was null", response);
+ assertNotNull("Return xopContent was null",
response.getXopContent());
+ }
+ }
+
+ public void testImageRequestOptimized() throws Exception {
+
+ Image image = XOPTestSupport.createTestImage();
+
+ if(image!=null)
+ {
+ // enable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
+
+ PingImage pingImage = new PingImage("1|0", image);
+ PingImageResponse response = getPort().pingImage(pingImage);
+ assertNotNull("Response was null", response);
+ assertNotNull("Return xopContent was null",
response.getXopContent());
+ }
+ }
+
+ public void testSourceResponseOptimized() throws Exception {
+
+ Source source = XOPTestSupport.createTestSource();
+
+ // disable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ PingSource pingSource = new PingSource();
+ pingSource.setMessage("0|1");
+ pingSource.setXopContent(source);
+
+ PingSourceResponse response = getPort().pingSource(pingSource);
+ assertNotNull("Response was null", response);
+ assertNotNull("Return xopContent was null", response.getXopContent());
+
+ }
+
+ public void testSourceRequestOptimized() throws Exception {
+
+ Source source = XOPTestSupport.createTestSource();
+
+ // enable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
+
+ PingSource pingSource = new PingSource();
+ pingSource.setMessage("1|0");
+ pingSource.setXopContent(source);
+
+ PingSourceResponse response = getPort().pingSource(pingSource);
+ assertNotNull("Response was null", response);
+ assertNotNull("Return xopContent was null", response.getXopContent());
+ }
+
+ public void testDHResponseOptimized() throws Exception {
+
+ DataHandler dh = XOPTestSupport.createDataHandler();
+
+ // disable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ PingDataHandler reqest = new PingDataHandler(dh);
+ reqest.setMessage("0|1");
+
+ PingDataHandlerResponse response = getPort().pingDataHandler(reqest);
+ assertNotNull("Response was null", response);
+ assertNotNull("Return xopContent was null", response.getXopContent());
+
+ }
+
+ public void testDHRequestOptimized() throws Exception {
+
+ DataHandler dh = XOPTestSupport.createDataHandler();
+
+ // enable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
+
+ PingDataHandler reqest = new PingDataHandler(dh);
+ reqest.setMessage("1|0");
+
+ PingDataHandlerResponse response = getPort().pingDataHandler(reqest);
+ assertNotNull("Response was null", response);
+ assertNotNull("Return xopContent was null", response.getXopContent());
+ }
}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPHandlerTestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPHandlerTestCase.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPHandlerTestCase.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -23,18 +23,9 @@
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
-import org.jboss.ws.utils.IOUtils;
-import org.jboss.ws.jaxrpc.StubExt;
import javax.naming.InitialContext;
import javax.xml.rpc.Service;
-import javax.xml.rpc.Stub;
-import javax.activation.DataHandler;
-import java.io.File;
/**
* Test MTOM functionality with jaxrpc-handlers in place.<br>
@@ -47,6 +38,8 @@
*/
public class XOPHandlerTestCase extends XOPBase {
+ private XOPPing port;
+
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(XOPHandlerTestCase.class,
"jaxrpc-xop-doclit_handler.war, jaxrpc-xop-doclit_handler-client.jar");
@@ -59,27 +52,13 @@
{
InitialContext iniCtx = getInitialContext();
Service service =
(Service)iniCtx.lookup("java:comp/env/service/XOPHandlerTestCase");
- port = (TestService_PortType)service.getPort(TestService_PortType.class);
+ port = (XOPPing)service.getPort(XOPPing.class);
}
//((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:8081/jaxrpc-xop-doclit_handler");
}
- @Override
- public void testRequestOptimized() throws Exception
- {
- System.out.println("FIXME: [JBWS-1313] Fix XOP tests in trunk");
+ protected XOPPing getPort() {
+ return port;
}
-
- @Override
- public void testRequestResponseOptimized() throws Exception
- {
- System.out.println("FIXME: [JBWS-1313] Fix XOP tests in trunk");
- }
-
- @Override
- public void testResponseOptimized() throws Exception
- {
- System.out.println("FIXME: [JBWS-1313] Fix XOP tests in trunk");
- }
-}
\ No newline at end of file
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPing.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPing.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPing.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,17 @@
+/*
+ * JBoss, the OpenSource EJB server
+ * Distributable under LGPL license. See terms of license at
gnu.org.
+ */
+//Auto Generated by jbossws - Please do not edit!!!
+
+package org.jboss.test.ws.jaxrpc.xop.doclit;
+
+import org.jboss.test.ws.jaxrpc.xop.shared.*;
+
+public interface XOPPing extends java.rmi.Remote
+{
+ public PingMsgResponse ping(PingMsg pingMsg) throws java.rmi.RemoteException;
+ public PingImageResponse pingImage(PingImage pingImage) throws
java.rmi.RemoteException;
+ public PingSourceResponse pingSource(PingSource pingSource) throws
java.rmi.RemoteException;
+ public PingDataHandlerResponse pingDataHandler(PingDataHandler pingDataHandler) throws
java.rmi.RemoteException;
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPingImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPingImpl.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPingImpl.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,36 @@
+package org.jboss.test.ws.jaxrpc.xop.doclit;
+
+import org.jboss.test.ws.jaxrpc.xop.doclit.XOPPing;
+import org.jboss.test.ws.jaxrpc.xop.shared.*;
+
+import java.rmi.RemoteException;
+
+/**
+ * MTOM test service impl.
+ * The 'message' param value determines wether or not the response should be XOP
encoded.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 11-Apr-2006
+ */
+public class XOPPingImpl extends MTOMServiceBase implements XOPPing {
+
+ public PingMsgResponse ping(PingMsg pingMsg) throws RemoteException {
+ toggleXOP(pingMsg.getMessage());
+ return new PingMsgResponse(pingMsg.getXopContent());
+ }
+
+ public PingImageResponse pingImage(PingImage pingImage) throws RemoteException {
+ toggleXOP(pingImage.getMessage());
+ return new PingImageResponse(pingImage.getXopContent());
+ }
+
+ public PingSourceResponse pingSource(PingSource pingSource) throws RemoteException {
+ toggleXOP(pingSource.getMessage());
+ return new PingSourceResponse(pingSource.getXopContent());
+ }
+
+ public PingDataHandlerResponse pingDataHandler(PingDataHandler pingDataHandler) throws
RemoteException {
+ toggleXOP(pingDataHandler.getMessage());
+ return new PingDataHandlerResponse(pingDataHandler.getXopContent());
+ }
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPingService.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPingService.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPPingService.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,19 @@
+/*
+* JBoss, the OpenSource EJB server
+* Distributable under LGPL license. See terms of license at
gnu.org.
+*/
+
+//Auto Generated by jbossws - Please do not edit!!!
+
+package org.jboss.test.ws.jaxrpc.xop.doclit;
+
+
+import javax.xml.rpc.ServiceException;
+
+
+public interface XOPPingService extends javax.xml.rpc.Service
+{
+
+ public org.jboss.test.ws.jaxrpc.xop.doclit.XOPPing getTestServicePort() throws
ServiceException;
+
+}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPTestCase.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPTestCase.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -24,19 +24,11 @@
// $Id$
import junit.framework.Test;
-import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
-import org.jboss.ws.jaxrpc.StubExt;
-import org.jboss.ws.utils.IOUtils;
-import javax.activation.DataHandler;
import javax.naming.InitialContext;
import javax.xml.rpc.Service;
import javax.xml.rpc.Stub;
-import java.io.File;
/**
* Test MTOM functionaly without any jaxrpc handlers in place.
@@ -46,6 +38,8 @@
*/
public class XOPTestCase extends XOPBase {
+ private XOPPing port;
+
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(XOPTestCase.class,
"jaxrpc-xop-doclit.war, jaxrpc-xop-doclit-client.jar");
@@ -58,10 +52,15 @@
{
InitialContext iniCtx = getInitialContext();
Service service =
(Service)iniCtx.lookup("java:comp/env/service/XOPTestCase");
- port = (TestService_PortType)service.getPort(TestService_PortType.class);
+ port = (XOPPing)service.getPort(XOPPing.class);
}
//((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:8081/jaxrpc-xop-doclit");
}
+ protected XOPPing getPort()
+ {
+ return port;
+ }
+
}
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestServiceImpl.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestServiceImpl.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestServiceImpl.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,32 +0,0 @@
-package org.jboss.test.ws.jaxrpc.xop.rpclit;
-
-import org.jboss.ws.soap.MessageContextAssociation;
-import org.jboss.ws.common.CommonMessageContext;
-import org.jboss.ws.jaxrpc.StubExt;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
-import org.jboss.test.ws.jaxrpc.xop.shared.MTOMServiceBase;
-
-import java.rmi.RemoteException;
-import java.util.StringTokenizer;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 11-Apr-2006
- */
-public class TestServiceImpl extends MTOMServiceBase implements TestService_PortType {
-
- public PingMsgResponse pingComplex(PingMsg pingMsg) throws RemoteException {
-
- String message = pingMsg.getMessage();
- toggleXOP(message);
-
- return new PingMsgResponse(pingMsg.getXopContent());
- }
-
- public byte[] pingSimple(String parameters, byte[] xopContent) throws RemoteException
{
- toggleXOP(parameters);
- return xopContent;
- }
-
-}
Deleted:
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_PortType.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_PortType.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_PortType.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,12 +0,0 @@
-/*
- * JBoss, the OpenSource EJB server
- * Distributable under LGPL license. See terms of license at
gnu.org.
- */
-//Auto Generated by jbossws - Please do not edit!!!
-
-package org.jboss.test.ws.jaxrpc.xop.rpclit;
-public interface TestService_PortType extends java.rmi.Remote
-{
- public org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse
pingComplex(org.jboss.test.ws.jaxrpc.xop.shared.PingMsg pingMsg) throws
java.rmi.RemoteException;
- public byte[] pingSimple(String parameters, byte[] xopContent) throws
java.rmi.RemoteException;
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_Service.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_Service.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_Service.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,17 +0,0 @@
-/*
-* JBoss, the OpenSource EJB server
-* Distributable under LGPL license. See terms of license at
gnu.org.
-*/
-
-//Auto Generated by jbossws - Please do not edit!!!
-
-package org.jboss.test.ws.jaxrpc.xop.rpclit;
-
-
-import javax.xml.rpc.ServiceException;
-
-
-public interface TestService_Service extends javax.xml.rpc.Service
-{
- public org.jboss.test.ws.jaxrpc.xop.rpclit.TestService_PortType getTestServicePort()
throws ServiceException;
-}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -22,25 +22,26 @@
package org.jboss.test.ws.jaxrpc.xop.rpclit;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
+import org.jboss.test.ws.jaxrpc.xop.shared.*;
+import org.jboss.ws.jaxrpc.StubExt;
import org.jboss.ws.utils.IOUtils;
-import org.jboss.ws.jaxrpc.StubExt;
import javax.activation.DataHandler;
import javax.xml.rpc.Stub;
+import javax.xml.transform.Source;
import java.io.File;
import java.util.StringTokenizer;
+import java.awt.*;
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
- * @version $Id$
+ * @version $Id:XOPBase.java 1321 2006-10-27 11:47:18Z heiko.braun(a)jboss.com $
* @since Sep 25, 2006
*/
public abstract class XOPBase extends JBossWSTest {
- protected TestService_PortType port;
+ protected abstract XOPPing getPort();
public void testRequestResponseOptimized() throws Exception {
@@ -52,14 +53,14 @@
public void testResponseOptimized() throws Exception {
- byte[] bytesIn = XOPTestSupport.getBytesFromFile(new
File("resources/jaxrpc/samples/mtom/attach.jpeg"));
+ byte[] bytesIn = XOPTestSupport.getBytesFromFile(new
File("resources/jaxrpc/xop/shared/attach.jpeg"));
requestComplex(new PingMsg("0|1", bytesIn));
}
public void testRequestOptimized() throws Exception {
- byte[] bytesIn = XOPTestSupport.getBytesFromFile(new
File("resources/jaxrpc/samples/mtom/attach.jpeg"));
+ byte[] bytesIn = XOPTestSupport.getBytesFromFile(new
File("resources/jaxrpc/xop/shared/attach.jpeg"));
requestComplex(new PingMsg("1|0", bytesIn));
}
@@ -68,36 +69,132 @@
{
StringTokenizer tok =new StringTokenizer(payload.getMessage(), "|");
boolean mtomEnabled = tok.nextToken().equals("1");
- ((Stub)port)._setProperty(StubExt.PROPERTY_MTOM_ENABLED,
Boolean.valueOf(mtomEnabled));
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED,
Boolean.valueOf(mtomEnabled));
- PingMsgResponse value = port.pingComplex(payload);
+ PingMsgResponse value = getPort().ping(payload);
assertNotNull("Return value was null",value);
byte[] bytesOut = value.getXopContent();
assertNotNull("Return xopContent was null", bytesOut);
assertEquals("Content length doesn't match",
payload.getXopContent().length, bytesOut.length);
}
-// public void testSimpleTypesOptimized() throws Exception
-// {
-// 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("s1|s1", bytesIn);
-//
-// assertNotNull("Return xopContent was null", bytesOut);
-// assertEquals("Content length doesn't match", bytesIn.length,
bytesOut.length);
-// }
-//
-// public void testSimpleTypesResponseOptimized() throws Exception
-// {
-// 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("s0|s1", bytesIn);
-//
-// assertNotNull("Return xopContent was null", bytesOut);
-// assertEquals("Content length doesn't match", bytesIn.length,
bytesOut.length);
-//
-// }
+ public void testSimpleTypesOptimized() throws Exception
+ {
+ DataHandler dh = new DataHandler("Simple type plain text attachment",
"text/plain");
+ byte[] bytesIn = IOUtils.convertToBytes(dh);
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
+ byte[] bytesOut = getPort().pingSimple("s1|s1", bytesIn);
+
+ assertNotNull("Return xopContent was null", bytesOut);
+ assertEquals("Content length doesn't match", bytesIn.length,
bytesOut.length);
+ }
+
+ public void testSimpleTypesResponseOptimized() throws Exception
+ {
+ DataHandler dh = new DataHandler("Simple type plain text attachment",
"text/plain");
+ byte[] bytesIn = IOUtils.convertToBytes(dh);
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ byte[] bytesOut = getPort().pingSimple("s0|s1", bytesIn);
+
+ assertNotNull("Return xopContent was null", bytesOut);
+ assertEquals("Content length doesn't match", bytesIn.length,
bytesOut.length);
+ }
+
+ public void testImageResponseOptimized() throws Exception {
+
+ Image image = XOPTestSupport.createTestImage();
+
+ if(image!=null)
+ {
+ // disable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ PingImage pingImage = new PingImage("0|1", image);
+ PingImageResponse response = getPort().pingImage(pingImage);
+ assertNotNull("Return xopContent was null", response);
+ assertNotNull("Return xopContent was null",
response.getXopContent());
+ }
+ }
+
+ public void testImageRequestOptimized() throws Exception {
+
+ Image image = XOPTestSupport.createTestImage();
+
+ if(image!=null)
+ {
+ // enable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
+
+ PingImage pingImage = new PingImage("1|0", image);
+ PingImageResponse response = getPort().pingImage(pingImage);
+ assertNotNull("Response was null", response);
+ assertNotNull("Return xopContent was null",
response.getXopContent());
+ }
+ }
+
+ public void testSourceResponseOptimized() throws Exception {
+
+ Source source = XOPTestSupport.createTestSource();
+
+ // disable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ PingSource pingSource = new PingSource();
+ pingSource.setMessage("0|1");
+ pingSource.setXopContent(source);
+
+ PingSourceResponse response = getPort().pingSource(pingSource);
+ assertNotNull("Response was null", response);
+ assertNotNull("Return xopContent was null", response.getXopContent());
+
+ }
+
+ public void testSourceRequestOptimized() throws Exception {
+
+ Source source = XOPTestSupport.createTestSource();
+
+ // enable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
+
+ PingSource pingSource = new PingSource();
+ pingSource.setMessage("1|0");
+ pingSource.setXopContent(source);
+
+ PingSourceResponse response = getPort().pingSource(pingSource);
+ assertNotNull("Response was null", response);
+ assertNotNull("Return xopContent was null", response.getXopContent());
+ }
+
+ public void testDHResponseOptimized() throws Exception {
+
+ DataHandler dh = XOPTestSupport.createDataHandler();
+
+ // disable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ PingDataHandler reqest = new PingDataHandler(dh);
+ reqest.setMessage("0|1");
+
+ PingDataHandlerResponse response = getPort().pingDataHandler(reqest);
+ assertNotNull("Response was null", response);
+ assertNotNull("Return xopContent was null", response.getXopContent());
+
+ }
+
+ public void testDHRequestOptimized() throws Exception {
+
+ DataHandler dh = XOPTestSupport.createDataHandler();
+
+ // enable MTOM
+ ((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
+
+ PingDataHandler reqest = new PingDataHandler(dh);
+ reqest.setMessage("1|0");
+
+ PingDataHandlerResponse response = getPort().pingDataHandler(reqest);
+ assertNotNull("Response was null", response);
+ assertNotNull("Return xopContent was null", response.getXopContent());
+ }
+
}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPHandlerTestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPHandlerTestCase.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPHandlerTestCase.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -23,18 +23,9 @@
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
-import org.jboss.ws.utils.IOUtils;
-import org.jboss.ws.jaxrpc.StubExt;
import javax.naming.InitialContext;
import javax.xml.rpc.Service;
-import javax.xml.rpc.Stub;
-import javax.activation.DataHandler;
-import java.io.File;
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
@@ -43,6 +34,8 @@
*/
public class XOPHandlerTestCase extends XOPBase {
+ private XOPPing port;
+
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(XOPHandlerTestCase.class,
"jaxrpc-xop-rpclit_handler.war, jaxrpc-xop-rpclit_handler-client.jar");
@@ -55,27 +48,13 @@
{
InitialContext iniCtx = getInitialContext();
Service service =
(Service)iniCtx.lookup("java:comp/env/service/XOPHandlerTestCaseRPC");
- port = (TestService_PortType)service.getPort(TestService_PortType.class);
+ port = (XOPPing)service.getPort(XOPPing.class);
}
//((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:8081/jaxrpc-xop-rpclit_handler");
}
- @Override
- public void testRequestOptimized() throws Exception
- {
- System.out.println("FIXME: [JBWS-1313] Fix XOP tests in trunk");
+ protected XOPPing getPort() {
+ return port;
}
-
- @Override
- public void testRequestResponseOptimized() throws Exception
- {
- System.out.println("FIXME: [JBWS-1313] Fix XOP tests in trunk");
- }
-
- @Override
- public void testResponseOptimized() throws Exception
- {
- System.out.println("FIXME: [JBWS-1313] Fix XOP tests in trunk");
- }
}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPing.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPing.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPing.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,18 @@
+/*
+ * JBoss, the OpenSource EJB server
+ * Distributable under LGPL license. See terms of license at
gnu.org.
+ */
+//Auto Generated by jbossws - Please do not edit!!!
+
+package org.jboss.test.ws.jaxrpc.xop.rpclit;
+
+import org.jboss.test.ws.jaxrpc.xop.shared.*;
+
+public interface XOPPing extends java.rmi.Remote
+{
+ public org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse
ping(org.jboss.test.ws.jaxrpc.xop.shared.PingMsg pingMsg) throws
java.rmi.RemoteException;
+ public byte[] pingSimple(String parameters, byte[] xopContent) throws
java.rmi.RemoteException;
+ public PingImageResponse pingImage(PingImage pingImage) throws
java.rmi.RemoteException;
+ public PingSourceResponse pingSource(PingSource pingSource) throws
java.rmi.RemoteException;
+ public PingDataHandlerResponse pingDataHandler(PingDataHandler pingDataHandler) throws
java.rmi.RemoteException;
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPingImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPingImpl.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPingImpl.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,41 @@
+package org.jboss.test.ws.jaxrpc.xop.rpclit;
+
+import org.jboss.test.ws.jaxrpc.xop.shared.*;
+
+import java.rmi.RemoteException;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 11-Apr-2006
+ */
+public class XOPPingImpl extends MTOMServiceBase implements XOPPing {
+
+ public PingMsgResponse ping(PingMsg pingMsg) throws RemoteException {
+
+ String message = pingMsg.getMessage();
+ toggleXOP(message);
+
+ return new PingMsgResponse(pingMsg.getXopContent());
+ }
+
+ public byte[] pingSimple(String parameters, byte[] xopContent) throws RemoteException
{
+ toggleXOP(parameters);
+ return xopContent;
+ }
+
+ public PingImageResponse pingImage(PingImage pingImage) throws RemoteException {
+ toggleXOP(pingImage.getMessage());
+ return new PingImageResponse(pingImage.getXopContent());
+ }
+
+ public PingSourceResponse pingSource(PingSource pingSource) throws RemoteException {
+ toggleXOP(pingSource.getMessage());
+ return new PingSourceResponse(pingSource.getXopContent());
+ }
+
+ public PingDataHandlerResponse pingDataHandler(PingDataHandler pingDataHandler) throws
RemoteException {
+ toggleXOP(pingDataHandler.getMessage());
+ return new PingDataHandlerResponse(pingDataHandler.getXopContent());
+ }
+
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPingService.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPingService.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPPingService.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,17 @@
+/*
+* JBoss, the OpenSource EJB server
+* Distributable under LGPL license. See terms of license at
gnu.org.
+*/
+
+//Auto Generated by jbossws - Please do not edit!!!
+
+package org.jboss.test.ws.jaxrpc.xop.rpclit;
+
+
+import javax.xml.rpc.ServiceException;
+
+
+public interface XOPPingService extends javax.xml.rpc.Service
+{
+ public org.jboss.test.ws.jaxrpc.xop.rpclit.XOPPing getTestServicePort() throws
ServiceException;
+}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPTestCase.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPTestCase.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -24,19 +24,10 @@
// $Id$
import junit.framework.Test;
-import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
-import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
-import org.jboss.ws.jaxrpc.StubExt;
-import org.jboss.ws.utils.IOUtils;
-import javax.activation.DataHandler;
import javax.naming.InitialContext;
import javax.xml.rpc.Service;
-import javax.xml.rpc.Stub;
-import java.io.File;
/**
*
@@ -45,6 +36,8 @@
*/
public class XOPTestCase extends XOPBase {
+ private XOPPing port;
+
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(XOPTestCase.class,
"jaxrpc-xop-rpclit.war, jaxrpc-xop-rpclit-client.jar");
@@ -57,10 +50,14 @@
{
InitialContext iniCtx = getInitialContext();
Service service =
(Service)iniCtx.lookup("java:comp/env/service/XOPTestCaseRPC");
- port = (TestService_PortType)service.getPort(TestService_PortType.class);
+ port = (XOPPing)service.getPort(XOPPing.class);
}
//((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:8081/jaxrpc-xop-rpclit");
}
+ protected XOPPing getPort() {
+ return port;
+ }
+
}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -24,6 +24,7 @@
import org.jboss.ws.common.CommonMessageContext;
import org.jboss.ws.soap.MessageContextAssociation;
import org.jboss.ws.jaxrpc.StubExt;
+import org.jboss.ws.xop.XOPContext;
import java.util.StringTokenizer;
@@ -39,6 +40,11 @@
String responseOptimized = tok.nextToken();
System.out.println(requestOptimized+"|"+responseOptimized);
+ if(requestOptimized.equals("1") &&
!XOPContext.isXOPEncodedRequest())
+ {
+ throw new RuntimeException("Illegal state: No XOP encoded request
found");
+ }
+
if(responseOptimized.equals("0"))
{
CommonMessageContext ctx = MessageContextAssociation.peekMessageContext();
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingDataHandler.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingDataHandler.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingDataHandler.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,57 @@
+/*
+* 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.test.ws.jaxrpc.xop.shared;
+
+import javax.activation.DataHandler;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: PingDataHandler.java 1296 2006-10-24 14:06:00Z heiko.braun(a)jboss.com $
+ * @since Oct 23, 2006
+ */
+public class PingDataHandler {
+ String message;
+ DataHandler xopContent;
+
+ public PingDataHandler() {
+ }
+
+ public PingDataHandler(DataHandler dataHandler) {
+ this.xopContent = dataHandler;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public DataHandler getXopContent() {
+ return xopContent;
+ }
+
+ public void setXopContent(DataHandler xopContent) {
+ this.xopContent = xopContent;
+ }
+}
Added:
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingDataHandlerResponse.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingDataHandlerResponse.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingDataHandlerResponse.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,48 @@
+/*
+* 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.test.ws.jaxrpc.xop.shared;
+
+import javax.activation.DataHandler;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: PingDataHandlerResponse.java 1296 2006-10-24 14:06:00Z
heiko.braun(a)jboss.com $
+ * @since Oct 23, 2006
+ */
+public class PingDataHandlerResponse {
+ DataHandler xopContent;
+
+ public PingDataHandlerResponse() {
+ }
+
+ public PingDataHandlerResponse(DataHandler dataHandler) {
+ this.xopContent = dataHandler;
+ }
+
+ public DataHandler getXopContent() {
+ return xopContent;
+ }
+
+ public void setXopContent(DataHandler xopContent) {
+ this.xopContent = xopContent;
+ }
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingImage.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingImage.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingImage.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,59 @@
+/*
+* 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.test.ws.jaxrpc.xop.shared;
+
+import java.awt.*;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: PingImage.java 1296 2006-10-24 14:06:00Z heiko.braun(a)jboss.com $
+ * @since Oct 17, 2006
+ */
+public class PingImage {
+
+ String message;
+ Image xopContent;
+
+ public PingImage() {
+ }
+
+ public PingImage(String message, Image xopContent) {
+ this.message = message;
+ this.xopContent = xopContent;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public Image getXopContent() {
+ return xopContent;
+ }
+
+ public void setXopContent(Image xopContent) {
+ this.xopContent = xopContent;
+ }
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingImageResponse.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingImageResponse.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingImageResponse.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,49 @@
+/*
+* 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.test.ws.jaxrpc.xop.shared;
+
+import java.awt.*;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: PingImageResponse.java 1296 2006-10-24 14:06:00Z heiko.braun(a)jboss.com
$
+ * @since Oct 17, 2006
+ */
+public class PingImageResponse {
+
+ Image xopContent;
+
+ public PingImageResponse() {
+ }
+
+ public PingImageResponse(Image xopContent) {
+ this.xopContent = xopContent;
+ }
+
+ public Image getXopContent() {
+ return xopContent;
+ }
+
+ public void setXopContent(Image xopContent) {
+ this.xopContent = xopContent;
+ }
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingSource.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingSource.java 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingSource.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,50 @@
+/*
+* 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.test.ws.jaxrpc.xop.shared;
+
+import javax.xml.transform.Source;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: PingSource.java 1296 2006-10-24 14:06:00Z heiko.braun(a)jboss.com $
+ * @since Oct 19, 2006
+ */
+public class PingSource {
+ String message;
+ Source xopContent;
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public Source getXopContent() {
+ return xopContent;
+ }
+
+ public void setXopContent(Source xopContent) {
+ this.xopContent = xopContent;
+ }
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingSourceResponse.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingSourceResponse.java 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/PingSourceResponse.java 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,49 @@
+/*
+* 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.test.ws.jaxrpc.xop.shared;
+
+import javax.xml.transform.Source;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id: PingSourceResponse.java 1296 2006-10-24 14:06:00Z heiko.braun(a)jboss.com
$
+ * @since Oct 19, 2006
+ */
+public class PingSourceResponse {
+
+ Source xopContent;
+
+ public PingSourceResponse() {
+ }
+
+ public PingSourceResponse(Source source) {
+ this.xopContent = source;
+ }
+
+ public Source getXopContent() {
+ return xopContent;
+ }
+
+ public void setXopContent(Source xopContent) {
+ this.xopContent = xopContent;
+ }
+}
Modified: trunk/src/test/resources/jaxrpc/samples/mtom/META-INF/application-client.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/samples/mtom/META-INF/application-client.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/samples/mtom/META-INF/application-client.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -10,10 +10,10 @@
<service-ref>
<service-ref-name>service/XOPTestService</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <wsdl-file>META-INF/wsdl/EmployeeService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component-ref>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.samples.mtom.XOPTest</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.samples.mtom.EmployeeRecords</service-endpoint-interface>
</port-component-ref>
</service-ref>
Modified: trunk/src/test/resources/jaxrpc/samples/mtom/META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/samples/mtom/META-INF/jboss-client.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/samples/mtom/META-INF/jboss-client.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,6 +1,8 @@
<?xml version='1.0' encoding='UTF-8' ?>
-<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
<jboss-client>
<jndi-name>jbossws-client</jndi-name>
Modified: trunk/src/test/resources/jaxrpc/samples/mtom/WEB-INF/web.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/samples/mtom/WEB-INF/web.xml 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/test/resources/jaxrpc/samples/mtom/WEB-INF/web.xml 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -6,12 +6,12 @@
version="2.4">
<servlet>
- <servlet-name>XOPTestJSE</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxrpc.samples.mtom.XOPTestImpl</servlet-class>
+ <servlet-name>EmployeeEndpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxrpc.samples.mtom.EmployeeRecordsImpl</servlet-class>
</servlet>
<servlet-mapping>
- <servlet-name>XOPTestJSE</servlet-name>
+ <servlet-name>EmployeeEndpoint</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
Deleted: trunk/src/test/resources/jaxrpc/samples/mtom/attach.gif
===================================================================
(Binary files differ)
Deleted: trunk/src/test/resources/jaxrpc/samples/mtom/attach.html
===================================================================
--- trunk/src/test/resources/jaxrpc/samples/mtom/attach.html 2006-12-01 13:40:09 UTC (rev
1528)
+++ trunk/src/test/resources/jaxrpc/samples/mtom/attach.html 2006-12-01 15:44:10 UTC (rev
1529)
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<head>
-<title>Welcome to the JAXM TCK, Version 1.1</title>
-</head>
-<body bgcolor="#ffffff">
-<CENTER><h1>Your Starting Point</h1></center><hr>
-
-
-<h2>Guide to Documentation</h2>
-
-<p>The <a href="COPYRIGHT-jaxm.html">JAXM Copyright</a>
provides
- the copyright information notice for the JAXM TCK, Version 1.1.<p>
-
-<p>The <a href="ReleaseNotes-jaxm.html">JAXM ReleaseNotes</a>
provide the
- information that you need to install, set up, and run the JAXM TCK, Version
1.1.<p>
-
-<p>The <a href="JAXMJavadocAssertions.html">Javadoc Assertion
List</a> lists all the javadoc assertions that are tested by the JAXM TCK.
-
-<p>The <a href="JAXMSpecAssertions.html">Specification Assertion
List</a> lists all the specification assertions that are tested by the JAXM TCK.
-
-<p>Additional documentation includes the JavaTest README file, ReleaseNotes
- file, and user's guide:
-
-<ul>
-<li><p>The <a
href="JavaTest3.0/README-javatest.html">README</a> file contains
- basic information about the JavaTest, Version 3.0.2 harness.</p></li>
-
-<li><p>The <a
href="JavaTest3.0/javatest.pdf"><em>JavaTest User's
Guide</em></a>,
- in PDF format, contains information about using the test harness
tool.</p></li>
-
-<li><p>The <a
href="JavaTest3.0/ReleaseNotes-javatest.html">ReleaseNotes</a>
- provide information that is not contained in the <em>JavaTest User's
- Guide</em> manual, and which supercede any information in the
manual.<p></li>
-</ul>
-
-<p> </p>
-<rule>
-<p><em>Copyright © 2002 Sun Microsystems, Inc. All rights
reserved</em></p>
-</body>
-</html>
Deleted: trunk/src/test/resources/jaxrpc/samples/mtom/attach.jpeg
===================================================================
(Binary files differ)
Deleted: trunk/src/test/resources/jaxrpc/samples/mtom/attach.txt
===================================================================
--- trunk/src/test/resources/jaxrpc/samples/mtom/attach.txt 2006-12-01 13:40:09 UTC (rev
1528)
+++ trunk/src/test/resources/jaxrpc/samples/mtom/attach.txt 2006-12-01 15:44:10 UTC (rev
1529)
@@ -1 +0,0 @@
-This is a plain text attachment.
Deleted: trunk/src/test/resources/jaxrpc/samples/mtom/attach.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/samples/mtom/attach.xml 2006-12-01 13:40:09 UTC (rev
1528)
+++ trunk/src/test/resources/jaxrpc/samples/mtom/attach.xml 2006-12-01 15:44:10 UTC (rev
1529)
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<mime-message>This is an xml attachment.</mime-message>
Deleted: trunk/src/test/resources/jaxrpc/samples/mtom/disguised_jpeg.xcf
===================================================================
(Binary files differ)
Modified: trunk/src/test/resources/jaxrpc/samples/mtom/wstools-config.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/samples/mtom/wstools-config.xml 2006-12-01 13:40:09
UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/samples/mtom/wstools-config.xml 2006-12-01 15:44:10
UTC (rev 1529)
@@ -8,7 +8,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
<java-wsdl>
- <service name="TestService" style="rpc"
endpoint="org.jboss.test.ws.jaxrpc.samples.mtom.XOPTest">
+ <service name="TestService" style="rpc"
endpoint="org.jboss.test.ws.jaxrpc.samples.mtom.EmployeeRecords">
<operation>
<name>sendMimeImageGIF</name>
<parameter>
Modified:
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/jaxrpc-mapping.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/jaxrpc-mapping.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/jaxrpc-mapping.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,184 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
-<java-wsdl-mapping
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
- <package-mapping>
- <package-type>org.jboss.test.ws.jaxrpc.samples.mtom</package-type>
- <namespaceURI>http://org.jboss.ws/samples/mtom</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
-
<service-interface>org.jboss.test.ws.jaxrpc.samples.mtom.XOPTest_Service</service-interface>
- <wsdl-service-name
xmlns:serviceNS="http://org.jboss.ws/samples/mtom">serviceNS:XOPTest</wsdl-service-name>
- <port-mapping>
- <port-name>XOPTestPort</port-name>
- <java-port-name>XOPTestPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.samples.mtom.XOPTest</service-endpoint-interface>
- <wsdl-port-type
xmlns:portTypeNS="http://org.jboss.ws/samples/mtom">portTypeNS:XOPTest</wsdl-port-type>
- <wsdl-binding
xmlns:bindingNS="http://org.jboss.ws/samples/mtom">bindingNS:XOPTestBinding</wsdl-binding>
+<java-wsdl-mapping
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.1"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
- <service-endpoint-method-mapping>
- <java-method-name>sendMimeImageJPEG</java-method-name>
- <wsdl-operation>sendMimeImageJPEG</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeImageJPEG</wsdl-message>
- <wsdl-message-part-name>message</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.samples.mtom</package-type>
+ <namespaceURI>http://org.jboss.ws/samples/mtom</namespaceURI>
+ </package-mapping>
- <!-- BEGIN manual modification -->
- <method-param-parts-mapping>
- <param-position>1</param-position>
- <param-type>javax.activation.DataHandler</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeImageJPEG</wsdl-message>
- <wsdl-message-part-name>xoppart</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <!-- END manual modification -->
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.samples.mtom.Employee</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://org.jboss.ws/samples/mtom'>typeNS:>Employee</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>firstname</java-variable-name>
+ <xml-element-name>firstname</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>lastname</java-variable-name>
+ <xml-element-name>lastname</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>legacyData</java-variable-name>
+ <xml-element-name>legacyData</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
- <wsdl-return-value-mapping>
-
<method-return-value>javax.activation.DataHandler</method-return-value>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeImageJPEGResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.samples.mtom.Status</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://org.jboss.ws/samples/mtom'>typeNS:>Status</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>code</java-variable-name>
+ <xml-element-name>code</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
- <service-endpoint-method-mapping>
- <java-method-name>sendMimeTextPlain</java-method-name>
- <wsdl-operation>sendMimeTextPlain</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeTextPlain</wsdl-message>
- <wsdl-message-part-name>message</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.samples.mtom.Query</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://org.jboss.ws/samples/mtom'>typeNS:>Query</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>firstname</java-variable-name>
+ <xml-element-name>firstname</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>lastname</java-variable-name>
+ <xml-element-name>lastname</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
- <!-- BEGIN manual modification -->
- <method-param-parts-mapping>
- <param-position>1</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeTextPlain</wsdl-message>
- <wsdl-message-part-name>xoppart</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <!-- END manual modification -->
+ <service-interface-mapping>
+
<service-interface>org.jboss.test.ws.jaxrpc.samples.mtom.HRService</service-interface>
+ <wsdl-service-name
xmlns:serviceNS="http://org.jboss.ws/samples/mtom">serviceNS:EmployeeService</wsdl-service-name>
+ <port-mapping>
+ <port-name>EmployeeRecordsPort</port-name>
+ <java-port-name>EmployeeRecordsPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeTextPlainResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
+ <service-endpoint-interface-mapping>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.samples.mtom.EmployeeRecords</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS="http://org.jboss.ws/samples/mtom">portTypeNS:EmployeeRecords</wsdl-port-type>
+ <wsdl-binding
xmlns:bindingNS="http://org.jboss.ws/samples/mtom">bindingNS:EmployeeRecordsBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>sendMimeTextXML</java-method-name>
- <wsdl-operation>sendMimeTextXML</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeTextXML</wsdl-message>
- <wsdl-message-part-name>message</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>updateEmployee</java-method-name>
+ <wsdl-operation>updateEmployee</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+
<param-type>org.jboss.test.ws.jaxrpc.samples.mtom.Employee</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:UpdateRequest</wsdl-message>
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
- <!-- BEGIN manual modification -->
- <method-param-parts-mapping>
- <param-position>1</param-position>
- <param-type>javax.activation.DataHandler</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeTextXML</wsdl-message>
- <wsdl-message-part-name>xoppart</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <!-- END manual modification -->
+ <wsdl-return-value-mapping>
+
<method-return-value>org.jboss.test.ws.jaxrpc.samples.mtom.Status</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:UpdateResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
- <wsdl-return-value-mapping>
-
<method-return-value>javax.xml.transform.Source</method-return-value>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeTextXMLResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>queryEmployee</java-method-name>
+ <wsdl-operation>queryEmployee</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+
<param-type>org.jboss.test.ws.jaxrpc.samples.mtom.Query</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:QueryRequest</wsdl-message>
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
- <service-endpoint-method-mapping>
- <java-method-name>sendMimeApplicationXML</java-method-name>
- <wsdl-operation>sendMimeApplicationXML</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeApplicationXML</wsdl-message>
- <wsdl-message-part-name>message</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+
<method-return-value>org.jboss.test.ws.jaxrpc.samples.mtom.Employee</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:QueryResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
- <!-- BEGIN manual modification -->
- <method-param-parts-mapping>
- <param-position>1</param-position>
- <param-type>javax.xml.transform.Source</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeApplicationXML</wsdl-message>
- <wsdl-message-part-name>xoppart</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <!-- END manual modification -->
+ </service-endpoint-interface-mapping>
- <wsdl-return-value-mapping>
-
<method-return-value>javax.activation.DataHandler</method-return-value>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeApplicationXMLResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- <service-endpoint-method-mapping>
- <java-method-name>sendOctets</java-method-name>
- <wsdl-operation>sendOctets</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeApplicationXML</wsdl-message>
- <wsdl-message-part-name>message</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
-
- <!-- BEGIN manual modification -->
- <method-param-parts-mapping>
- <param-position>1</param-position>
- <param-type>byte[]</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeApplicationXML</wsdl-message>
- <wsdl-message-part-name>xoppart</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <!-- END manual modification -->
-
- <wsdl-return-value-mapping>
- <method-return-value>byte[]</method-return-value>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.ws/samples/mtom">wsdlMsgNS:XOPTest_sendMimeApplicationXMLResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
-
- </service-endpoint-interface-mapping>
-
-
-</java-wsdl-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Modified: trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/webservices.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/webservices.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/webservices.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -8,14 +8,14 @@
<webservice-description>
<webservice-description-name>XOPTestService</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <wsdl-file>WEB-INF/wsdl/EmployeeService.wsdl</wsdl-file>
<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component>
- <port-component-name>XOPTestPort</port-component-name>
- <wsdl-port>impl:XOPTestPort</wsdl-port>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.samples.mtom.XOPTest</service-endpoint-interface>
+ <port-component-name>EmployeeRecordsPort</port-component-name>
+ <wsdl-port>impl:EmployeeRecordsPort</wsdl-port>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.samples.mtom.EmployeeRecords</service-endpoint-interface>
<service-impl-bean>
- <servlet-link>XOPTestJSE</servlet-link>
+ <servlet-link>EmployeeEndpoint</servlet-link>
</service-impl-bean>
</port-component>
</webservice-description>
Added:
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/wsdl/EmployeeService.wsdl
===================================================================
---
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/wsdl/EmployeeService.wsdl 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/wsdl/EmployeeService.wsdl 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<definitions name="XOPTest"
targetNamespace="http://org.jboss.ws/samples/mtom"
+ xmlns:tns="http://org.jboss.ws/samples/mtom"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <types>
+ <schema
xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://org.jboss.ws/samples/mtom"
+
xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
+
+ <import
schemaLocation="http://www.w3.org/2005/05/xmlmime"
namespace="http://www.w3.org/2005/05/xmlmime"/>
+
+ <element name="Employee">
+ <complexType>
+ <sequence>
+ <element name="firstname"
type="xsd:string"/>
+ <element name="lastname" type="xsd:string"/>
+ <element name="legacyData"
xmime:expectedContentTypes="text/xml" type="xmime:base64Binary"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="Status">
+ <complexType>
+ <sequence>
+ <element name="code" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="Query">
+ <complexType>
+ <sequence>
+ <element name="firstname"
type="xsd:string"/>
+ <element name="lastname" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </types>
+
+ <message name="UpdateRequest">
+ <part name="parameters" element="tns:Employee"/>
+ </message>
+
+ <message name="UpdateResponse">
+ <part name="result" element="tns:Status"/>
+ </message>
+
+ <message name="QueryRequest">
+ <part name="parameters" element="tns:Query"/>
+ </message>
+
+ <message name="QueryResponse">
+ <part name="result" element="tns:Employee"/>
+ </message>
+
+ <portType name="EmployeeRecords">
+ <operation name="updateEmployee">
+ <input message="tns:UpdateRequest"/>
+ <output message="tns:UpdateResponse"/>
+ </operation>
+ <operation name="queryEmployee">
+ <input message="tns:QueryRequest"/>
+ <output message="tns:QueryResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="EmployeeRecordsBinding"
type="tns:EmployeeRecords">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <operation name="updateEmployee">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
+ </output>
+ </operation>
+ <operation name="queryEmployee">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="EmployeeService">
+ <port name="EmployeeRecordsPort"
binding="tns:EmployeeRecordsBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+</definitions>
Deleted:
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/wsdl/TestService.wsdl
===================================================================
---
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/wsdl/TestService.wsdl 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/samples-override/mtom/WEB-INF/wsdl/TestService.wsdl 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<definitions name="XOPTest"
targetNamespace="http://org.jboss.ws/samples/mtom"
- xmlns:tns="http://org.jboss.ws/samples/mtom"
-
xmlns="http://schemas.xmlsoap.org/wsdl/"
-
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
-
xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
-
- <types>
- <schema
xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://org.jboss.ws/samples/mtom"
-
xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
- <import
namespace="http://www.w3.org/2005/05/xmlmime"/>
- <complexType name="XOPBinary" >
- <simpleContent>
- <extension base="xsd:base64Binary" >
- <attribute ref="xmime:contentType"/>
- </extension>
- </simpleContent>
- </complexType>
- </schema>
- </types>
-
- <message name="XOPTest_sendMimeImageJPEG">
- <part name="message" type="xsd:string"/>
- <part name="xoppart" type="tns:XOPBinary"/>
- </message>
- <message name="XOPTest_sendMimeImageJPEGResponse">
- <part name="result" type="xmime:base64Binary"/>
- </message>
- <message name="XOPTest_sendMimeTextPlain">
- <part name="message" type="xsd:string"/>
- <part name="xoppart" type="tns:XOPBinary"/>
- </message>
- <message name="XOPTest_sendMimeTextPlainResponse">
- <part name="result" type="xmime:base64Binary"/>
- </message>
- <message name="XOPTest_sendMimeTextXML">
- <part name="message" type="xsd:string"/>
- <part name="xoppart" type="xmime:base64Binary"/>
- </message>
- <message name="XOPTest_sendMimeTextXMLResponse">
- <part name="result" type="xmime:base64Binary"/>
- </message>
- <message name="XOPTest_sendMimeApplicationXML">
- <part name="message" type="xsd:string"/>
- <part name="xoppart" type="xmime:base64Binary"/>
- </message>
- <message name="XOPTest_sendMimeApplicationXMLResponse">
- <part name="result" type="xmime:base64Binary"/>
- </message>
-
- <message name="XOPTest_sendOctets">
- <part name="message" type="xsd:string"/>
- <part name="xoppart" type="xsd:base64Binary"/>
- </message>
- <message name="XOPTest_sendOctetsResponse">
- <part name="result" type="xsd:base64Binary"/>
- </message>
-
- <portType name="XOPTest">
- <operation name="sendMimeImageJPEG">
- <input message="tns:XOPTest_sendMimeImageJPEG"/>
- <output message="tns:XOPTest_sendMimeImageJPEGResponse"/>
- </operation>
- <operation name="sendMimeTextPlain">
- <input message="tns:XOPTest_sendMimeTextPlain"/>
- <output message="tns:XOPTest_sendMimeTextPlainResponse"/>
- </operation>
- <operation name="sendMimeTextXML">
- <input message="tns:XOPTest_sendMimeTextXML"/>
- <output message="tns:XOPTest_sendMimeTextXMLResponse"/>
- </operation>
- <operation name="sendMimeApplicationXML">
- <input message="tns:XOPTest_sendMimeApplicationXML"/>
- <output message="tns:XOPTest_sendMimeApplicationXMLResponse"/>
- </operation>
-
- <operation name="sendOctets">
- <input message="tns:XOPTest_sendOctets"/>
- <output message="tns:XOPTest_sendOctetsResponse"/>
- </operation>
- </portType>
-
- <binding name="XOPTestBinding" type="tns:XOPTest">
- <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="rpc"/>
- <operation name="sendMimeImageJPEG">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
- </input>
- <output>
- <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
- </output>
- </operation>
- <operation name="sendMimeTextPlain">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
- </input>
- <output>
- <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
- </output>
- </operation>
- <operation name="sendMimeTextXML">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
- </input>
- <output>
- <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
- </output>
- </operation>
- <operation name="sendMimeApplicationXML">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
- </input>
- <output>
- <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
- </output>
- </operation>
- <operation name="sendOctets">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
- </input>
- <output>
- <soap:body use="literal"
namespace="http://org.jboss.ws/samples/mtom"/>
- </output>
- </operation>
- </binding>
-
- <service name="XOPTest">
- <port name="XOPTestPort" binding="tns:XOPTestBinding">
- <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
- </port>
- </service>
-</definitions>
Modified: trunk/src/test/resources/jaxrpc/xop/doclit/META-INF/application-client.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/doclit/META-INF/application-client.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/doclit/META-INF/application-client.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -13,7 +13,7 @@
<wsdl-file>use overwrite in jboss-client.xml</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component-ref>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.doclit.TestService_PortType</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.doclit.XOPPing</service-endpoint-interface>
</port-component-ref>
</service-ref>
Modified: trunk/src/test/resources/jaxrpc/xop/doclit/META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/doclit/META-INF/jboss-client.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/doclit/META-INF/jboss-client.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,6 +1,8 @@
<?xml version='1.0' encoding='UTF-8' ?>
-<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
<jboss-client>
<jndi-name>jbossws-client</jndi-name>
Modified: trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/jaxrpc-mapping.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/jaxrpc-mapping.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,12 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping
version='1.1'
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
<package-mapping>
<package-type>org.jboss.test.ws.jaxrpc.xop.doclit</package-type>
- <
namespaceURI>http://jboss.org/test/ws/xop/doclit</namespaceURI>
+ <
namespaceURI>http://jboss.org/test/ws/xop</namespaceURI>
</package-mapping>
-
+
<java-xml-type-mapping>
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingMsg</java-type>
- <anonymous-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop/doclit'>typeNS:&...
+ <anonymous-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:>Pin...
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>message</java-variable-name>
@@ -20,7 +20,7 @@
<java-xml-type-mapping>
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse</java-type>
- <anonymous-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop/doclit'>typeNS:&...
+ <anonymous-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:>Pin...
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>xopContent</java-variable-name>
@@ -28,9 +28,81 @@
</variable-mapping>
</java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingImage</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:>Pin...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>message</java-variable-name>
+ <xml-element-name>message</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingImageResponse</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:>Pin...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingSource</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:>Pin...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>message</java-variable-name>
+ <xml-element-name>message</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingSourceResponse</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:>Pin...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandler</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:>Pin...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>message</java-variable-name>
+ <xml-element-name>message</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandlerResponse</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:>Pin...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
<service-interface-mapping>
-
<service-interface>org.jboss.test.ws.jaxrpc.xop.doclit.TestService_Service</service-interface>
- <wsdl-service-name
xmlns:serviceNS='http://jboss.org/test/ws/xop/doclit'>serviceN...
+
<service-interface>org.jboss.test.ws.jaxrpc.xop.doclit.XOPPingService</service-interface>
+ <wsdl-service-name
xmlns:serviceNS='http://jboss.org/test/ws/xop'>serviceNS:TestS...
<port-mapping>
<port-name>TestServicePort</port-name>
<java-port-name>TestServicePort</java-port-name>
@@ -38,9 +110,10 @@
</service-interface-mapping>
<service-endpoint-interface-mapping>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.doclit.TestService_PortType</service-endpoint-interface>
- <wsdl-port-type
xmlns:portTypeNS='http://jboss.org/test/ws/xop/doclit'>portTyp...
- <wsdl-binding
xmlns:bindingNS='http://jboss.org/test/ws/xop/doclit'>bindingN...
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.doclit.XOPPing</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS='http://jboss.org/test/ws/xop'>portTypeNS:Tes...
+ <wsdl-binding
xmlns:bindingNS='http://jboss.org/test/ws/xop'>bindingNS:TestS...
+
<service-endpoint-method-mapping>
<java-method-name>ping</java-method-name>
<wsdl-operation>ping</wsdl-operation>
@@ -48,16 +121,74 @@
<param-position>0</param-position>
<param-type>org.jboss.test.ws.jaxrpc.xop.shared.PingMsg</param-type>
<wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop/doclit'>wsdlMsgN...
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingI...
<wsdl-message-part-name>parameters</wsdl-message-part-name>
<parameter-mode>IN</parameter-mode>
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
<method-return-value>org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse</method-return-value>
- <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop/doclit'>wsdlMsgN...
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingO...
<wsdl-message-part-name>parameters</wsdl-message-part-name>
</wsdl-return-value-mapping>
</service-endpoint-method-mapping>
+
+ <service-endpoint-method-mapping>
+ <java-method-name>pingImage</java-method-name>
+ <wsdl-operation>pingImage</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+
<param-type>org.jboss.test.ws.jaxrpc.xop.shared.PingImage</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingI...
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+
<method-return-value>org.jboss.test.ws.jaxrpc.xop.shared.PingImageResponse</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingI...
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+
+ <service-endpoint-method-mapping>
+ <java-method-name>pingSource</java-method-name>
+ <wsdl-operation>pingSource</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+
<param-type>org.jboss.test.ws.jaxrpc.xop.shared.PingSource</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingS...
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+
<method-return-value>org.jboss.test.ws.jaxrpc.xop.shared.PingSourceResponse</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingS...
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+
+ <service-endpoint-method-mapping>
+ <java-method-name>pingDataHandler</java-method-name>
+ <wsdl-operation>pingDataHandler</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+
<param-type>org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandler</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingD...
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+
<method-return-value>org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandlerResponse</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingD...
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+
</service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
+</java-wsdl-mapping>
Modified: trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/web.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/web.xml 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/web.xml 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -7,7 +7,7 @@
<servlet>
<servlet-name>TestService</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxrpc.xop.doclit.TestServiceImpl</servlet-class>
+
<servlet-class>org.jboss.test.ws.jaxrpc.xop.doclit.XOPPingImpl</servlet-class>
</servlet>
<servlet-mapping>
Modified: trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/webservices.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/webservices.xml 2006-12-01 13:40:09
UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/webservices.xml 2006-12-01 15:44:10
UTC (rev 1529)
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<webservices
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:impl="http://jboss.org/test/ws/xop/doclit"
+
xmlns:impl="http://jboss.org/test/ws/xop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
version="1.1">
<webservice-description>
<webservice-description-name>XOP DOC/Lit without
handlers</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <wsdl-file>WEB-INF/wsdl/service-doclit.wsdl</wsdl-file>
<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component>
<port-component-name>TestServicePort</port-component-name>
<wsdl-port>impl:TestServicePort</wsdl-port>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.doclit.TestService_PortType</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.doclit.XOPPing</service-endpoint-interface>
<service-impl-bean>
<servlet-link>TestService</servlet-link>
</service-impl-bean>
Deleted: trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/TestService.wsdl 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/TestService.wsdl 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<definitions
-
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
-
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
-
xmlns:s="http://www.w3.org/2001/XMLSchema"
-
xmlns:s0="http://jboss.org/test/ws/xop/doclit"
-
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
-
xmlns:tns="http://jboss.org/test/ws/xop/doclit"
-
targetNamespace="http://jboss.org/test/ws/xop/doclit"
-
xmlns="http://schemas.xmlsoap.org/wsdl/">
-
- <types>
- <s:schema
xmlns="http://www.w3.org/2001/XMLSchema"
-
targetNamespace="http://jboss.org/test/ws/xop/doclit"
-
xmlns:xmime="http://www.w3.org/2005/05/xmlmime" >
-
- <import
namespace="http://www.w3.org/2005/05/xmlmime"/>
-
- <s:element name="PingMsg">
- <s:complexType>
- <s:sequence>
- <s:element name="message" minOccurs="0"
maxOccurs="1" type="s:string" />
- <s:element name="xopContent" minOccurs="0"
maxOccurs="1" type="s:base64Binary"/>
- </s:sequence>
- </s:complexType>
- </s:element>
- <s:element name="PingMsgResponse">
- <s:complexType>
- <s:sequence>
- <s:element name="xopContent" minOccurs="0"
maxOccurs="1" xmime:expectedContentTypes="text/plain"
type="xmime:base64Binary"/>
- </s:sequence>
- </s:complexType>
- </s:element>
-
- </s:schema>
- </types>
-
- <message name="PingIn">
- <part name="parameters" element="s0:PingMsg" />
- </message>
- <message name="PingOut">
- <part name="parameters" element="s0:PingMsgResponse" />
- </message>
-
- <portType name="TestService">
- <operation name="ping">
- <input message="s0:PingIn" />
- <output message="s0:PingOut" />
- </operation>
- </portType>
-
- <binding name="TestServiceBinding" type="s0:TestService">
- <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
- <operation name="ping">
- <soap:operation
soapAction="http://jboss.org/test/ws/xop/doclit/Ping" style="document"
/>
- <input>
- <soap:body use="literal" />
- </input>
- <output>
- <soap:body use="literal" />
- </output>
- </operation>
- </binding>
-
- <service name="TestService">
- <port name="TestServicePort"
binding="s0:TestServiceBinding">
- <soap:address location="REPLACE_WITH_ACTUAL_URL" />
- </port>
- </service>
-</definitions>
\ No newline at end of file
Added: trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/service-doclit.wsdl
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/service-doclit.wsdl 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/service-doclit.wsdl 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions
+
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+
xmlns:tns="http://jboss.org/test/ws/xop"
+
targetNamespace="http://jboss.org/test/ws/xop"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:types>
+ <xsd:import schemaLocation="xsd0.xsd"/>
+ </wsdl:types>
+
+ <wsdl:import
namespace="http://jboss.org/test/ws/xop"
location="wsdl0.wsdl"/>
+
+ <wsdl:binding name="TestServiceBinding"
type="tns:TestService">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
+ <wsdl:operation name="ping">
+ <soap:operation
soapAction="http://jboss.org/test/ws/xop/Ping"
style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="pingImage">
+ <soap:operation
soapAction="http://jboss.org/test/ws/xop/PingImage"
style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="pingSource">
+ <soap:operation
soapAction="http://jboss.org/test/ws/xop/PingSource" style="document"
/>
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="pingDataHandler">
+ <soap:operation
soapAction="http://jboss.org/test/ws/xop/PingDataHandler"
style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="TestService">
+ <wsdl:port name="TestServicePort"
binding="tns:TestServiceBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Added: trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/wsdl0.wsdl
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/wsdl0.wsdl 2006-12-01 13:40:09
UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/wsdl0.wsdl 2006-12-01 15:44:10
UTC (rev 1529)
@@ -0,0 +1,60 @@
+<?xml version="1.0" ?>
+
+<wsdl:definitions
+
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+
xmlns:tns="http://jboss.org/test/ws/xop"
+
targetNamespace="http://jboss.org/test/ws/xop"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:message name="PingIn">
+ <wsdl:part name="parameters" element="tns:PingMsg" />
+ </wsdl:message>
+
+ <wsdl:message name="PingOut">
+ <wsdl:part name="parameters" element="tns:PingMsgResponse"
/>
+ </wsdl:message>
+
+ <wsdl:message name="PingImageIn">
+ <wsdl:part name="parameters" element="tns:PingImage" />
+ </wsdl:message>
+ <wsdl:message name="PingImageOut">
+ <wsdl:part name="parameters" element="tns:PingImageResponse"
/>
+ </wsdl:message>
+
+ <wsdl:message name="PingSourceIn">
+ <wsdl:part name="parameters" element="tns:PingSource" />
+ </wsdl:message>
+ <wsdl:message name="PingSourceOut">
+ <wsdl:part name="parameters"
element="tns:PingSourceResponse" />
+ </wsdl:message>
+
+ <wsdl:message name="PingDataHandlerIn">
+ <wsdl:part name="parameters" element="tns:PingDataHandler"
/>
+ </wsdl:message>
+ <wsdl:message name="PingDataHandlerOut">
+ <wsdl:part name="parameters"
element="tns:PingDataHandlerResponse" />
+ </wsdl:message>
+
+ <wsdl:portType name="TestService">
+ <wsdl:operation name="ping">
+ <wsdl:input message="tns:PingIn" />
+ <wsdl:output message="tns:PingOut" />
+ </wsdl:operation>
+ <wsdl:operation name="pingImage">
+ <wsdl:input message="tns:PingImageIn" />
+ <wsdl:output message="tns:PingImageOut" />
+ </wsdl:operation>
+ <wsdl:operation name="pingSource">
+ <wsdl:input message="tns:PingSourceIn" />
+ <wsdl:output message="tns:PingSourceOut" />
+ </wsdl:operation>
+ <wsdl:operation name="pingDataHandler">
+ <wsdl:input message="tns:PingDataHandlerIn" />
+ <wsdl:output message="tns:PingDataHandlerOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
\ No newline at end of file
Added: trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/xsd0.xsd
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/xsd0.xsd 2006-12-01 13:40:09
UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/doclit/WEB-INF/wsdl/xsd0.xsd 2006-12-01 15:44:10
UTC (rev 1529)
@@ -0,0 +1,108 @@
+<?xml version="1.0" ?>
+<s:schema
xmlns:s="http://www.w3.org/2001/XMLSchema"
+
targetNamespace="http://jboss.org/test/ws/xop"
+
xmlns:xmime="http://www.w3.org/2005/05/xmlmime" >
+
+ <s:import
namespace="http://www.w3.org/2005/05/xmlmime"/>
+
+ <!--
+ the xmime:expectedContentType is missing.
+ this maps to byte[]
+ -->
+ <s:element name="PingMsg">
+ <s:complexType>
+ <s:sequence>
+ <s:element name="message" minOccurs="0"
maxOccurs="1" type="s:string" />
+ <s:element name="xopContent" minOccurs="0"
maxOccurs="1" type="s:base64Binary"/>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+
+ <!--
+ a known media type maps to specific java type.
+ in this case a byte[] as well
+ -->
+ <s:element name="PingMsgResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element name="xopContent" minOccurs="0"
maxOccurs="1"
+ xmime:expectedContentTypes="application/octet-stream"
+ type="xmime:base64Binary"/>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+
+ <!--
+ a known media type that maps to java.awt.Image
+ -->
+ <s:element name="PingImage">
+ <s:complexType>
+ <s:sequence>
+ <s:element name="message" minOccurs="0"
maxOccurs="1" type="s:string" />
+ <s:element name="xopContent" minOccurs="0"
maxOccurs="1"
+ xmime:expectedContentTypes="image/jpeg"
+ type="xmime:base64Binary"/>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+
+ <s:element name="PingImageResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element name="xopContent" minOccurs="0"
maxOccurs="1"
+ xmime:expectedContentTypes="image/jpeg"
+ type="xmime:base64Binary"/>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+
+ <!--
+ a preferred media type specified through xmime:contentType.
+ this would map to javax.transform.Source
+ -->
+ <s:element name="PingSource">
+ <s:complexType>
+ <s:sequence>
+ <s:element name="message" minOccurs="0"
maxOccurs="1" type="s:string" />
+ <s:element name="xopContent" minOccurs="0"
maxOccurs="1"
+ xmime:expectedContentTypes="image/jpeg,text/xml"
+ xmime:contentType="text/xml"
+ type="xmime:base64Binary"/>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+
+ <s:element name="PingSourceResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element name="xopContent" minOccurs="0"
maxOccurs="1"
+ xmime:expectedContentTypes="text/xml"
+ type="xmime:base64Binary"/>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+
+ <!--
+ the preferred media type is not declared
+ binaries will be mapped to javax.activation.DataHandler
+ -->
+ <s:element name="PingDataHandler">
+ <s:complexType>
+ <s:sequence>
+ <s:element name="message" minOccurs="0"
maxOccurs="1" type="s:string" />
+ <s:element name="xopContent" minOccurs="0"
maxOccurs="1"
+ xmime:expectedContentTypes="image/jpeg,text/xml"
+ type="xmime:base64Binary"/>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+
+ <s:element name="PingDataHandlerResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element name="xopContent" minOccurs="0"
maxOccurs="1" type="s:base64Binary"/>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+
+</s:schema>
\ No newline at end of file
Modified:
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/META-INF/application-client.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/META-INF/application-client.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/META-INF/application-client.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -13,7 +13,7 @@
<wsdl-file>use overwrite in jboss-client.xml</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component-ref>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.doclit.TestService_PortType</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.doclit.XOPPing</service-endpoint-interface>
</port-component-ref>
<handler>
<handler-name>XOPInlineHandler</handler-name>
Modified:
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/META-INF/jboss-client.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/META-INF/jboss-client.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/META-INF/jboss-client.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,6 +1,8 @@
<?xml version='1.0' encoding='UTF-8' ?>
-<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
<jboss-client>
<jndi-name>jbossws-client</jndi-name>
Modified:
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/WEB-INF/webservices.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/WEB-INF/webservices.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/xop/doclit/handlerconfig/WEB-INF/webservices.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<webservices
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:impl="http://jboss.org/test/ws/xop/doclit"
+
xmlns:impl="http://jboss.org/test/ws/xop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
version="1.1">
<webservice-description>
<webservice-description-name>XOP DOC/Lit with
handlers</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <wsdl-file>WEB-INF/wsdl/service-doclit.wsdl</wsdl-file>
<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component>
<port-component-name>TestServicePort</port-component-name>
<wsdl-port>impl:TestServicePort</wsdl-port>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.doclit.TestService_PortType</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.doclit.XOPPing</service-endpoint-interface>
<handler>
<handler-name>XOPInlineHandler</handler-name>
<handler-class>org.jboss.test.ws.jaxrpc.xop.doclit.InlineHandler</handler-class>
Modified: trunk/src/test/resources/jaxrpc/xop/rpclit/META-INF/application-client.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/rpclit/META-INF/application-client.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/rpclit/META-INF/application-client.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -13,7 +13,7 @@
<wsdl-file>use overwrite in jboss-client.xml</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component-ref>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.TestService_PortType</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.XOPPing</service-endpoint-interface>
</port-component-ref>
</service-ref>
Modified: trunk/src/test/resources/jaxrpc/xop/rpclit/META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/rpclit/META-INF/jboss-client.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/rpclit/META-INF/jboss-client.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,6 +1,8 @@
<?xml version='1.0' encoding='UTF-8' ?>
-<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
<jboss-client>
<jndi-name>jbossws-client</jndi-name>
Modified: trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/jaxrpc-mapping.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/jaxrpc-mapping.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -5,12 +5,16 @@
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
<package-mapping>
<package-type>org.jboss.test.ws.jaxrpc.xop.rpclit</package-type>
- <
namespaceURI>http://jboss.org/test/ws/xop/rpclit</namespaceURI>
+ <
namespaceURI>http://jboss.org/test/ws/xop</namespaceURI>
</package-mapping>
-
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.xop.shared</package-type>
+ <
namespaceURI>http://jboss.org/test/ws/xop</namespaceURI>
+ </package-mapping>
+
<java-xml-type-mapping>
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingMsg</java-type>
- <root-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop/rpclit'>typeNS:Ping...
+ <root-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:PingInType&...
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>message</java-variable-name>
@@ -24,7 +28,7 @@
<java-xml-type-mapping>
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse</java-type>
- <root-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop/rpclit'>typeNS:Ping...
+ <root-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:PingOutType...
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>xopContent</java-variable-name>
@@ -32,9 +36,81 @@
</variable-mapping>
</java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingImage</java-type>
+ <root-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:PingImageTy...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>message</java-variable-name>
+ <xml-element-name>message</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingImageResponse</java-type>
+ <root-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:PingImageOu...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingSource</java-type>
+ <root-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:PingSourceT...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>message</java-variable-name>
+ <xml-element-name>message</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingSourceResponse</java-type>
+ <root-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:PingSourceO...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandler</java-type>
+ <root-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:PingDataHan...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>message</java-variable-name>
+ <xml-element-name>message</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandlerResponse</java-type>
+ <root-type-qname
xmlns:typeNS='http://jboss.org/test/ws/xop'>typeNS:PingDataHan...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>xopContent</java-variable-name>
+ <xml-element-name>xopContent</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+
<service-interface-mapping>
-
<service-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.TestService_Service</service-interface>
- <wsdl-service-name
xmlns:serviceNS='http://jboss.org/test/ws/xop/rpclit'>serviceN...
+
<service-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.XOPPingService</service-interface>
+ <wsdl-service-name
xmlns:serviceNS='http://jboss.org/test/ws/xop'>serviceNS:TestS...
<port-mapping>
<port-name>TestServicePort</port-name>
<java-port-name>TestServicePort</java-port-name>
@@ -42,25 +118,26 @@
</service-interface-mapping>
<service-endpoint-interface-mapping>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.TestService_PortType</service-endpoint-interface>
- <wsdl-port-type
xmlns:portTypeNS='http://jboss.org/test/ws/xop/rpclit'>portTyp...
- <wsdl-binding
xmlns:bindingNS='http://jboss.org/test/ws/xop/rpclit'>bindingN...
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.XOPPing</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS='http://jboss.org/test/ws/xop'>portTypeNS:Tes...
+ <wsdl-binding
xmlns:bindingNS='http://jboss.org/test/ws/xop'>bindingNS:TestS...
+
<service-endpoint-method-mapping>
- <java-method-name>pingComplex</java-method-name>
- <wsdl-operation>pingComplex</wsdl-operation>
+ <java-method-name>ping</java-method-name>
+ <wsdl-operation>ping</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
<param-type>org.jboss.test.ws.jaxrpc.xop.shared.PingMsg</param-type>
<wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop/rpclit'>wsdlMsgN...
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingI...
<wsdl-message-part-name>parameters</wsdl-message-part-name>
<parameter-mode>IN</parameter-mode>
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
<method-return-value>org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse</method-return-value>
- <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop/rpclit'>wsdlMsgN...
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingO...
<wsdl-message-part-name>result</wsdl-message-part-name>
</wsdl-return-value-mapping>
</service-endpoint-method-mapping>
@@ -72,7 +149,7 @@
<param-position>0</param-position>
<param-type>java.lang.String</param-type>
<wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop/rpclit'>wsdlMsgN...
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:Octet...
<wsdl-message-part-name>message</wsdl-message-part-name>
<parameter-mode>IN</parameter-mode>
</wsdl-message-mapping>
@@ -81,16 +158,74 @@
<param-position>1</param-position>
<param-type>byte[]</param-type>
<wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop/rpclit'>wsdlMsgN...
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:Octet...
<wsdl-message-part-name>xopContent</wsdl-message-part-name>
<parameter-mode>IN</parameter-mode>
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
<method-return-value>byte[]</method-return-value>
- <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop/rpclit'>wsdlMsgN...
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:Octet...
<wsdl-message-part-name>result</wsdl-message-part-name>
</wsdl-return-value-mapping>
</service-endpoint-method-mapping>
+
+ <service-endpoint-method-mapping>
+ <java-method-name>pingImage</java-method-name>
+ <wsdl-operation>pingImage</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+
<param-type>org.jboss.test.ws.jaxrpc.xop.shared.PingImage</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingI...
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+
<method-return-value>org.jboss.test.ws.jaxrpc.xop.shared.PingImageResponse</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingI...
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+
+ <service-endpoint-method-mapping>
+ <java-method-name>pingSource</java-method-name>
+ <wsdl-operation>pingSource</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+
<param-type>org.jboss.test.ws.jaxrpc.xop.shared.PingSource</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingS...
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+
<method-return-value>org.jboss.test.ws.jaxrpc.xop.shared.PingSourceResponse</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingS...
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+
+ <service-endpoint-method-mapping>
+ <java-method-name>pingDataHandler</java-method-name>
+ <wsdl-operation>pingDataHandler</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+
<param-type>org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandler</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingD...
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+
<method-return-value>org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandlerResponse</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://jboss.org/test/ws/xop'>wsdlMsgNS:PingD...
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+
</service-endpoint-interface-mapping>
-</java-wsdl-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Modified: trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/web.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/web.xml 2006-12-01 13:40:09 UTC
(rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/web.xml 2006-12-01 15:44:10 UTC
(rev 1529)
@@ -7,7 +7,7 @@
<servlet>
<servlet-name>TestService</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxrpc.xop.rpclit.TestServiceImpl</servlet-class>
+
<servlet-class>org.jboss.test.ws.jaxrpc.xop.rpclit.XOPPingImpl</servlet-class>
</servlet>
<servlet-mapping>
Modified: trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/webservices.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/webservices.xml 2006-12-01 13:40:09
UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/webservices.xml 2006-12-01 15:44:10
UTC (rev 1529)
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<webservices
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:impl="http://jboss.org/test/ws/xop/rpclit"
+
xmlns:impl="http://jboss.org/test/ws/xop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
version="1.1">
<webservice-description>
<webservice-description-name>XOP RPC/Lit without
handlers</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <wsdl-file>WEB-INF/wsdl/service-rpclit.wsdl</wsdl-file>
<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component>
<port-component-name>TestServicePort</port-component-name>
<wsdl-port>impl:TestServicePort</wsdl-port>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.TestService_PortType</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.XOPPing</service-endpoint-interface>
<service-impl-bean>
<servlet-link>TestService</servlet-link>
</service-impl-bean>
Deleted: trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/wsdl/TestService.wsdl 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/wsdl/TestService.wsdl 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<definitions
-
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
-
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
-
xmlns:s="http://www.w3.org/2001/XMLSchema"
-
xmlns:s0="http://jboss.org/test/ws/xop/rpclit"
-
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
-
xmlns:tns="http://jboss.org/test/ws/xop/rpclit"
-
targetNamespace="http://jboss.org/test/ws/xop/rpclit"
-
xmlns="http://schemas.xmlsoap.org/wsdl/">
-
- <types>
- <s:schema
xmlns="http://www.w3.org/2001/XMLSchema"
-
targetNamespace="http://jboss.org/test/ws/xop/rpclit"
-
xmlns:xmime="http://www.w3.org/2005/05/xmlmime" >
-
- <import
namespace="http://www.w3.org/2005/05/xmlmime"/>
-
- <s:complexType name="PingInType">
- <s:sequence>
- <s:element name="message" minOccurs="0"
maxOccurs="1" type="s:string" />
- <s:element name="xopContent" minOccurs="0"
maxOccurs="1" xmime:expectedContentTypes="text/plain"
type="xmime:base64Binary"/>
- </s:sequence>
- </s:complexType>
-
- <s:complexType name="PingOutType">
- <s:sequence>
- <s:element name="xopContent" minOccurs="0"
maxOccurs="1" xmime:expectedContentTypes="text/plain"
type="s:base64Binary"/>
- </s:sequence>
- </s:complexType>
-
- </s:schema>
- </types>
-
- <message name="PingIn">
- <part name="parameters" type="tns:PingInType" />
- </message>
- <message name="PingOut">
- <part name="result" type="tns:PingOutType" />
- </message>
-
- <message name="OctetsIn">
- <part name="message" type="s:string" />
- <part name="xopContent" type="s:base64Binary" />
- </message>
- <message name="OctetsOut">
- <part name="result" type="s:base64Binary" />
- </message>
-
- <portType name="TestService">
- <operation name="pingComplex" parameterOrder='parameters'>
- <input message="tns:PingIn" />
- <output message="tns:PingOut" />
- </operation>
-
- <operation name="pingSimple">
- <input message="tns:OctetsIn" />
- <output message="tns:OctetsOut" />
- </operation>
- </portType>
-
- <binding name="TestServiceBinding" type="tns:TestService">
- <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="rpc" />
- <operation name="pingComplex">
- <soap:operation soapAction="" style="rpc" />
- <input>
- <soap:body use="literal" />
- </input>
- <output>
- <soap:body use="literal" />
- </output>
- </operation>
- <operation name="pingSimple">
- <soap:operation
soapAction="http://jboss.org/test/ws/xop/rpclit/PingSimple"
style="rpc" />
- <input>
- <soap:body use="literal" />
- </input>
- <output>
- <soap:body use="literal" />
- </output>
- </operation>
- </binding>
-
- <service name="TestService">
- <port name="TestServicePort"
binding="tns:TestServiceBinding">
- <soap:address location="REPLACE_WITH_ACTUAL_URL" />
- </port>
- </service>
-</definitions>
\ No newline at end of file
Added: trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/wsdl/service-rpclit.wsdl
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/wsdl/service-rpclit.wsdl 2006-12-01
13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/rpclit/WEB-INF/wsdl/service-rpclit.wsdl 2006-12-01
15:44:10 UTC (rev 1529)
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions
+
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+
xmlns:tns="http://jboss.org/test/ws/xop"
+
targetNamespace="http://jboss.org/test/ws/xop"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:types>
+ <xsd:schema
targetNamespace="http://jboss.org/test/ws/xop"
+
xmlns:xmime="http://www.w3.org/2005/05/xmlmime" >
+
+ <xsd:import
namespace="http://www.w3.org/2005/05/xmlmime"/>
+
+ <xsd:complexType name="PingInType">
+ <xsd:sequence>
+ <xsd:element name="message" minOccurs="0"
maxOccurs="1" type="xsd:string" />
+ <xsd:element name="xopContent" minOccurs="0"
maxOccurs="1" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="PingOutType">
+ <xsd:sequence>
+ <xsd:element name="xopContent" minOccurs="0"
maxOccurs="1" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="PingImageType">
+ <xsd:sequence>
+ <xsd:element name="message" minOccurs="0"
maxOccurs="1" type="xsd:string" />
+ <xsd:element name="xopContent" minOccurs="0"
maxOccurs="1" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="PingImageOutType">
+ <xsd:sequence>
+ <xsd:element name="xopContent" minOccurs="0"
maxOccurs="1" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="PingSourceType">
+ <xsd:sequence>
+ <xsd:element name="message" minOccurs="0"
maxOccurs="1" type="xsd:string" />
+ <xsd:element name="xopContent" minOccurs="0"
maxOccurs="1" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="PingSourceOutType">
+ <xsd:sequence>
+ <xsd:element name="xopContent" minOccurs="0"
maxOccurs="1" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="PingDataHandlerType">
+ <xsd:sequence>
+ <xsd:element name="message" minOccurs="0"
maxOccurs="1" type="xsd:string" />
+ <xsd:element name="xopContent" minOccurs="0"
maxOccurs="1" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="PingDataHandlerOutType">
+ <xsd:sequence>
+ <xsd:element name="xopContent" minOccurs="0"
maxOccurs="1" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+
+ </wsdl:types>
+
+ <wsdl:message name="PingIn">
+ <wsdl:part name="parameters" type="tns:PingInType" />
+ </wsdl:message>
+
+ <wsdl:message name="PingOut">
+ <wsdl:part name="result" type="tns:PingOutType" />
+ </wsdl:message>
+
+ <wsdl:message name="OctetsIn">
+ <wsdl:part name="message" type="xsd:string" />
+ <wsdl:part name="xopContent" type="xsd:base64Binary" />
+ </wsdl:message>
+
+ <wsdl:message name="OctetsOut">
+ <wsdl:part name="result" type="xsd:base64Binary" />
+ </wsdl:message>
+
+ <wsdl:message name="PingImageIn">
+ <wsdl:part name="parameters" type="tns:PingImageType" />
+ </wsdl:message>
+ <wsdl:message name="PingImageOut">
+ <wsdl:part name="result" type="tns:PingImageOutType" />
+ </wsdl:message>
+
+ <wsdl:message name="PingSourceIn">
+ <wsdl:part name="parameters" type="tns:PingSourceType"
/>
+ </wsdl:message>
+ <wsdl:message name="PingSourceOut">
+ <wsdl:part name="result" type="tns:PingSourceOutType" />
+ </wsdl:message>
+
+ <wsdl:message name="PingDataHandlerIn">
+ <wsdl:part name="parameters" type="tns:PingDataHandlerType"
/>
+ </wsdl:message>
+ <wsdl:message name="PingDataHandlerOut">
+ <wsdl:part name="result" type="tns:PingDataHandlerOutType"
/>
+ </wsdl:message>
+
+ <wsdl:portType name="TestService">
+ <wsdl:operation name="ping">
+ <wsdl:input message="tns:PingIn" />
+ <wsdl:output message="tns:PingOut" />
+ </wsdl:operation>
+ <wsdl:operation name="pingSimple">
+ <wsdl:input message="tns:OctetsIn" />
+ <wsdl:output message="tns:OctetsOut" />
+ </wsdl:operation>
+ <wsdl:operation name="pingImage">
+ <wsdl:input message="tns:PingImageIn" />
+ <wsdl:output message="tns:PingImageOut" />
+ </wsdl:operation>
+ <wsdl:operation name="pingSource">
+ <wsdl:input message="tns:PingSourceIn" />
+ <wsdl:output message="tns:PingSourceOut" />
+ </wsdl:operation>
+ <wsdl:operation name="pingDataHandler">
+ <wsdl:input message="tns:PingDataHandlerIn" />
+ <wsdl:output message="tns:PingDataHandlerOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+
+ <wsdl:binding name="TestServiceBinding"
type="tns:TestService">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="rpc" />
+ <wsdl:operation name="ping">
+ <soap:operation soapAction="" style="rpc" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="pingSimple">
+ <soap:operation
soapAction="http://jboss.org/test/ws/xop/PingSimple" style="rpc"
/>
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="pingImage">
+ <soap:operation soapAction="" style="rpc" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="pingSource">
+ <soap:operation soapAction="" style="rpc" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="pingDataHandler">
+ <soap:operation soapAction="" style="rpc" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="TestService">
+ <wsdl:port name="TestServicePort"
binding="tns:TestServiceBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Modified:
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/META-INF/application-client.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/META-INF/application-client.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/META-INF/application-client.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -13,7 +13,7 @@
<wsdl-file>use overwrite in jboss-client.xml</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component-ref>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.TestService_PortType</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.XOPPing</service-endpoint-interface>
</port-component-ref>
<handler>
<handler-name>XOPInlineHandler</handler-name>
Modified:
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/META-INF/jboss-client.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/META-INF/jboss-client.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/META-INF/jboss-client.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,6 +1,8 @@
<?xml version='1.0' encoding='UTF-8' ?>
-<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
<jboss-client>
<jndi-name>jbossws-client</jndi-name>
Modified:
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/WEB-INF/webservices.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/WEB-INF/webservices.xml 2006-12-01
13:40:09 UTC (rev 1528)
+++
trunk/src/test/resources/jaxrpc/xop/rpclit/handlerconfig/WEB-INF/webservices.xml 2006-12-01
15:44:10 UTC (rev 1529)
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<webservices
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:impl="http://jboss.org/test/ws/xop/rpclit"
+
xmlns:impl="http://jboss.org/test/ws/xop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
version="1.1">
<webservice-description>
<webservice-description-name>XOP RPC/Lit with
handlers</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <wsdl-file>WEB-INF/wsdl/service-rpclit.wsdl</wsdl-file>
<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component>
<port-component-name>TestServicePort</port-component-name>
<wsdl-port>impl:TestServicePort</wsdl-port>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.TestService_PortType</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.xop.rpclit.XOPPing</service-endpoint-interface>
<handler>
<handler-name>XOPInlineHandler</handler-name>
<handler-class>org.jboss.test.ws.jaxrpc.xop.rpclit.InlineHandler</handler-class>
Modified: trunk/src/test/resources/jaxrpc/xop/schema.xsd
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/schema.xsd 2006-12-01 13:40:09 UTC (rev 1528)
+++ trunk/src/test/resources/jaxrpc/xop/schema.xsd 2006-12-01 15:44:10 UTC (rev 1529)
@@ -9,7 +9,7 @@
<s:complexType>
<s:sequence>
<s:element name="message" minOccurs="0"
maxOccurs="1" type="s:string" />
- <s:element name="imagejpeg"
xmime:contentType="image/jpeg" type="tns:XOPBinary"/>
+ <s:element name="xopContent"
xmime:contentType="image/jpeg" type="tns:XOPBinary"/>
</s:sequence>
</s:complexType>
</s:element>
@@ -17,7 +17,7 @@
<s:element name="PingMsgResponse">
<s:complexType>
<s:sequence>
- <s:element name="imagejpeg"
xmime:contentType="image/jpeg" type="xmime:base64Binary"/>
+ <s:element name="xopContent"
xmime:contentType="image/jpeg" type="xmime:base64Binary"/>
</s:sequence>
</s:complexType>
</s:element>
@@ -33,7 +33,7 @@
<s:element name="MSFTBinary">
<s:complexType>
<s:sequence>
- <s:element minOccurs="0" name="array"
nillable="true" type="s:base64Binary"/>
+ <s:element minOccurs="0" name="xopContent"
nillable="true" type="s:base64Binary"/>
</s:sequence>
</s:complexType>
</s:element>