[jboss-svn-commits] JBossWS SVN: r651 - in branches/jbossws-1.0/src: main/java/org/jboss/ws/soap main/java/org/jboss/ws/soap/attachment main/java/org/jboss/ws/utils main/java/org/jboss/ws/xop test/java/org/jboss/test/ws/samples/mtom test/resources/samples-override/mtom/WEB-INF test/resources/samples-override/mtom/WEB-INF/wsdl
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jul 31 12:40:59 EDT 2006
Author: heiko.braun at jboss.com
Date: 2006-07-31 12:40:44 -0400 (Mon, 31 Jul 2006)
New Revision: 651
Added:
branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/attachment/ByteArrayContentHandler.java
Modified:
branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/attachment/ContentHandlerRegistry.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/MimeUtils.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/xop/XOPUnmarshallerImpl.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPRpcTestCase.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPTest.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPTestImpl.java
branches/jbossws-1.0/src/test/resources/samples-override/mtom/WEB-INF/jaxrpc-mapping.xml
branches/jbossws-1.0/src/test/resources/samples-override/mtom/WEB-INF/wsdl/TestService.wsdl
Log:
support DataHandler as SEI parameter type
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPContentElement.java 2006-07-31 16:05:55 UTC (rev 650)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/SOAPContentElement.java 2006-07-31 16:40:44 UTC (rev 651)
@@ -40,10 +40,12 @@
import javax.xml.soap.Name;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
+import javax.activation.DataHandler;
import java.lang.reflect.Array;
import java.lang.reflect.Method;
import java.util.Iterator;
import java.io.ByteArrayInputStream;
+import java.io.IOException;
/**
* A SOAPElement that gives access to its content as XML fragment or Java object.
@@ -265,13 +267,20 @@
if (isAssignable == false)
{
- // MSFT hack
+ // MSFT hack: Force conversion according to the target java parameter
Object convertedObj = null;
- if(obj instanceof XOPUnmarshallerImpl.InputStreamWrapper)
+ if(obj instanceof DataHandler)
{
MimeUtils utils = new MimeUtils();
MimeUtils.ByteArrayConverter converter = utils.getConverterFor(javaType);
- convertedObj = converter.convert( ((XOPUnmarshallerImpl.InputStreamWrapper)obj).getStream() );
+ try
+ {
+ convertedObj = converter.convert( ((DataHandler)obj).getInputStream() );
+ }
+ catch (IOException e)
+ {
+ log.warn("Failed to convert from DataHandler", e);
+ }
}
if(null == convertedObj || !JavaUtils.isAssignableFrom(javaType, convertedObj.getClass()) ) // conversion failed
Added: branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/attachment/ByteArrayContentHandler.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/attachment/ByteArrayContentHandler.java 2006-07-31 16:05:55 UTC (rev 650)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/attachment/ByteArrayContentHandler.java 2006-07-31 16:40:44 UTC (rev 651)
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.soap.attachment;
+
+import org.jboss.ws.WSException;
+
+import javax.activation.DataContentHandler;
+import javax.activation.DataSource;
+import javax.activation.ActivationDataFlavor;
+import javax.xml.transform.stream.StreamSource;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.ByteArrayInputStream;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.UnsupportedFlavorException;
+
+/**
+ * @author Heiko Braun <heiko.braun at jboss.com>
+ * @version $Id$
+ * @since Jul 31, 2006
+ */
+public class ByteArrayContentHandler implements DataContentHandler {
+
+ private DataFlavor[] flavors = new ActivationDataFlavor[]
+ {
+ new ActivationDataFlavor(ByteArrayInputStream.class, "application/octet-stream", "OCTETS"),
+ };
+
+ public Object getContent(DataSource dataSource) throws IOException {
+ return dataSource.getInputStream();
+ }
+
+ public Object getTransferData(DataFlavor dataFlavor, DataSource dataSource) throws UnsupportedFlavorException, IOException {
+ return getContent(dataSource);
+ }
+
+ public DataFlavor[] getTransferDataFlavors() {
+ return flavors;
+ }
+
+ public void writeTo(Object object, String string, OutputStream outputStream) throws IOException {
+ throw new WSException("The current implementation is read-only");
+ }
+}
Property changes on: branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/attachment/ByteArrayContentHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/attachment/ContentHandlerRegistry.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/attachment/ContentHandlerRegistry.java 2006-07-31 16:05:55 UTC (rev 650)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/attachment/ContentHandlerRegistry.java 2006-07-31 16:40:44 UTC (rev 651)
@@ -49,6 +49,7 @@
{
addRegistryEntry(XmlDataContentHandler.class);
addRegistryEntry(ImageDataContentHandler.class);
+ addRegistryEntry(ByteArrayContentHandler.class);
addRegistryEntry(text_plain.class);
addRegistryEntry(text_html.class);
addRegistryEntry(multipart_mixed.class);
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/MimeUtils.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/MimeUtils.java 2006-07-31 16:05:55 UTC (rev 650)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/MimeUtils.java 2006-07-31 16:40:44 UTC (rev 651)
@@ -25,22 +25,21 @@
-import java.util.Set;
-import java.util.Map;
-import java.util.HashMap;
-import java.io.ByteArrayInputStream;
-import java.awt.image.BufferedImage;
+import com.sun.image.codec.jpeg.JPEGCodec;
+import com.sun.image.codec.jpeg.JPEGImageDecoder;
+import org.jboss.ws.Constants;
import javax.mail.internet.ContentType;
-import javax.mail.internet.ParseException;
import javax.mail.internet.MimeMultipart;
+import javax.mail.internet.ParseException;
import javax.xml.namespace.QName;
import javax.xml.transform.stream.StreamSource;
+import java.awt.image.BufferedImage;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
-import org.jboss.ws.Constants;
-import com.sun.image.codec.jpeg.JPEGImageDecoder;
-import com.sun.image.codec.jpeg.JPEGCodec;
-
/**
* Generic mime utility class.
*
@@ -188,7 +187,7 @@
public class ImageConverter implements ByteArrayConverter
{
- public Object convert(ByteArrayInputStream in) {
+ public Object convert(InputStream in) {
Object converted = null;
try
{
@@ -208,7 +207,7 @@
public class SourceConverter implements ByteArrayConverter
{
- public Object convert(ByteArrayInputStream in) {
+ public Object convert(InputStream in) {
Object converted = null;
try
@@ -226,7 +225,7 @@
public class StringConverter implements ByteArrayConverter
{
- public Object convert(ByteArrayInputStream in) {
+ public Object convert(InputStream in) {
Object converted = null;
try
{
@@ -248,7 +247,7 @@
public interface ByteArrayConverter
{
- Object convert(ByteArrayInputStream in);
+ Object convert(InputStream in);
}
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/xop/XOPUnmarshallerImpl.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/xop/XOPUnmarshallerImpl.java 2006-07-31 16:05:55 UTC (rev 650)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/xop/XOPUnmarshallerImpl.java 2006-07-31 16:40:44 UTC (rev 651)
@@ -26,16 +26,19 @@
import org.jboss.ws.soap.MessageContextAssociation;
import org.jboss.ws.soap.SOAPMessageContextImpl;
import org.jboss.ws.soap.SOAPMessageImpl;
-import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
+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.activation.DataContentHandlerFactory;
+import javax.activation.CommandMap;
+import javax.activation.DataContentHandler;
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.SOAPException;
+import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.InputStream;
-import java.io.ByteArrayInputStream;
/**
* The XOPUnmarshallerImpl allows callbacks from the binding layer towards the
@@ -53,6 +56,12 @@
private static final Logger log = Logger.getLogger(XOPUnmarshallerImpl.class);
+ static
+ {
+ // Load JAF content handlers
+ ContentHandlerRegistry.register();
+ }
+
public boolean isXOPPackage()
{
return XOPContext.isXOPPackage();
@@ -64,12 +73,14 @@
{
AttachmentPart part = getAttachementByCID(cid);
- // TODO: this should be fixed in XB
- // http://jira.jboss.com/jira/browse/JBWS-1108
+ // Let JAF do the conversion
Object content = part.getDataHandler().getContent();
+
if(content instanceof ByteArrayInputStream)
{
- content = new InputStreamWrapper((ByteArrayInputStream)content);
+ // JAF doesn't know the content-type
+ // In this case we pass along the DataHandler
+ content = part.getDataHandler();
}
XOPObject xopObject = new XOPObject(content);
@@ -125,16 +136,4 @@
return part;
}
-
- public final class InputStreamWrapper {
- private ByteArrayInputStream stream;
-
- public InputStreamWrapper(ByteArrayInputStream stream) {
- this.stream = stream;
- }
-
- public ByteArrayInputStream getStream() {
- return stream;
- }
- }
}
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPRpcTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPRpcTestCase.java 2006-07-31 16:05:55 UTC (rev 650)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPRpcTestCase.java 2006-07-31 16:40:44 UTC (rev 651)
@@ -115,8 +115,28 @@
}
} */
- /** Send uknown file that actually is a jpeg that will turns into octet-stream
+ /** Send unknown file that actually is converted into a DataHandler
*/
+ public void testSendOctets() throws Exception
+ {
+ Object value = port.sendOctets("Some text message", new DataHandler(
+ new FileDataSource("resources/samples/mtom/disguised_jpeg.xcf")
+ ));
+ assertNotNull(value);
+ assertTrue("Wrong return value type", value instanceof DataHandler);
+ }
+
+ /**
+ * A disguised element is send when the actual SEI java parameter
+ * doesn't map with the content-type set on the mimepart.
+ * .NET loves do this...
+ *
+ * In this case we try to 'force' convert that object according to
+ * the expected java parameter.
+ *
+ * @throws Exception
+ * @see org.jboss.ws.soap.SOAPContentElement#getObjectValue()
+ */
public void testSendDisguised() throws Exception
{
Object value = port.sendMimeImageGIF("Some text message", new DataHandler(
@@ -124,9 +144,6 @@
));
assertNotNull(value);
assertTrue("Wrong return value type", value instanceof Image);
-
-
- //System.out.println("FIXME: testSendDisguised");
}
/** Send a multipart message with a text/plain attachment part
@@ -209,48 +226,4 @@
assertNotNull(value);
assertTrue("Wrong return value type", value instanceof Source);
}
-
- private class ObjectDataSource implements DataSource
- {
- private Object obj;
- private byte[] bytes;
-
- public ObjectDataSource(Object obj) {
-
- if(! (obj instanceof Serializable) )
- throw new IllegalArgumentException("Object must be serializable");
-
- this.obj = obj;
-
- try
- {
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- ObjectOutputStream os = new ObjectOutputStream(bout);
- os.writeObject(obj);
- this.bytes = bout.toByteArray();
- }
- catch (Exception e)
- {
- throw new IllegalStateException(e.getMessage());
- }
- }
-
- public String getContentType() {
- return "application/octet-stream";
- }
-
- public InputStream getInputStream() throws IOException {
- ByteArrayInputStream in = new ByteArrayInputStream(bytes);
- return new ObjectInputStream(in);
- }
-
- public String getName() {
- return obj.getClass().getName();
- }
-
- public OutputStream getOutputStream() throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- return new ObjectOutputStream(out) ;
- }
- }
}
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPTest.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPTest.java 2006-07-31 16:05:55 UTC (rev 650)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPTest.java 2006-07-31 16:40:44 UTC (rev 651)
@@ -67,4 +67,6 @@
/** Service endpoint method for application/xml
*/
Object sendMimeApplicationXML(String message, Source xoppart) throws RemoteException;
+
+ DataHandler sendOctets(String message, DataHandler xoppart) throws RemoteException;
}
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPTestImpl.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPTestImpl.java 2006-07-31 16:05:55 UTC (rev 650)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/mtom/XOPTestImpl.java 2006-07-31 16:40:44 UTC (rev 651)
@@ -133,6 +133,16 @@
return xoppart;
}
+ public DataHandler sendOctets(String message, DataHandler xoppart) throws RemoteException {
+ StringBuffer buffer = new StringBuffer();
+ validateStringMessage(buffer, message);
+
+ String expContentType = "application/octet-stream";
+ validateAttachmentPart(buffer, expContentType, xoppart);
+
+ return xoppart;
+ }
+
private void validateStringMessage(StringBuffer buffer, String message)
{
if ("Some text message".equals(message) == false)
@@ -222,6 +232,11 @@
if ((content instanceof Source) == false)
buffer.append("[content=" + content + "]");
}
+ else if (contentType.equals("application/octet-stream") )
+ {
+ if ((content instanceof DataHandler) == false)
+ buffer.append("[content=" + content + "]");
+ }
else
{
throw new IllegalArgumentException("Unsupported mime type: " + contentType);
Modified: branches/jbossws-1.0/src/test/resources/samples-override/mtom/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/samples-override/mtom/WEB-INF/jaxrpc-mapping.xml 2006-07-31 16:05:55 UTC (rev 650)
+++ branches/jbossws-1.0/src/test/resources/samples-override/mtom/WEB-INF/jaxrpc-mapping.xml 2006-07-31 16:40:44 UTC (rev 651)
@@ -204,5 +204,40 @@
<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>javax.activation.DataHandler</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>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-interface-mapping>
+
+
</java-wsdl-mapping>
\ No newline at end of file
Modified: branches/jbossws-1.0/src/test/resources/samples-override/mtom/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- branches/jbossws-1.0/src/test/resources/samples-override/mtom/WEB-INF/wsdl/TestService.wsdl 2006-07-31 16:05:55 UTC (rev 650)
+++ branches/jbossws-1.0/src/test/resources/samples-override/mtom/WEB-INF/wsdl/TestService.wsdl 2006-07-31 16:40:44 UTC (rev 651)
@@ -6,8 +6,8 @@
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"
+ <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">
@@ -19,6 +19,7 @@
<element name="multipart" xmime:contentType="multipart/*" type="xmime:base64Binary"/>
<element name="textxml" xmime:contentType="text/xml" type="xmime:base64Binary"/>
<element name="applxml" xmime:contentType="application/xml" type="xmime:base64Binary"/>
+ <element name="octets" xmime:contentType="application/octet-stream" type="xmime:base64Binary"/>
<complexType name="XOPBinary" >
<simpleContent>
@@ -27,143 +28,163 @@
</extension>
</simpleContent>
</complexType>
- </schema>
- </types>
+ </schema>
+ </types>
- <message name="XOPTest_sendMimeImageGIF">
- <part name="message" type="xsd:string"/>
+ <message name="XOPTest_sendMimeImageGIF">
+ <part name="message" type="xsd:string"/>
<part name="xoppart" element="tns:imagegif"/>
- </message>
- <message name="XOPTest_sendMimeImageGIFResponse">
+ </message>
+ <message name="XOPTest_sendMimeImageGIFResponse">
<part name="result" element="tns:imagegif"/>
- </message>
+ </message>
- <message name="XOPTest_sendMimeImageJPEG">
- <part name="message" type="xsd:string"/>
- <part name="xoppart" element="tns:imagejpeg"/>
- </message>
- <message name="XOPTest_sendMimeImageJPEGResponse">
- <part name="result" element="tns:imagejpeg"/>
- </message>
- <message name="XOPTest_sendMimeTextPlain">
- <part name="message" type="xsd:string"/>
- <part name="xoppart" element="tns:textplain"/>
- </message>
- <message name="XOPTest_sendMimeTextPlainResponse">
- <part name="result" element="tns:textplain"/>
- </message>
- <message name="XOPTest_sendMimeMultipart">
- <part name="message" type="xsd:string"/>
- <part name="xoppart" element="tns:multipart"/>
- </message>
- <message name="XOPTest_sendMimeMultipartResponse">
- <part name="result" element="tns:multipart"/>
- </message>
- <message name="XOPTest_sendMimeTextXML">
- <part name="message" type="xsd:string"/>
- <part name="xoppart" element="tns:textxml"/>
- </message>
- <message name="XOPTest_sendMimeTextXMLResponse">
- <part name="result" element="tns:textxml"/>
- </message>
- <message name="XOPTest_sendMimeApplicationXML">
- <part name="message" type="xsd:string"/>
- <part name="xoppart" element="tns:applxml"/>
- </message>
- <message name="XOPTest_sendMimeApplicationXMLResponse">
- <part name="result" element="tns:applxml"/>
- </message>
+ <message name="XOPTest_sendMimeImageJPEG">
+ <part name="message" type="xsd:string"/>
+ <part name="xoppart" element="tns:imagejpeg"/>
+ </message>
+ <message name="XOPTest_sendMimeImageJPEGResponse">
+ <part name="result" element="tns:imagejpeg"/>
+ </message>
+ <message name="XOPTest_sendMimeTextPlain">
+ <part name="message" type="xsd:string"/>
+ <part name="xoppart" element="tns:textplain"/>
+ </message>
+ <message name="XOPTest_sendMimeTextPlainResponse">
+ <part name="result" element="tns:textplain"/>
+ </message>
+ <message name="XOPTest_sendMimeMultipart">
+ <part name="message" type="xsd:string"/>
+ <part name="xoppart" element="tns:multipart"/>
+ </message>
+ <message name="XOPTest_sendMimeMultipartResponse">
+ <part name="result" element="tns:multipart"/>
+ </message>
+ <message name="XOPTest_sendMimeTextXML">
+ <part name="message" type="xsd:string"/>
+ <part name="xoppart" element="tns:textxml"/>
+ </message>
+ <message name="XOPTest_sendMimeTextXMLResponse">
+ <part name="result" element="tns:textxml"/>
+ </message>
+ <message name="XOPTest_sendMimeApplicationXML">
+ <part name="message" type="xsd:string"/>
+ <part name="xoppart" element="tns:applxml"/>
+ </message>
+ <message name="XOPTest_sendMimeApplicationXMLResponse">
+ <part name="result" element="tns:applxml"/>
+ </message>
- <portType name="XOPTest">
- <operation name="sendMimeImageGIF">
- <input message="tns:XOPTest_sendMimeImageGIF"/>
- <output message="tns:XOPTest_sendMimeImageGIFResponse"/>
- </operation>
- <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="sendMimeMultipart">
- <input message="tns:XOPTest_sendMimeMultipart"/>
- <output message="tns:XOPTest_sendMimeMultipartResponse"/>
- </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>
+ <message name="XOPTest_sendOctets">
+ <part name="message" type="xsd:string"/>
+ <part name="xoppart" element="tns:octets"/>
+ </message>
+ <message name="XOPTest_sendOctetsResponse">
+ <part name="result" element="tns:octets"/>
+ </message>
- </portType>
+ <portType name="XOPTest">
+ <operation name="sendMimeImageGIF">
+ <input message="tns:XOPTest_sendMimeImageGIF"/>
+ <output message="tns:XOPTest_sendMimeImageGIFResponse"/>
+ </operation>
+ <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="sendMimeMultipart">
+ <input message="tns:XOPTest_sendMimeMultipart"/>
+ <output message="tns:XOPTest_sendMimeMultipartResponse"/>
+ </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>
- <binding name="XOPTestBinding" type="tns:XOPTest">
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
- <operation name="sendMimeImageGIF">
- <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="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="sendMimeMultipart">
- <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">
+ <input message="tns:XOPTest_sendOctets"/>
+ <output message="tns:XOPTest_sendOctetsResponse"/>
+ </operation>
+ </portType>
- </binding>
+ <binding name="XOPTestBinding" type="tns:XOPTest">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="sendMimeImageGIF">
+ <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="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="sendMimeMultipart">
+ <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>
+ <service name="XOPTest">
+ <port name="XOPTestPort" binding="tns:XOPTestBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
</definitions>
More information about the jboss-svn-commits
mailing list