Author: jim.ma
Date: 2010-10-28 03:40:41 -0400 (Thu, 28 Oct 2010)
New Revision: 13198
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ClientHandler.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/DataType.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/EndpointService.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTest.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ObjectFactory.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ResponseType.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServerHandler.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServletTestClient.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/client-handlers.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/server-handlers.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Client/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Client/jboss-web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Client/web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/jboss-web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/webservices.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/jboss-web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/webservices.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/large.jpg
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/small.jpg
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/wsdl/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/wsdl/TestEndpoint.wsdl
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt
Log:
[JBWS-3140][JBWS-3141]:Added mtom,addressing and respectBinding element support in
webservices.xml, web.xml for native stack;Added testcases
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2010-10-27
19:00:53 UTC (rev 13197)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -31,6 +31,9 @@
import javax.xml.namespace.QName;
import javax.xml.transform.dom.DOMSource;
import javax.xml.ws.BindingType;
+import javax.xml.ws.RespectBindingFeature;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.MTOMFeature;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
@@ -249,14 +252,22 @@
log.debug("Processing service-ref contribution on portType: " +
epMetaData.getPortTypeName());
// process MTOM overrides
- if (portComp.getEnableMTOM())
+ if (portComp.isMtomEnabled())
{
- String bindingId = epMetaData.getBindingId();
- if (bindingId.equals(Constants.SOAP11HTTP_BINDING))
- epMetaData.setBindingId(Constants.SOAP11HTTP_MTOM_BINDING);
- else if (bindingId.equals(Constants.SOAP12HTTP_BINDING))
- epMetaData.setBindingId(Constants.SOAP12HTTP_MTOM_BINDING);
+ epMetaData.addFeature(new MTOMFeature(true,
portComp.getMtomThreshold()));
}
+ // process Addressing
+ if (portComp.isAddressingEnabled())
+ {
+ AddressingFeature.Responses response =
getAddressFeatureResponses(portComp.getAddressingResponses());
+ epMetaData.addFeature(new AddressingFeature(true,
portComp.isAddressingRequired(), response));
+ }
+
+ // process RespectBinding
+ if (portComp.isRespectBindingEnabled())
+ {
+ epMetaData.addFeature(new RespectBindingFeature(true));
+ }
// process stub properties
for (UnifiedStubPropertyMetaData stubProp : portComp.getStubProperties())
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2010-10-27
19:00:53 UTC (rev 13197)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -203,6 +203,17 @@
}
}
}
+
+ protected AddressingFeature.Responses getAddressFeatureResponses(String responses)
+ {
+
+ AddressingFeature.Responses result = AddressingFeature.Responses.ALL;
+ if ("ANONYMOUS".equals(responses))
+ result = AddressingFeature.Responses.ANONYMOUS;
+ if ("NON_ANONYMOUS".equals(responses))
+ result = AddressingFeature.Responses.NON_ANONYMOUS;
+ return result;
+ }
public static UnifiedHandlerChainsMetaData getHandlerChainsMetaData(Class<?>
wsClass, String filename)
{
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2010-10-27
19:00:53 UTC (rev 13197)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -34,7 +34,10 @@
import javax.jws.soap.SOAPMessageHandlers;
import javax.management.ObjectName;
import javax.xml.namespace.QName;
+import javax.xml.ws.RespectBindingFeature;
import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.MTOMFeature;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
@@ -209,12 +212,12 @@
else if (seiClass.isAnnotationPresent(HandlerChain.class))
processHandlerChain(sepMetaData, seiClass);
+ // process webservices.xml contributions
+ processWSDDContribution(sepMetaData);
+
//setup web service feature contributions
epFeatureProcessor.setupEndpointFeatures(sepMetaData);
- // process webservices.xml contributions
- processWSDDContribution(sepMetaData);
-
// Init the endpoint address
initEndpointAddress(dep, sepMetaData);
@@ -377,14 +380,23 @@
if (portComp.isEnableMtom())
{
log.debug("Enabling MTOM");
-
- String bindingId = sepMetaData.getBindingId();
- if (bindingId.equals(Constants.SOAP11HTTP_BINDING))
- sepMetaData.setBindingId(Constants.SOAP11HTTP_MTOM_BINDING);
- else if (bindingId.equals(Constants.SOAP12HTTP_BINDING))
- sepMetaData.setBindingId(Constants.SOAP12HTTP_MTOM_BINDING);
-
+ MTOMFeature feature = new MTOMFeature(true,
portComp.getMtomThreshold());
+ sepMetaData.getFeatures().addFeature(feature);
}
+
+ if (portComp.isAddressingEnabled())
+ { log.debug("Enabling Addressing");
+ AddressingFeature.Responses responses =
getAddressFeatureResponses(portComp.getAddressingResponses());
+ AddressingFeature feature = new AddressingFeature(true,
portComp.isAddressingRequired(), responses);
+ sepMetaData.getFeatures().addFeature(feature);
+ }
+
+ if (portComp.isRespectBindingEnabled())
+ {
+ log.debug("Enabling RespectBinding Feature");
+ RespectBindingFeature feature = new RespectBindingFeature(true);
+ sepMetaData.getFeatures().addFeature(feature);
+ }
}
}
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 2010-10-27
19:00:53 UTC (rev 13197)
+++
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -654,6 +654,57 @@
<include name="org/jboss/test/ws/jaxws/jbws3071/TestException.class"
/>
</classes>
</war>
+
+ <!-- jaxws-jbws3140 -->
+ <war warfile="${tests.output.dir}/test-libs/jbws3140-server.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws3140/WEB-INF-Server/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3140/*.class" />
+ <include name="org/jboss/test/ws/jaxws/jbws3140/server*.xml" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws3140/*TestCase.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws3140/*TestClient.class"
/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws3140/WEB-INF-Server">
+ <include name="*.xml" />
+ </webinf>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3140">
+ <include name="wsdl/*.wsdl"/>
+ </webinf>
+ </war>
+
+ <war warfile="${tests.output.dir}/test-libs/jbws3140-responses-server.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws3140/WEB-INF-Server/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3140/*.class" />
+ <include name="org/jboss/test/ws/jaxws/jbws3140/server*.xml" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws3140/*TestCase.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws3140/*TestClient.class"
/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws3140/WEB-INF-Responses-Server">
+ <include name="*.xml" />
+ </webinf>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3140">
+ <include name="wsdl/*.wsdl"/>
+ </webinf>
+ </war>
+
+
+
+ <war warfile="${tests.output.dir}/test-libs/jbws3140-client.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws3140/WEB-INF-Client/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3140/*.class" />
+ <include name="org/jboss/test/ws/jaxws/jbws3140/client*.xml" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws3140/*TestCase.class" />
+ </classes>
+ <classes dir="${tests.output.dir}/test-resources/jaxws/jbws3140">
+ <include name="*.jpg" />
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws3140/WEB-INF-Client">
+ <include name="jboss-web.xml" />
+ </webinf>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3140">
+ <include name="wsdl/*.wsdl"/>
+ </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/jbws3140/ClientHandler.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ClientHandler.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ClientHandler.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+
+import java.io.ByteArrayOutputStream;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+@SuppressWarnings("unchecked")
+public class ClientHandler implements SOAPHandler
+{
+
+ @Override
+ public Set getHeaders()
+ {
+ // FIXME getHeaders
+ return new HashSet();
+ }
+
+ @Override
+ public void close(MessageContext arg0)
+ {
+
+ }
+
+ @Override
+ public boolean handleFault(MessageContext msgContext)
+ {
+ return true;
+ }
+
+ @Override
+ public boolean handleMessage(MessageContext msgContext)
+ {
+ SOAPMessage message = ((SOAPMessageContext)msgContext).getMessage();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ try
+ {
+ message.writeTo(bout);
+ }
+ catch (Exception e)
+ {
+ //do nothing
+ }
+ if (isOutbound(msgContext))
+ {
+ if (isMTOMEnabled(bout.toString()))
+ {
+ ServletTestClient.resultTrace.append("--ClientMTOMEnabled");
+ }
+ else
+ {
+ ServletTestClient.resultTrace.append("--ClientMTOMNotEnabled");
+ }
+ }
+ else
+ {
+ if (isMTOMEnabled(bout.toString()))
+ {
+ ServletTestClient.resultTrace.append("--ServerMTOMEnabled");
+ }
+ else
+ {
+ ServletTestClient.resultTrace.append("--ServerMTOMNotEnabled");
+ }
+ if (isWSAEnabled(bout.toString()))
+ {
+ ServletTestClient.resultTrace.append("--ServerAddressingEnabled");
+ }
+ else
+ {
+
ServletTestClient.resultTrace.append("--ServerAddressingNotEnabled");
+ }
+
+ }
+ return true;
+ }
+
+ protected Boolean isOutbound(MessageContext msgContext)
+ {
+ Boolean outbound =
(Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ if (outbound == null)
+ throw new IllegalStateException("Cannot find property: " +
MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ return outbound;
+ }
+
+ public boolean isMTOMEnabled(String str) {
+
+ if (
str.indexOf("http://www.w3.org/2004/08/xop/include") > -1) {
+ return true;
+ }
+ return false;
+
+ }
+
+ public boolean isWSAEnabled(String str) {
+ if (str.indexOf("Action") > -1)
+ {
+ return true;
+ }
+ return false;
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/DataType.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/DataType.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/DataType.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+
+import java.awt.Image;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
+
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DataType", propOrder =
+{"request", "doc"})
+public class DataType
+{
+
+ @XmlElement(required = true)
+ protected String request;
+
+ @XmlElement(required = true)
+ @XmlMimeType("image/jpeg")
+ protected Image doc;
+
+ /**
+ * Gets the value of the request property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRequest()
+ {
+ return request;
+ }
+
+ /**
+ * Sets the value of the request property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRequest(String value)
+ {
+ this.request = value;
+ }
+
+ /**
+ * Gets the value of the doc property.
+ *
+ * @return
+ * possible object is
+ * {@link Image }
+ *
+ */
+ public Image getDoc()
+ {
+ return doc;
+ }
+
+ /**
+ * Sets the value of the doc property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Image }
+ *
+ */
+ public void setDoc(Image value)
+ {
+ this.doc = value;
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/EndpointService.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/EndpointService.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/EndpointService.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.jws.HandlerChain;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+@WebServiceClient(name = "TestEndpointService", targetNamespace =
"http://TestEndpoint.org", wsdlLocation =
"WEB-INF/wsdl/TestEndpoint.wsdl")
+(a)HandlerChain(file="client-handlers.xml")
+public class EndpointService extends Service
+{
+
+ private final static URL TESTENDPOINTSERVICE_WSDL_LOCATION;
+
+ private final static WebServiceException TESTENDPOINTSERVICE_EXCEPTION;
+
+ private final static QName TESTENDPOINTSERVICE_QNAME = new
QName("http://TestEndpoint.org", "TestEndpointService");
+
+ static
+ {
+ URL url = null;
+ WebServiceException e = null;
+ try
+ {
+ url = new URL("TestEndpoint.wsdl");
+ }
+ catch (MalformedURLException ex)
+ {
+ e = new WebServiceException(ex);
+ }
+ TESTENDPOINTSERVICE_WSDL_LOCATION = url;
+ TESTENDPOINTSERVICE_EXCEPTION = e;
+ }
+
+ public EndpointService()
+ {
+ super(__getWsdlLocation(), TESTENDPOINTSERVICE_QNAME);
+ }
+
+ public EndpointService(WebServiceFeature... features)
+ {
+ super(__getWsdlLocation(), TESTENDPOINTSERVICE_QNAME, features);
+ }
+
+ public EndpointService(URL wsdlLocation)
+ {
+ super(wsdlLocation, TESTENDPOINTSERVICE_QNAME);
+ }
+
+ public EndpointService(URL wsdlLocation, WebServiceFeature... features)
+ {
+ super(wsdlLocation, TESTENDPOINTSERVICE_QNAME, features);
+ }
+
+ public EndpointService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature...
features)
+ {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return returns MTOMTest
+ */
+ @WebEndpoint(name = "MTOMTestPort")
+ public MTOMTest getMTOMTestPort()
+ {
+ return super.getPort(new QName("http://TestEndpoint.org",
"MTOMTestPort"), MTOMTest.class);
+ }
+
+ @WebEndpoint(name = "MTOMTestPort2")
+ public MTOMTest getMTOMTestPort2()
+ {
+ return super.getPort(new QName("http://TestEndpoint.org",
"MTOMTestPort2"), MTOMTest.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure
+ * on the proxy. Supported features not in the
+ * <code>features</code> parameter will have their default
+ * values.
+ * @return returns MTOMTest
+ */
+ @WebEndpoint(name = "MTOMTestPort")
+ public MTOMTest getMTOMTestPort(WebServiceFeature... features)
+ {
+ return super.getPort(new QName("http://TestEndpoint.org",
"MTOMTestPort"), MTOMTest.class, features);
+ }
+
+ @WebEndpoint(name = "MTOMTestPort2")
+ public MTOMTest getMTOMTestPort2(WebServiceFeature... features)
+ {
+ return super.getPort(new QName("http://TestEndpoint.org",
"MTOMTestPort2"), MTOMTest.class, features);
+ }
+
+ private static URL __getWsdlLocation()
+ {
+ if (TESTENDPOINTSERVICE_EXCEPTION != null)
+ {
+ throw TESTENDPOINTSERVICE_EXCEPTION;
+ }
+ return TESTENDPOINTSERVICE_WSDL_LOCATION;
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class JBWS3140AddrResponsesTestCase extends JBossWSTest
+{
+ public final String servletClientURL = "http://" + getServerHost() +
":8080/jbws3140-client/ServletTest";
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS3140AddrResponsesTestCase.class,
"jbws3140-responses-server.war, jbws3140-client.war");
+ }
+
+ public void testWsaResponses() throws Exception
+ {
+ HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL +
"?mtom=small").openConnection();
+ String result = readConnection(connection).toString();
+ assertTrue("SOAPFaultException is expected",
result.indexOf("SOAPFaultException") > -1);
+ String expectedDetail = "A header representing a Message Addressing Property
is not valid";
+ assertTrue("Expected error message " + expectedDetail ,
result.indexOf(expectedDetail) > -1);
+ }
+
+ private ByteArrayOutputStream readConnection(HttpURLConnection connection)
+ {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int count = 0;
+ try
+ {
+ while( (count = connection.getInputStream().read(buffer, 0, 1024)) > -1) {
+ bout.write(buffer, 0, count);
+ }
+ }
+ catch (IOException e)
+ {
+ }
+ return bout;
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import junit.framework.Test;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.
+ */
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class JBWS3140MtomAddrFeatureTestCase extends JBossWSTest
+{
+ public final String servletClientURL = "http://" + getServerHost() +
":8080/jbws3140-client/ServletTest";
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS3140MtomAddrFeatureTestCase.class,
"jbws3140-server.war, jbws3140-client.war");
+ }
+
+ /*mtom.threshold in DDs is not supported by CXF and Native stack
+ public void testMtomLarge() throws Exception
+ {
+ HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL +
"?mtom=large").openConnection();
+ String result = readConnection(connection).toString();
+ //this.assertEquals(expected, result);
+ String expected
="--ClientMTOMNotEnabled--ServerMTOMEnabled--ServerAddressingEnabled--ClientAddressingEnabled";
+ assertTrue(result.indexOf(expected) > -1);
+ }
+ */
+
+ public void testMtomSmall() throws Exception
+ {
+ HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL +
"?mtom=small").openConnection();
+ String result = readConnection(connection).toString();
+ String expected
="--ClientMTOMEnabled--ServerMTOMEnabled--ServerAddressingEnabled--ClientAddressingEnabled";
+ assertTrue(result.indexOf(expected) > -1);
+ }
+
+ private ByteArrayOutputStream readConnection(HttpURLConnection connection)
+ {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int count = 0;
+ try
+ {
+ while( (count = connection.getInputStream().read(buffer, 0, 1024)) > -1) {
+ bout.write(buffer, 0, count);
+ }
+ }
+ catch (IOException e)
+ {
+ }
+ return bout;
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTest.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTest.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTest.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+@WebService(name = "MTOMTest", targetNamespace =
"http://TestEndpoint.org")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+@XmlSeeAlso(
+{ObjectFactory.class})
+(a)HandlerChain(file="server-handlers.xml")
+public interface MTOMTest
+{
+
+ /**
+ *
+ * @param data
+ * @return
+ * returns org.testendpoint.xsd.ResponseType
+ */
+ @WebMethod(operationName = "MTOMIn")
+ @WebResult(name = "MtomResponse", targetNamespace =
"http://TestEndpoint.org/xsd", partName = "result")
+ public ResponseType mtomIn(
+ @WebParam(name = "MtomRequest", targetNamespace =
"http://TestEndpoint.org/xsd", partName = "data") DataType data);
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+
+import javax.jws.WebService;
+
+@WebService(
+ portName="MTOMTestPort",
+ serviceName="TestEndpointService",
+ targetNamespace="http://TestEndpoint.org",
+ wsdlLocation="WEB-INF/wsdl/TestEndpoint.wsdl",
+ endpointInterface="org.jboss.test.ws.jaxws.jbws3140.MTOMTest"
+ )
+public class MTOMTestImpl implements MTOMTest
+{
+ public ResponseType mtomIn(DataType data)
+ {
+ System.out.println("---invoking mtom -----");
+ ResponseType response = new ResponseType();
+ response.setReply(data.getDoc());
+ response.setResponse(data.getRequest());
+ return response;
+
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ObjectFactory.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ObjectFactory.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ObjectFactory.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+
+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.testendpoint.xsd 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 _MtomResponse_QNAME = new
QName("http://TestEndpoint.org/xsd", "MtomResponse");
+ private final static QName _MtomRequest_QNAME = new
QName("http://TestEndpoint.org/xsd", "MtomRequest");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema
derived classes for package: org.testendpoint.xsd
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link DataType }
+ *
+ */
+ public DataType createDataType() {
+ return new DataType();
+ }
+
+ /**
+ * Create an instance of {@link ResponseType }
+ *
+ */
+ public ResponseType createResponseType() {
+ return new ResponseType();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link ResponseType }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://TestEndpoint.org/xsd", name =
"MtomResponse")
+ public JAXBElement<ResponseType> createMtomResponse(ResponseType value) {
+ return new JAXBElement<ResponseType>(_MtomResponse_QNAME,
ResponseType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link DataType }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://TestEndpoint.org/xsd", name =
"MtomRequest")
+ public JAXBElement<DataType> createMtomRequest(DataType value) {
+ return new JAXBElement<DataType>(_MtomRequest_QNAME, DataType.class, null,
value);
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ResponseType.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ResponseType.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ResponseType.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+import java.awt.Image;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for ResponseType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="ResponseType">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="response"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="reply"
type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ResponseType", propOrder = {
+ "response",
+ "reply"
+})
+public class ResponseType {
+
+ @XmlElement(required = true)
+ protected String response;
+ @XmlElement(required = true)
+ @XmlMimeType("image/jpeg")
+ protected Image reply;
+
+ /**
+ * Gets the value of the response property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResponse() {
+ return response;
+ }
+
+ /**
+ * Sets the value of the response property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResponse(String value) {
+ this.response = value;
+ }
+
+ /**
+ * Gets the value of the reply property.
+ *
+ * @return
+ * possible object is
+ * {@link Image }
+ *
+ */
+ public Image getReply() {
+ return reply;
+ }
+
+ /**
+ * Sets the value of the reply property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Image }
+ *
+ */
+ public void setReply(Image value) {
+ this.reply = value;
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServerHandler.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServerHandler.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServerHandler.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.
+ */
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+
+import java.io.ByteArrayOutputStream;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+@SuppressWarnings("unchecked")
+public class ServerHandler implements SOAPHandler
+{
+
+ @Override
+ public Set getHeaders()
+ {
+ // FIXME getHeaders
+ return new HashSet();
+ }
+
+ @Override
+ public void close(MessageContext arg0)
+ {
+
+ }
+
+ @Override
+ public boolean handleFault(MessageContext msgContext)
+ {
+ return true;
+ }
+
+ @Override
+ public boolean handleMessage(MessageContext msgContext)
+ {
+ SOAPMessage message = ((SOAPMessageContext)msgContext).getMessage();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ try
+ {
+ message.writeTo(bout);
+ if (!isOutbound(msgContext))
+ {
+ appendContentToRequestElement(message, isWSAEnabled(bout.toString()));
+ }
+ }
+ catch (Exception e)
+ {
+
+ }
+
+ return true;
+ }
+
+ private void appendContentToRequestElement(SOAPMessage message, boolean wsaEnabled) {
+ try
+ {
+ Iterator ite = message.getSOAPBody().getChildElements(new
QName("http://TestEndpoint.org/xsd", "MtomRequest"));
+ SOAPElement element = (SOAPElement)ite.next();
+ SOAPElement requestElement = (SOAPElement)element.getChildElements(new
QName("", "request")).next();
+ if (wsaEnabled)
+ {
+ requestElement.setTextContent("--ClientAddressingEnabled");
+ }
+ else
+ {
+ requestElement.setTextContent("--ClientAddressingNotEnabled");
+ }
+ }
+ catch (SOAPException e)
+ {
+
+ }
+ }
+
+ protected Boolean isOutbound(MessageContext msgContext)
+ {
+ Boolean outbound =
(Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ if (outbound == null)
+ throw new IllegalStateException("Cannot find property: " +
MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ return outbound;
+ }
+
+ public boolean isMTOMEnabled(String str) {
+
+ if (
str.indexOf("http://www.w3.org/2004/08/xop/include") > -1) {
+ return true;
+ }
+ return false;
+
+ }
+
+ public boolean isWSAEnabled(String str) {
+ if (str.indexOf("Action") > -1)
+ {
+ return true;
+ }
+ return false;
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServletTestClient.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServletTestClient.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServletTestClient.java 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3140;
+
+import java.awt.Image;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.imageio.ImageIO;
+import javax.naming.InitialContext;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class ServletTestClient extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+ public static StringBuffer resultTrace = new StringBuffer();
+ MTOMTest mtomTestPort = null;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ try
+ {
+ InitialContext ctx = new InitialContext();
+ mtomTestPort = (MTOMTest)
ctx.lookup("java:comp/env/service/mtomTest");
+
+ }
+ catch (Exception e)
+ {
+ System.err.println("ServletClient:init() Exception: " + e);
+ e.printStackTrace();
+ }
+ }
+
+ public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
+ {
+ resultTrace = new StringBuffer();
+ String reqParas[] = req.getParameterValues("mtom");
+ if (reqParas != null && reqParas[0].equals("large"))
+ {
+ doMtom(req, res, true);
+ }
+ if (reqParas != null && reqParas[0].equals("small"))
+ {
+ doMtom(req, res, false);
+ }
+
+ }
+
+
+ public void doMtom(HttpServletRequest req, HttpServletResponse res, boolean
largeImage) throws ServletException, IOException
+ {
+ try
+ {
+ String jpgName = largeImage ? "large.jpg" : "small.jpg";
+ URL url = this.getClass().getClassLoader().getResource(jpgName);
+ InputStream ins = url.openStream();
+ Image image = ImageIO.read(ins);
+ DataType request= new DataType();
+ request.setDoc(image);
+ request.setRequest("");
+ ResponseType responseType = mtomTestPort.mtomIn(request);
+ resultTrace.append(responseType.getResponse());
+ ins.close();
+ res.getOutputStream().println(resultTrace.toString());
+ }
+ catch (Throwable e)
+ {
+ e.printStackTrace(res.getWriter());
+ }
+
+ }
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/client-handlers.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/client-handlers.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/client-handlers.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<handler-chains
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ javaee_web_services_1_2.xsd">
+ <handler-chain>
+ <handler>
+ <handler-name>ClientHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxws.jbws3140.ClientHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
\ No newline at end of file
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/server-handlers.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/server-handlers.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/server-handlers.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<handler-chains
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ javaee_web_services_1_2.xsd">
+ <handler-chain>
+ <handler>
+ <handler-name>ServerHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxws.jbws3140.ServerHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
\ No newline at end of file
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Client/jboss-web.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Client/jboss-web.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Client/jboss-web.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+
+<jboss-web>
+ <context-root>/jbws3140-client</context-root>
+</jboss-web>
\ No newline at end of file
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Client/web.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Client/web.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Client/web.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+ <display-name>ServletTestClient</display-name>
+ <servlet>
+ <servlet-name>ServletTestClient</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3140.ServletTestClient</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ServletTestClient</servlet-name>
+ <url-pattern>/ServletTest</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>60</session-timeout>
+ </session-config>
+
+ <service-ref>
+ <service-ref-name>service/mtomTest</service-ref-name>
+
<service-interface>org.jboss.test.ws.jaxws.jbws3140.EndpointService</service-interface>
+
<service-ref-type>org.jboss.test.ws.jaxws.jbws3140.MTOMTest</service-ref-type>
+ <wsdl-file>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
+ <service-qname
xmlns:servicens="http://TestEndpoint.org">servicens:TestEndpointService</service-qname>
+ <port-component-ref>
+
<service-endpoint-interface>org.jboss.test.ws.jaxws.jbws3140.MTOMTest</service-endpoint-interface>
+ <enable-mtom>true</enable-mtom>
+ <mtom-threshold>750</mtom-threshold>
+ <addressing>
+ <enabled>true</enabled>
+ <responses>ANONYMOUS</responses>
+ </addressing>
+ </port-component-ref>
+ </service-ref>
+ </web-app>
\ No newline at end of file
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/jboss-web.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/jboss-web.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/jboss-web.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws3140-server</context-root>
+</jboss-web>
\ No newline at end of file
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/web.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/web.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/web.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+ <display-name>MtomWSDDsTest</display-name>
+ <servlet>
+ <servlet-name>MtomImpl</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws3140.MTOMTestImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>MtomImpl</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/webservices.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/webservices.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Responses-Server/webservices.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<webservices
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.3"
+ xmlns:wsdl="http://TestEndpoint.org"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd">
+ <webservice-description>
+
<webservice-description-name>MTOMTestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>MTOMTestImpl</port-component-name>
+ <wsdl-port>wsdl:MTOMTestPort</wsdl-port>
+ <addressing>
+ <enabled>true</enabled>
+ <responses>NON_ANONYMOUS</responses>
+ </addressing>
+ <protocol-binding>##SOAP11_HTTP</protocol-binding>
+
<service-endpoint-interface>org.jboss.test.ws.jaxws.jbws3140.MTOMTest</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>MtomImpl</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/jboss-web.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/jboss-web.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/jboss-web.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws3140-server</context-root>
+</jboss-web>
\ No newline at end of file
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/web.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/web.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/web.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+ <display-name>MtomWSDDsTest</display-name>
+ <servlet>
+ <servlet-name>MtomImpl</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws3140.MTOMTestImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>MtomImpl</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/webservices.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/webservices.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/WEB-INF-Server/webservices.xml 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<webservices
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.3"
+ xmlns:wsdl="http://TestEndpoint.org"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd">
+ <webservice-description>
+
<webservice-description-name>MTOMTestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>MTOMTestImpl</port-component-name>
+ <wsdl-port>wsdl:MTOMTestPort</wsdl-port>
+ <enable-mtom>true</enable-mtom>
+ <mtom-threshold>500</mtom-threshold>
+ <addressing>
+ <enabled>true</enabled>
+ <responses>ANONYMOUS</responses>
+ </addressing>
+ <protocol-binding>##SOAP11_HTTP</protocol-binding>
+
<service-endpoint-interface>org.jboss.test.ws.jaxws.jbws3140.MTOMTest</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>MtomImpl</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/large.jpg
===================================================================
(Binary files differ)
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/large.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/small.jpg
===================================================================
(Binary files differ)
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/small.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/wsdl/TestEndpoint.wsdl
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/wsdl/TestEndpoint.wsdl
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws3140/wsdl/TestEndpoint.wsdl 2010-10-28
07:40:41 UTC (rev 13198)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="EchoService"
targetNamespace="http://TestEndpoint.org"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://TestEndpoint.org"
+
xmlns:x1="http://TestEndpoint.org/xsd"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:wsp="http://www.w3.org/ns/ws-policy"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsa="http://www.w3.org/2005/08/addressing"
+
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+ <types>
+ <schema
xmlns="http://www.w3.org/2001/XMLSchema"
+
targetNamespace="http://TestEndpoint.org/xsd"
+
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
+ elementFormDefault="qualified">
+ <complexType name="DataType">
+ <sequence>
+ <element name="request"
type="string"/>
+ <element name="doc" type="base64Binary"
xmime:expectedContentTypes="image/jpeg"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ResponseType">
+ <sequence>
+ <element name="response"
type="string"/>
+ <element name="reply" type="base64Binary"
xmime:expectedContentTypes="image/jpeg"/>
+ </sequence>
+ </complexType>
+
+ <element name="MtomRequest"
type="x1:DataType"/>
+ <element name="MtomResponse"
type="x1:ResponseType"/>
+ </schema>
+ </types>
+ <message name="MTOMInRequest">
+ <part name="data" element="x1:MtomRequest"/>
+ </message>
+ <message name="MTOMInResponse">
+ <part name="result" element="x1:MtomResponse"/>
+ </message>
+
+
+ <portType name="MTOMTest">
+ <operation name="MTOMIn">
+ <input message="tns:MTOMInRequest" />
+ <output message="tns:MTOMInResponse" />
+ </operation>
+ </portType>
+
+
+ <binding name="MTOMBindind" type="tns:MTOMTest">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="MTOMIn">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="TestEndpointService">
+ <port name="MTOMTestPort" binding="tns:MTOMBindind">
+ <soap:address
location="http://@jboss.bind.address@:8080/jaxws3140-server"/>
+ </port>
+ </service>
+</definitions>
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-10-27 19:00:53
UTC (rev 13197)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-10-28 07:40:41
UTC (rev 13198)
@@ -14,5 +14,8 @@
# [JBWS-2957] EJB3 webservices in web archives (fixed on AS 6 series only)
org/jboss/test/ws/jaxws/jbws2957/**
+# [JBWS-3140] mtom, wsaddressing support in webservices.xml
+org/jboss/test/ws/jaxws/jbws3140/**
+
# [JBWS-3150] This test causes hudson to freeze
org/jboss/test/ws/common/soap/SOAPConnectionTestCase.*
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-10-27 19:00:53
UTC (rev 13197)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-10-28 07:40:41
UTC (rev 13198)
@@ -14,5 +14,8 @@
# [JBWS-2957] EJB3 webservices in web archives (fixed on AS 6 series only)
org/jboss/test/ws/jaxws/jbws2957/**
+# [JBWS-3140] mtom, wsaddressing support in webservices.xml
+org/jboss/test/ws/jaxws/jbws3140/**
+
# [JBWS-3150] This test causes hudson to freeze
org/jboss/test/ws/common/soap/SOAPConnectionTestCase.*
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-10-27 19:00:53
UTC (rev 13197)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-10-28 07:40:41
UTC (rev 13198)
@@ -7,5 +7,8 @@
# [JBAS-8363] Virtual host issue in JBossWeb
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
+# [JBWS-3140] mtom, wsaddressing support in webservices.xml
+org/jboss/test/ws/jaxws/jbws3140/**
+
# [JBWS-3150] This test causes hudson to freeze
org/jboss/test/ws/common/soap/SOAPConnectionTestCase.*