Author: darran.lofthouse(a)jboss.com
Date: 2009-07-23 06:25:07 -0400 (Thu, 23 Jul 2009)
New Revision: 10372
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/InputRequest.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/JBWS2706TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/ObjectFactory.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/OutputResponse.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/SwaTest.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/SwaTestEndpoint.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/package-info.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/jboss-web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/wsdl/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/wsdl/SwaTestService.wsdl
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/MimeUtils.java
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
[JBWS-2706] Unable to unmarshall attachment parts where the type is
'application/octet-stream'
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2009-07-23
09:54:16 UTC (rev 10371)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2009-07-23
10:25:07 UTC (rev 10372)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.core;
+import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
@@ -41,6 +42,7 @@
import org.jboss.ws.core.soap.SOAPContentElement;
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.core.utils.MimeUtils;
+import org.jboss.ws.core.utils.MimeUtils.ByteArrayConverter;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.ws.metadata.umdm.WrappedParameter;
@@ -245,7 +247,17 @@
{
Class valueType = retValue.getClass();
if (JavaUtils.isAssignableFrom(javaType, valueType) == false)
- throw new SOAPException("javaType [" + javaType.getName() +
"] is not assignable from attachment content: " + valueType.getName());
+ {
+ if (retValue instanceof InputStream)
+ {
+ ByteArrayConverter converter =
MimeUtils.getConverterForJavaType(javaType);
+ retValue = converter.readFrom((InputStream)retValue);
+ }
+ else
+ {
+ throw new SOAPException("javaType [" + javaType.getName()
+ "] is not assignable from attachment content: " + valueType.getName());
+ }
+ }
}
}
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/MimeUtils.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/MimeUtils.java 2009-07-23
09:54:16 UTC (rev 10371)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/MimeUtils.java 2009-07-23
10:25:07 UTC (rev 10372)
@@ -22,6 +22,7 @@
package org.jboss.ws.core.utils;
import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -185,7 +186,9 @@
converter = new StringConverter();
else if (JavaUtils.isAssignableFrom(java.io.InputStream.class, targetClazz))
converter = new StreamConverter();
-
+ else if (JavaUtils.isAssignableFrom(byte[].class, targetClazz))
+ converter = new RealByteArrayConverter();
+
if(null == converter)
throw new WSException("No ByteArrayConverter for class: " +
targetClazz.getName());
@@ -325,6 +328,49 @@
}
}
+ public static class RealByteArrayConverter implements ByteArrayConverter
+ {
+ public Object readFrom(InputStream in)
+ {
+ Object converted = null;
+ try
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, in);
+
+ in.close();
+
+ converted = baos.toByteArray();
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to convert byte[]");
+ }
+
+ return converted;
+ }
+
+ public void writeTo(Object obj, OutputStream out)
+ {
+ if (obj instanceof byte[])
+ {
+ byte[] bytes = (byte[])obj;
+ try
+ {
+ out.write(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to convert " + obj.getClass());
+ }
+ }
+ else
+ {
+ throw new WSException("Unable to convert " + obj.getClass());
+ }
+ }
+ }
+
public static class StreamConverter implements ByteArrayConverter
{
public Object readFrom(InputStream in) {
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2009-07-23
09:54:16 UTC (rev 10371)
+++
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2009-07-23
10:25:07 UTC (rev 10372)
@@ -583,6 +583,18 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
+
+ <!-- jaxws-jbws2706 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2706.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2706/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2706/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws2698/JBWS2706TestCase.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws2706/WEB-INF">
+ <include name="wsdl/SwaTestService.wsdl"/>
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war"
webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/InputRequest.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/InputRequest.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/InputRequest.java 2009-07-23
10:25:07 UTC (rev 10372)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2706;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for InputRequest complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="InputRequest">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="message"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "InputRequest", propOrder = {
+ "message"
+})
+public class InputRequest {
+
+ @XmlElement(required = true)
+ protected String message;
+
+ /**
+ * Gets the value of the message property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the value of the message property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMessage(String value) {
+ this.message = value;
+ }
+
+}
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/InputRequest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/JBWS2706TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/JBWS2706TestCase.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/JBWS2706TestCase.java 2009-07-23
10:25:07 UTC (rev 10372)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2706;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Holder;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2706] Unable to unmarshall attachment parts where the type is
'application/octet-stream'.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 22nd July 2009
+ * @see
https://jira.jboss.org/jira/browse/JBWS-2706
+ */
+public class JBWS2706TestCase extends JBossWSTest
+{
+
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-jbws2706/";
+
+ private static SwaTest port;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2706TestCase.class,
"jaxws-jbws2706.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new
QName("http://SwaTestService.org/wsdl",
"WSIDLSwaTestService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(SwaTest.class);
+ }
+
+ public void testCall() throws Exception
+ {
+ String message = "Howdy";
+ InputRequest request = new InputRequest();
+ request.setMessage(message);
+
+ Holder<String> holderOne = new Holder<String>("One");
+ Holder<byte[]> holderTwo = new
Holder<byte[]>("Two".getBytes());
+
+ OutputResponse response = port.echoMultipleAttachments(request, holderOne,
holderTwo);
+
+ assertEquals("Response", request.getMessage(), response.getMessage());
+ assertEquals("Holder One", "One", holderOne.value);
+ assertEquals("Holder Two", "Two", new String(holderTwo.value,
"UTF-8"));
+ }
+
+}
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/JBWS2706TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/ObjectFactory.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/ObjectFactory.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/ObjectFactory.java 2009-07-23
10:25:07 UTC (rev 10372)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2706;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.jbws2706 package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _InputRequest_QNAME = new
QName("http://SwaTestService.org/xsd", "InputRequest");
+ private final static QName _OutputResponse_QNAME = new
QName("http://SwaTestService.org/xsd", "OutputResponse");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema
derived classes for package: org.jboss.test.ws.jaxws.jbws2706
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link OutputResponse }
+ *
+ */
+ public OutputResponse createOutputResponse() {
+ return new OutputResponse();
+ }
+
+ /**
+ * Create an instance of {@link InputRequest }
+ *
+ */
+ public InputRequest createInputRequest() {
+ return new InputRequest();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link InputRequest }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://SwaTestService.org/xsd", name =
"InputRequest")
+ public JAXBElement<InputRequest> createInputRequest(InputRequest value) {
+ return new JAXBElement<InputRequest>(_InputRequest_QNAME,
InputRequest.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link OutputResponse
}{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://SwaTestService.org/xsd", name =
"OutputResponse")
+ public JAXBElement<OutputResponse> createOutputResponse(OutputResponse value)
{
+ return new JAXBElement<OutputResponse>(_OutputResponse_QNAME,
OutputResponse.class, null, value);
+ }
+
+}
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/ObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/OutputResponse.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/OutputResponse.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/OutputResponse.java 2009-07-23
10:25:07 UTC (rev 10372)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2706;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for OutputResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="OutputResponse">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="message"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "OutputResponse", propOrder = {
+ "message"
+})
+public class OutputResponse {
+
+ @XmlElement(required = true)
+ protected String message;
+
+ /**
+ * Gets the value of the message property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the value of the message property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMessage(String value) {
+ this.message = value;
+ }
+
+}
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/OutputResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/SwaTest.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/SwaTest.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/SwaTest.java 2009-07-23
10:25:07 UTC (rev 10372)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2706;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Holder;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.1-b03-
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "SwaTest", targetNamespace =
"http://SwaTestService.org/wsdl")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface SwaTest {
+
+
+ /**
+ *
+ * @param attach1
+ * @param attach2
+ * @param request
+ * @return
+ * returns org.jboss.test.ws.jaxws.jbws2706.OutputResponse
+ */
+ @WebMethod
+ @WebResult(name = "OutputResponse", targetNamespace =
"http://SwaTestService.org/xsd", partName = "response")
+ public OutputResponse echoMultipleAttachments(
+ @WebParam(name = "InputRequest", targetNamespace =
"http://SwaTestService.org/xsd", partName = "request")
+ InputRequest request,
+ @WebParam(name = "attach1", targetNamespace = "", mode =
WebParam.Mode.INOUT, partName = "attach1")
+ Holder<String> attach1,
+ @WebParam(name = "attach2", targetNamespace = "", mode =
WebParam.Mode.INOUT, partName = "attach2")
+ Holder<byte[]> attach2);
+
+}
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/SwaTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/SwaTestEndpoint.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/SwaTestEndpoint.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/SwaTestEndpoint.java 2009-07-23
10:25:07 UTC (rev 10372)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2706;
+
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+@WebService(name = "SwaTest", portName = "SwaTestOnePort",
targetNamespace = "http://SwaTestService.org/wsdl", endpointInterface =
"org.jboss.test.ws.jaxws.jbws2706.SwaTest", wsdlLocation =
"WEB-INF/wsdl/SwaTestService.wsdl")
+public class SwaTestEndpoint implements SwaTest
+{
+
+ public OutputResponse echoMultipleAttachments(InputRequest request,
Holder<String> attach1, Holder<byte[]> attach2)
+ {
+ OutputResponse response = new OutputResponse();
+ response.setMessage(request.message);
+ return response;
+ }
+
+}
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/SwaTestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/package-info.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/package-info.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/package-info.java 2009-07-23
10:25:07 UTC (rev 10372)
@@ -0,0 +1,23 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://SwaTestService.org/xsd", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.test.ws.jaxws.jbws2706;
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2706/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/jboss-web.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/jboss-web.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/jboss-web.xml 2009-07-23
10:25:07 UTC (rev 10372)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbws2706</context-root>
+</jboss-web>
\ No newline at end of file
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/web.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/web.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/web.xml 2009-07-23
10:25:07 UTC (rev 10372)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
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://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2706.SwaTestEndpoint</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/wsdl/SwaTestService.wsdl
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/wsdl/SwaTestService.wsdl
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/wsdl/SwaTestService.wsdl 2009-07-23
10:25:07 UTC (rev 10372)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="SwaTestService"
+
targetNamespace="http://SwaTestService.org/wsdl"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:tns="http://SwaTestService.org/wsdl"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+
xmlns:s="http://SwaTestService.org/xsd"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <types>
+ <schema
targetNamespace="http://SwaTestService.org/xsd"
+
xmlns:tns="http://SwaTestService.org/xsd"
+
xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+
+ <complexType name="InputRequest">
+ <sequence>
+ <element name="message" type="string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="OutputResponse">
+ <sequence>
+ <element name="message" type="string"/>
+ </sequence>
+ </complexType>
+
+ <element name="InputRequest" type="tns:InputRequest"/>
+ <element name="OutputResponse"
type="tns:OutputResponse"/>
+ </schema>
+ </types>
+
+ <message name="messageInput">
+ <part name="request" element="s:InputRequest"/>
+ <part name="attach1" type="xsd:string"/>
+ <part name="attach2" type="xsd:base64Binary"/>
+ </message>
+
+ <message name="messageOutput">
+ <part name="response" element="s:OutputResponse"/>
+ <part name="attach1" type="xsd:string"/>
+ <part name="attach2" type="xsd:base64Binary"/>
+ </message>
+
+ <portType name="SwaTest">
+
+ <operation name="echoMultipleAttachments">
+ <input message="tns:messageInput"/>
+ <output message="tns:messageOutput"/>
+ </operation>
+
+ </portType>
+
+
+ <binding name="SwaTestSoapBinding" type="tns:SwaTest">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+
+ <operation name="echoMultipleAttachments">
+ <soap:operation/>
+ <input>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="request" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1"
type="application/octet-stream"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2"
type="application/octet-stream"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </input>
+ <output>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="response" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1"
type="application/octet-stream"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2"
type="application/octet-stream"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </output>
+ </operation>
+
+ </binding>
+
+ <service name="WSIDLSwaTestService">
+
+ <port name="SwaTestOnePort"
binding="tns:SwaTestSoapBinding">
+ <soap:address
location="http://localhost:8080/WSIDLSwaTest/jaxws/SwaTestOne"/>
+ </port>
+
+ </service>
+
+</definitions>
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2706/WEB-INF/wsdl/SwaTestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF