JBossWS SVN: r13198 - in stack/native/trunk/modules: testsuite and 9 other directories.
by jbossws-commits@lists.jboss.org
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")
+@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})
+@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.*
14 years, 1 month
JBossWS SVN: r13197 - projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-10-27 15:00:53 -0400 (Wed, 27 Oct 2010)
New Revision: 13197
Added:
projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/AS6JBossWSDocLinkFilter.java
Modified:
projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/Magnolia2DocBook.java
projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java
Log:
Adding filter used for JBoss AS6 doc
Added: projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/AS6JBossWSDocLinkFilter.java
===================================================================
--- projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/AS6JBossWSDocLinkFilter.java (rev 0)
+++ projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/AS6JBossWSDocLinkFilter.java 2010-10-27 19:00:53 UTC (rev 13197)
@@ -0,0 +1,67 @@
+/*
+ * 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.util.magnolia2docbook;
+
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+public class AS6JBossWSDocLinkFilter implements LinkFilter
+{
+ private static final List<String> allowedPages = new LinkedList<String>();
+ static
+ {
+ allowedPages.add("JBossWS-WebServices".toLowerCase());
+ allowedPages.add("JBossWS-Fromconceptstotechnology".toLowerCase());
+ allowedPages.add("JBossWS-QuickStart".toLowerCase());
+ allowedPages.add("JBossWS-UserGuide".toLowerCase());
+ allowedPages.add("JBossWS-StackCXFUserGuide".toLowerCase());
+ allowedPages.add("JBossWS-JAX-WSTools".toLowerCase());
+ allowedPages.add("JBossWS-wsconsume".toLowerCase());
+ allowedPages.add("JBossWS-wsprovide".toLowerCase());
+ allowedPages.add("JBossWS-wsrunclient".toLowerCase());
+ allowedPages.add("JBossWS-Authentication".toLowerCase());
+ allowedPages.add("JBossWS-Securetransport".toLowerCase());
+ allowedPages.add("JBossWS-Endpointmanagement".toLowerCase());
+ allowedPages.add("JBossWS-Recordsmanagement".toLowerCase());
+ allowedPages.add("JBossWS-CXFWS-Addressingtutorial".toLowerCase());
+ allowedPages.add("JBossWS-CXFWS-ReliableMessagingtutorial".toLowerCase());
+ allowedPages.add("JBossWS-CXFJMStransporttutorial".toLowerCase());
+ allowedPages.add("JBossWS-Articlesandspecs".toLowerCase());
+ allowedPages.add("JBossWS-JAX-WSAnnotations".toLowerCase());
+ }
+
+ @Override
+ public boolean accept(URL url)
+ {
+ String path = url.getPath() != null ? url.getPath().toLowerCase() : "";
+ for (String p : allowedPages)
+ {
+ if (path.contains(p))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
Modified: projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/Magnolia2DocBook.java
===================================================================
--- projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/Magnolia2DocBook.java 2010-10-27 16:28:55 UTC (rev 13196)
+++ projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/Magnolia2DocBook.java 2010-10-27 19:00:53 UTC (rev 13197)
@@ -37,7 +37,8 @@
public static void main(String[] args) throws Exception
{
String startPage = args[0];
- LinkFilter filter = new JBossWSLinkFilter(); //TODO read from args
+ //LinkFilter filter = new JBossWSLinkFilter(); //TODO read from args
+ LinkFilter filter = new AS6JBossWSDocLinkFilter();
Magnolia2DocBook m2d = new Magnolia2DocBook();
m2d.run(new URL(startPage), false, "output", filter);
Modified: projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java
===================================================================
--- projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java 2010-10-27 16:28:55 UTC (rev 13196)
+++ projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java 2010-10-27 19:00:53 UTC (rev 13197)
@@ -548,4 +548,10 @@
return name + ".xhtml";
}
+ @Override
+ public String toString()
+ {
+ return "[" + name + "], " + super.toString();
+ }
+
}
14 years, 1 month
JBossWS SVN: r13196 - projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-10-27 12:28:55 -0400 (Wed, 27 Oct 2010)
New Revision: 13196
Modified:
projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java
projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/xhtml2docbook.xsl
Log:
- Update ref id for local href
- Always generate <para> for <p> tags
Modified: projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java
===================================================================
--- projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java 2010-10-27 15:47:57 UTC (rev 13195)
+++ projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java 2010-10-27 16:28:55 UTC (rev 13196)
@@ -277,11 +277,17 @@
else if (A.equals(elName))
{
String clazz = xmlr.getAttributeValue(null, CLASS);
+ String href = xmlr.getAttributeValue(null, HREF);
if (clazz != null && clazz.startsWith(WIKI_LINK_CLASS))
{
updateLink(xmlr, xtw);
break;
}
+ else if (href != null && href.startsWith("#"))
+ {
+ updateLocalRef(xmlr, xtw, name);
+ break;
+ }
else
{
xtw.writeStartElement(xmlr.getPrefix(), xmlr.getLocalName(), xmlr.getNamespaceURI());
@@ -472,6 +478,14 @@
}
}
+ private static void updateLocalRef(XMLStreamReader xmlr, XMLStreamWriter xtw, String prefix) throws XMLStreamException, MalformedURLException
+ {
+ xtw.writeStartElement(xmlr.getPrefix(), xmlr.getLocalName(), xmlr.getNamespaceURI());
+ String linkString = xmlr.getAttributeValue(null, HREF);
+ xtw.writeAttribute(HREF, "#" + prefix + "_" + linkString.substring(1));
+ copyElementAttributes(xmlr, xtw, HREF);
+ }
+
private static void copyElementAttributes(XMLStreamReader xmlr, XMLStreamWriter xtw, String... localNameExclusions) throws XMLStreamException
{
List<String> ex = Arrays.asList(localNameExclusions);
Modified: projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/xhtml2docbook.xsl
===================================================================
--- projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/xhtml2docbook.xsl 2010-10-27 15:47:57 UTC (rev 13195)
+++ projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/xhtml2docbook.xsl 2010-10-27 16:28:55 UTC (rev 13196)
@@ -79,10 +79,10 @@
<!-- These templates perform one-to-one conversions of HTML elements into
DocBook elements -->
-<xsl:template match="html:p">
+<!-- <xsl:template match="html:p"> -->
<!-- if the paragraph has no text (perhaps only a child <img>), don't
make it a para -->
- <xsl:choose>
+<!-- <xsl:choose>
<xsl:when test="normalize-space(.) = ''">
<xsl:apply-templates/>
</xsl:when>
@@ -92,7 +92,14 @@
</para>
</xsl:otherwise>
</xsl:choose>
+</xsl:template> -->
+
+<xsl:template match="html:p">
+ <para>
+ <xsl:apply-templates/>
+ </para>
</xsl:template>
+
<xsl:template match="html:pre">
<screen xml:space="preserve"><xsl:apply-templates/></screen>
</xsl:template>
@@ -407,6 +414,8 @@
</note>
</xsl:template>
<xsl:template match="html:div[@class = 'toc']"/>
+<xsl:template match="html:div[@id = 'since']"/>
+<xsl:template match="html:div[@class = 'since']"/>
<!-- Ignored elements -->
<xsl:template match="html:hr"/>
14 years, 1 month
JBossWS SVN: r13195 - common/trunk/src/main/java/org/jboss/wsf/common/serviceref.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-27 11:47:57 -0400 (Wed, 27 Oct 2010)
New Revision: 13195
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceRefBinderJAXWS.java
Log:
fix regressions
Modified: common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceRefBinderJAXWS.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceRefBinderJAXWS.java 2010-10-27 11:54:05 UTC (rev 13194)
+++ common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceRefBinderJAXWS.java 2010-10-27 15:47:57 UTC (rev 13195)
@@ -62,9 +62,15 @@
final String targetClassName = (targetClass != null ? targetClass.getName() : null);
final String serviceImplClassName = getServiceImplClassName(serviceRef);
- // TODO: refactor these two lines of code higher
- serviceRef.setServiceInterface(targetClassName);
- serviceRef.setServiceImplClass(serviceImplClassName);
+ // TODO: investigate why these if conditions
+ if (targetClassName != null)
+ {
+ serviceRef.setServiceInterface(targetClassName);
+ }
+ if (serviceRef.getServiceImplClass() == null)
+ {
+ serviceRef.setServiceImplClass(serviceImplClassName);
+ }
this.processWsdlOverride(serviceRef, loader);
@@ -217,7 +223,7 @@
if (serviceRefAnnotation != null && (serviceRefAnnotation.type() != Object.class))
targetClass = serviceRefAnnotation.type();
}
-
+
return targetClass;
}
14 years, 1 month
JBossWS SVN: r13194 - common/trunk/src/main/java/org/jboss/wsf/common/serviceref.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-27 07:54:05 -0400 (Wed, 27 Oct 2010)
New Revision: 13194
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceObjectFactoryJAXWS.java
Log:
fix regression introduced with refactoring
Modified: common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceObjectFactoryJAXWS.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceObjectFactoryJAXWS.java 2010-10-27 08:14:55 UTC (rev 13193)
+++ common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceObjectFactoryJAXWS.java 2010-10-27 11:54:05 UTC (rev 13194)
@@ -165,6 +165,9 @@
{
String targetClassName = serviceRefMD.getServiceRefType();
+ if (targetClassName == null)
+ targetClassName = serviceRefMD.getServiceInterface();
+
if (Service.class.getName().equals(targetClassName))
targetClassName = serviceRefMD.getServiceImplClass();
14 years, 1 month
JBossWS SVN: r13193 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-10-27 04:14:55 -0400 (Wed, 27 Oct 2010)
New Revision: 13193
Modified:
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
stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-3150] Excluding test causing Hudson to freeze
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-10-26 17:50:18 UTC (rev 13192)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-10-27 08:14:55 UTC (rev 13193)
@@ -13,3 +13,6 @@
# [JBWS-2957] EJB3 webservices in web archives (fixed on AS 6 series only)
org/jboss/test/ws/jaxws/jbws2957/**
+
+# [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-26 17:50:18 UTC (rev 13192)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-10-27 08:14:55 UTC (rev 13193)
@@ -13,3 +13,6 @@
# [JBWS-2957] EJB3 webservices in web archives (fixed on AS 6 series only)
org/jboss/test/ws/jaxws/jbws2957/**
+
+# [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-26 17:50:18 UTC (rev 13192)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-10-27 08:14:55 UTC (rev 13193)
@@ -6,3 +6,6 @@
# [JBAS-8363] Virtual host issue in JBossWeb
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
+
+# [JBWS-3150] This test causes hudson to freeze
+org/jboss/test/ws/common/soap/SOAPConnectionTestCase.*
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-10-26 17:50:18 UTC (rev 13192)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-10-27 08:14:55 UTC (rev 13193)
@@ -6,3 +6,6 @@
# [JBAS-8363] Virtual host issue in JBossWeb
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
+
+# [JBWS-3150] This test causes hudson to freeze
+org/jboss/test/ws/common/soap/SOAPConnectionTestCase.*
14 years, 1 month
JBossWS SVN: r13192 - projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-10-26 13:50:18 -0400 (Tue, 26 Oct 2010)
New Revision: 13192
Modified:
projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java
projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/xhtml2docbook.xsl
Log:
Generate unique ids over different pages and avoid empty ids (they hurt the xsl fo to generate pdf)
Modified: projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java
===================================================================
--- projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java 2010-10-26 14:58:08 UTC (rev 13191)
+++ projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/XHTMLPage.java 2010-10-26 17:50:18 UTC (rev 13192)
@@ -304,14 +304,14 @@
if (hLevel == nestedSectionLevel + 1)
{
nestedSectionLevel++;
- startSection(xmlr, xtw);
+ startSection(xmlr, xtw, name);
break;
}
else if (hLevel == nestedSectionLevel)
{
xtw.writeEndElement();
xtw.writeCharacters("\n");
- startSection(xmlr, xtw);
+ startSection(xmlr, xtw, name);
break;
}
else if (hLevel < nestedSectionLevel)
@@ -323,7 +323,7 @@
xtw.writeCharacters("\n");
}
nestedSectionLevel = hLevel;
- startSection(xmlr, xtw);
+ startSection(xmlr, xtw, name);
break;
}
else if (hLevel > nestedSectionLevel && nestedSectionLevel == lowerNestedSectionLevel && lowerNestedSectionLevel == BASE_H_LEVEL)
@@ -331,7 +331,7 @@
//when -for instance- the page does not use anything below h4
nestedSectionLevel = hLevel;
lowerNestedSectionLevel = hLevel - 1;
- startSection(xmlr, xtw);
+ startSection(xmlr, xtw, name);
break;
}
else
@@ -439,14 +439,15 @@
}
}
- private static void startSection(XMLStreamReader xmlr, XMLStreamWriter xtw) throws XMLStreamException
+ private static void startSection(XMLStreamReader xmlr, XMLStreamWriter xtw, String idPrefix) throws XMLStreamException
{
xtw.writeStartElement("", DIV.getLocalPart(), DIV.getNamespaceURI());
xtw.writeAttribute(CLASS, SECTION);
String id = xmlr.getAttributeValue(null, ID);
if (id != null)
{
- xtw.writeAttribute(ID, id);
+
+ xtw.writeAttribute(ID, idPrefix != null ? idPrefix + "_" + id : id);
}
xtw.writeStartElement(xmlr.getPrefix(), xmlr.getLocalName(), xmlr.getNamespaceURI());
copyElementAttributes(xmlr, xtw, ID);
Modified: projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/xhtml2docbook.xsl
===================================================================
--- projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/xhtml2docbook.xsl 2010-10-26 14:58:08 UTC (rev 13191)
+++ projects/magnolia2docbook/src/org/jboss/util/magnolia2docbook/xhtml2docbook.xsl 2010-10-26 17:50:18 UTC (rev 13192)
@@ -14,7 +14,7 @@
<xsl:output method="xml" indent="no"/>
<xsl:param name="filename"></xsl:param>
-<xsl:param name="prefix">wb</xsl:param>
+<xsl:param name="prefix">chap</xsl:param>
<xsl:param name="graphics_location">images/</xsl:param>
<!-- Main block-level conversions -->
@@ -23,7 +23,7 @@
</xsl:template>
<!-- This template converts each HTML file encountered into a DocBook
- section. For a title, it selects the first h1 element -->
+ chapter. For a title, it selects the head/title element -->
<xsl:template match="html:body">
<chapter>
<xsl:if test="$filename != ''">
@@ -34,9 +34,6 @@
</xsl:attribute>
</xsl:if>
<title>
- <!-- <xsl:value-of select=".//html:h1[1]
- |.//html:h2[1]
- |.//html:h3[1]"/> -->
<xsl:value-of select="parent::node()/html:head/html:title"/>
</title>
<xsl:apply-templates select="*"/>
@@ -391,9 +388,13 @@
<!-- JBossWS customizations -->
<xsl:template match="html:div[@class = 'section']">
<section>
- <xsl:attribute name="id">
- <xsl:value-of select="@id"/>
- </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="@id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
<title><xsl:value-of select="child::node()[1]"/></title>
<xsl:apply-templates select="child::node()[position() != 1]"/>
</section>
14 years, 1 month
JBossWS SVN: r13191 - common/trunk/src/main/java/org/jboss/wsf/common/serviceref.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-26 10:58:08 -0400 (Tue, 26 Oct 2010)
New Revision: 13191
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceRefBinderJAXWS.java
common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceReferenceableJAXWS.java
common/trunk/src/main/java/org/jboss/wsf/common/serviceref/ServiceRefSerializer.java
Log:
refactoring
Modified: common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceRefBinderJAXWS.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceRefBinderJAXWS.java 2010-10-26 12:48:45 UTC (rev 13190)
+++ common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceRefBinderJAXWS.java 2010-10-26 14:58:08 UTC (rev 13191)
@@ -58,17 +58,16 @@
this.processRespectBindingAnnotation(serviceRef);
this.processHandlerChainAnnotation(serviceRef);
- final WebServiceRef serviceRefAnnotation = this.getWebServiceRefAnnotation(serviceRef);
- final Class<?> targetClass = getTargetClass(serviceRef, serviceRefAnnotation);
+ final Class<?> targetClass = getTargetClass(serviceRef);
final String targetClassName = (targetClass != null ? targetClass.getName() : null);
- final String serviceImplClassName = getServiceImplClassName(serviceRef, serviceRefAnnotation, targetClass);
+ final String serviceImplClassName = getServiceImplClassName(serviceRef);
- this.processWsdlOverride(serviceRef, serviceRefAnnotation, loader, serviceImplClassName);
-
// TODO: refactor these two lines of code higher
+ serviceRef.setServiceInterface(targetClassName);
serviceRef.setServiceImplClass(serviceImplClassName);
- serviceRef.setServiceInterface(targetClassName);
-
+
+ this.processWsdlOverride(serviceRef, loader);
+
return this.createJAXWSReferenceable(serviceRef);
}
@@ -153,10 +152,10 @@
return annotatedElement != null ? (T) annotatedElement.getAnnotation(annotationClass) : null;
}
- private void processWsdlOverride(final UnifiedServiceRefMetaData serviceRefMD,
- final WebServiceRef serviceRefAnnotation, final ClassLoader loader, final String serviceImplClassName)
+ private void processWsdlOverride(final UnifiedServiceRefMetaData serviceRefMD, final ClassLoader loader)
{
// Set the wsdlLocation if there is no override already
+ final WebServiceRef serviceRefAnnotation = this.getWebServiceRefAnnotation(serviceRefMD);
if (serviceRefMD.getWsdlOverride() == null && serviceRefAnnotation != null
&& serviceRefAnnotation.wsdlLocation().length() > 0)
serviceRefMD.setWsdlOverride(serviceRefAnnotation.wsdlLocation());
@@ -166,7 +165,7 @@
{
try
{
- Class<?> serviceClass = loader.loadClass(serviceImplClassName);
+ Class<?> serviceClass = loader.loadClass(serviceRefMD.getServiceImplClass());
if (serviceClass.getAnnotation(WebServiceClient.class) != null)
{
WebServiceClient clientDecl = (WebServiceClient) serviceClass.getAnnotation(WebServiceClient.class);
@@ -198,7 +197,7 @@
return declaringClass;
}
- private Class<?> getTargetClass(final UnifiedServiceRefMetaData serviceRefMD, WebServiceRef serviceRefAnnotation)
+ private Class<?> getTargetClass(final UnifiedServiceRefMetaData serviceRefMD)
{
final AnnotatedElement annotatedElement = (AnnotatedElement) serviceRefMD.getAnnotatedElement();
@@ -214,6 +213,7 @@
}
else
{
+ final WebServiceRef serviceRefAnnotation = this.getWebServiceRefAnnotation(serviceRefMD);
if (serviceRefAnnotation != null && (serviceRefAnnotation.type() != Object.class))
targetClass = serviceRefAnnotation.type();
}
@@ -221,6 +221,31 @@
return targetClass;
}
+ private String getServiceImplClassName(final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ String serviceImplClass = null;
+
+ // #1 Use the explicit @WebServiceRef.value
+ final WebServiceRef serviceRefAnnotation = this.getWebServiceRefAnnotation(serviceRefMD);
+ if (serviceRefAnnotation != null && serviceRefAnnotation.value() != Service.class)
+ serviceImplClass = serviceRefAnnotation.value().getName();
+
+ // #2 Use the target ref type
+ final Class<?> targetClass = getTargetClass(serviceRefMD);
+ if (serviceImplClass == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
+ serviceImplClass = targetClass.getName();
+
+ // #3 Use <service-interface>
+ if (serviceImplClass == null && serviceRefMD.getServiceInterface() != null)
+ serviceImplClass = serviceRefMD.getServiceInterface();
+
+ // #4 Use javax.xml.ws.Service
+ if (serviceImplClass == null)
+ serviceImplClass = Service.class.getName();
+
+ return serviceImplClass;
+ }
+
private WebServiceRef getWebServiceRefAnnotation(final UnifiedServiceRefMetaData serviceRefMD)
{
final WebServiceRef webServiceRefAnnotation = this.getAnnotation(serviceRefMD, WebServiceRef.class);
@@ -267,28 +292,4 @@
return returnValue;
}
-
- private String getServiceImplClassName(final UnifiedServiceRefMetaData serviceRefMD,
- final WebServiceRef serviceRefAnnotation, final Class<?> targetClass)
- {
- String serviceImplClass = null;
-
- // #1 Use the explicit @WebServiceRef.value
- if (serviceRefAnnotation != null && serviceRefAnnotation.value() != Service.class)
- serviceImplClass = serviceRefAnnotation.value().getName();
-
- // #2 Use the target ref type
- if (serviceImplClass == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
- serviceImplClass = targetClass.getName();
-
- // #3 Use <service-interface>
- if (serviceImplClass == null && serviceRefMD.getServiceInterface() != null)
- serviceImplClass = serviceRefMD.getServiceInterface();
-
- // #4 Use javax.xml.ws.Service
- if (serviceImplClass == null)
- serviceImplClass = Service.class.getName();
-
- return serviceImplClass;
- }
}
Modified: common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceReferenceableJAXWS.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceReferenceableJAXWS.java 2010-10-26 12:48:45 UTC (rev 13190)
+++ common/trunk/src/main/java/org/jboss/wsf/common/serviceref/AbstractServiceReferenceableJAXWS.java 2010-10-26 14:58:08 UTC (rev 13191)
@@ -43,7 +43,7 @@
{
private final UnifiedServiceRefMetaData serviceRef;
- public AbstractServiceReferenceableJAXWS(final UnifiedServiceRefMetaData serviceRef)
+ protected AbstractServiceReferenceableJAXWS(final UnifiedServiceRefMetaData serviceRef)
{
this.serviceRef = serviceRef;
}
Modified: common/trunk/src/main/java/org/jboss/wsf/common/serviceref/ServiceRefSerializer.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/serviceref/ServiceRefSerializer.java 2010-10-26 12:48:45 UTC (rev 13190)
+++ common/trunk/src/main/java/org/jboss/wsf/common/serviceref/ServiceRefSerializer.java 2010-10-26 14:58:08 UTC (rev 13191)
@@ -38,14 +38,14 @@
*/
final class ServiceRefSerializer
{
- public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
+ static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
private ServiceRefSerializer()
{
// forbidden constructor
}
- public static byte[] marshall(final UnifiedServiceRefMetaData obj) throws NamingException
+ static byte[] marshall(final UnifiedServiceRefMetaData obj) throws NamingException
{
final ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
@@ -63,7 +63,7 @@
return baos.toByteArray();
}
- public static UnifiedServiceRefMetaData unmarshall(final byte[] data) throws NamingException
+ static UnifiedServiceRefMetaData unmarshall(final byte[] data) throws NamingException
{
final UnifiedServiceRefMetaData sref;
14 years, 1 month
JBossWS SVN: r13190 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-26 08:48:45 -0400 (Tue, 26 Oct 2010)
New Revision: 13190
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXWS.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceReferenceableJAXWS.java
Log:
refactoring
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXWS.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXWS.java 2010-10-26 12:48:14 UTC (rev 13189)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXWS.java 2010-10-26 12:48:45 UTC (rev 13190)
@@ -34,9 +34,8 @@
final class CXFServiceRefBinderJAXWS extends AbstractServiceRefBinderJAXWS
{
@Override
- protected Referenceable createJAXWSReferenceable(final String serviceImplClass, final String targetClassName,
- final UnifiedServiceRefMetaData serviceRefUMDM)
+ protected Referenceable createJAXWSReferenceable(final UnifiedServiceRefMetaData serviceRefUMDM)
{
- return new CXFServiceReferenceableJAXWS(serviceImplClass, targetClassName, serviceRefUMDM);
+ return new CXFServiceReferenceableJAXWS(serviceRefUMDM);
}
}
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceReferenceableJAXWS.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceReferenceableJAXWS.java 2010-10-26 12:48:14 UTC (rev 13189)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceReferenceableJAXWS.java 2010-10-26 12:48:45 UTC (rev 13190)
@@ -27,15 +27,13 @@
/**
* {@inheritDoc}
*
- * @author Thomas.Diesler(a)jboss.org
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
final class CXFServiceReferenceableJAXWS extends AbstractServiceReferenceableJAXWS<CXFServiceObjectFactoryJAXWS>
{
- public CXFServiceReferenceableJAXWS(final String serviceImplClass, final String targetClassName,
- final UnifiedServiceRefMetaData serviceRefUMDM)
+ public CXFServiceReferenceableJAXWS(final UnifiedServiceRefMetaData serviceRefMD)
{
- super(serviceImplClass, targetClassName, serviceRefUMDM);
+ super(serviceRefMD);
}
@Override
14 years, 1 month
JBossWS SVN: r13189 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core: jaxws/client and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-26 08:48:14 -0400 (Tue, 26 Oct 2010)
New Revision: 13189
Added:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/NativeServiceReferenceableJAXRPC.java
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/NativeServiceRefBinderJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceRefBinderJAXWS.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceReferenceableJAXWS.java
Log:
refactoring
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/NativeServiceRefBinderJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/NativeServiceRefBinderJAXRPC.java 2010-10-26 12:46:45 UTC (rev 13188)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/NativeServiceRefBinderJAXRPC.java 2010-10-26 12:48:14 UTC (rev 13189)
@@ -36,6 +36,6 @@
@Override
protected Referenceable createJAXRPCReferenceable(final UnifiedServiceRefMetaData serviceRefUMDM)
{
- return new ServiceReferenceable(serviceRefUMDM);
+ return new NativeServiceReferenceableJAXRPC(serviceRefUMDM);
}
}
Added: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/NativeServiceReferenceableJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/NativeServiceReferenceableJAXRPC.java (rev 0)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/NativeServiceReferenceableJAXRPC.java 2010-10-26 12:48:14 UTC (rev 13189)
@@ -0,0 +1,182 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.ws.core.jaxrpc.client;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.net.URL;
+
+import javax.naming.BinaryRefAddr;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.naming.Referenceable;
+import javax.naming.StringRefAddr;
+
+import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * A JNDI reference to a javax.xml.rpc.Service
+ * <p/>
+ * It holds the information to reconstrut the javax.xml.rpc.Service
+ * when the client does a JNDI lookup.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-April-2004
+ */
+public class NativeServiceReferenceableJAXRPC implements Referenceable
+{
+ public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
+ public static final String SECURITY_CONFIG = "SECURITY_CONFIG";
+ public static final String PORT_COMPONENT_LINK = "PORT_COMPONENT_LINK";
+ public static final String PORT_COMPONENT_LINK_SERVLET = "PORT_COMPONENT_LINK_SERVLET";
+
+ private UnifiedServiceRefMetaData refMetaData;
+ private UnifiedVirtualFile vfsRoot;
+
+ /**
+ * A service referenceable for a WSDL document that is part of the deployment
+ */
+ public NativeServiceReferenceableJAXRPC(UnifiedServiceRefMetaData refMetaData)
+ {
+ this.refMetaData = refMetaData;
+ this.vfsRoot = refMetaData.getVfsRoot();
+ }
+
+ /**
+ * Retrieves the Reference of this object.
+ *
+ * @return The non-null Reference of this object.
+ * @throws javax.naming.NamingException If a naming exception was encountered while retrieving the reference.
+ */
+ public Reference getReference() throws NamingException
+ {
+ Reference myRef = new Reference(NativeServiceReferenceableJAXRPC.class.getName(), ServiceObjectFactoryJAXRPC.class.getName(), null);
+
+ // Add a reference to the ServiceRefMetaData and WSDLDefinitions
+ myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
+
+ // FIXME: JBWS-1431 Merge ws-security config with jaxrpc/jaxws config
+ if (getSecurityConfig() != null)
+ myRef.add(new BinaryRefAddr(SECURITY_CONFIG, marshallSecurityConfig()));
+
+ // Add references to port component links
+ for (UnifiedPortComponentRefMetaData pcr : refMetaData.getPortComponentRefs())
+ {
+ String pcLink = pcr.getPortComponentLink();
+ if (pcLink != null)
+ {
+ myRef.add(new StringRefAddr(PORT_COMPONENT_LINK, pcLink));
+ try
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+
+ String host = config.getWebServiceHost();
+ int port = config.getWebServicePort();
+
+ String servletURL = "http://" + host + ":" + port + "/jbossws/pclink";
+ myRef.add(new StringRefAddr(PORT_COMPONENT_LINK_SERVLET, servletURL));
+ }
+ catch (Exception ex)
+ {
+ throw new NamingException("Cannot obtain path to PortComponentLinkServlet: " + ex);
+ }
+ }
+ }
+
+ return myRef;
+ }
+
+ /** Marshall the ServiceRefMetaData to an byte array
+ */
+ private byte[] marshallServiceRef() throws NamingException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
+ try
+ {
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(refMetaData);
+ oos.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot marshall service ref meta data, cause: " + e.toString());
+ }
+ return baos.toByteArray();
+ }
+
+ /** Marshall the WSSecurityConfiguration to an byte array
+ */
+ private byte[] marshallSecurityConfig() throws NamingException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
+ try
+ {
+ WSSecurityConfiguration securityConfig = WSSecurityConfigFactory.newInstance().createConfiguration(
+ refMetaData.getVfsRoot(), WSSecurityOMFactory.CLIENT_RESOURCE_NAME
+ );
+
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(securityConfig);
+ oos.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot marshall security config, cause: " + e.toString());
+ }
+ return baos.toByteArray();
+ }
+
+ private URL getSecurityConfig()
+ {
+ URL securityConfigURL = null;
+ try
+ {
+ UnifiedVirtualFile vfConfig = vfsRoot.findChild("WEB-INF/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
+ securityConfigURL = vfConfig.toURL();
+ }
+ catch (IOException ex)
+ {
+ // ignore
+ }
+ try
+ {
+ UnifiedVirtualFile vfConfig = vfsRoot.findChild("META-INF/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
+ securityConfigURL = vfConfig.toURL();
+ }
+ catch (IOException ex)
+ {
+ // ignore
+ }
+ return securityConfigURL;
+ }
+}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java 2010-10-26 12:46:45 UTC (rev 13188)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java 2010-10-26 12:48:14 UTC (rev 13189)
@@ -107,7 +107,7 @@
// Unmarshall the ServiceRefMetaData
UnifiedServiceRefMetaData serviceRef = null;
- RefAddr metaRefAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
+ RefAddr metaRefAddr = ref.get(NativeServiceReferenceableJAXRPC.SERVICE_REF_META_DATA);
ByteArrayInputStream bais = new ByteArrayInputStream((byte[])metaRefAddr.getContent());
try
{
@@ -124,7 +124,7 @@
// Unmarshall the WSSecurityConfiguration
WSSecurityConfiguration securityConfig = null;
- RefAddr wsseRefAddr = ref.get(ServiceReferenceable.SECURITY_CONFIG);
+ RefAddr wsseRefAddr = ref.get(NativeServiceReferenceableJAXRPC.SECURITY_CONFIG);
if (wsseRefAddr != null)
{
bais = new ByteArrayInputStream((byte[])wsseRefAddr.getContent());
@@ -172,7 +172,7 @@
// The web service client using a port-component-link, the contet is the URL to
// the PortComponentLinkServlet that will return the actual endpoint address
- RefAddr pcLinkRef = ref.get(ServiceReferenceable.PORT_COMPONENT_LINK);
+ RefAddr pcLinkRef = ref.get(NativeServiceReferenceableJAXRPC.PORT_COMPONENT_LINK);
if (pcLinkRef != null)
{
String pcLink = (String)pcLinkRef.getContent();
@@ -199,7 +199,7 @@
// We may be remote in the esoteric case where an appclient uses the port-comonent-link feature
if (endpointAddress == null)
{
- String servletPath = (String)ref.get(ServiceReferenceable.PORT_COMPONENT_LINK_SERVLET).getContent();
+ String servletPath = (String)ref.get(NativeServiceReferenceableJAXRPC.PORT_COMPONENT_LINK_SERVLET).getContent();
servletPath += "?pcLink=" + URLEncoder.encode(pcLink, "UTF-8");
InputStream is = new URL(servletPath).openStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2010-10-26 12:46:45 UTC (rev 13188)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2010-10-26 12:48:14 UTC (rev 13189)
@@ -1,186 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ws.core.jaxrpc.client;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.net.URL;
-
-import javax.naming.BinaryRefAddr;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.Referenceable;
-import javax.naming.StringRefAddr;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
-import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-
-/**
- * A JNDI reference to a javax.xml.rpc.Service
- * <p/>
- * It holds the information to reconstrut the javax.xml.rpc.Service
- * when the client does a JNDI lookup.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public class ServiceReferenceable implements Referenceable
-{
- // provide logging
- private static Logger log = Logger.getLogger(ServiceReferenceable.class);
-
- public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
- public static final String SECURITY_CONFIG = "SECURITY_CONFIG";
- public static final String PORT_COMPONENT_LINK = "PORT_COMPONENT_LINK";
- public static final String PORT_COMPONENT_LINK_SERVLET = "PORT_COMPONENT_LINK_SERVLET";
-
- private UnifiedServiceRefMetaData refMetaData;
- private UnifiedVirtualFile vfsRoot;
-
- /**
- * A service referenceable for a WSDL document that is part of the deployment
- */
- public ServiceReferenceable(UnifiedServiceRefMetaData refMetaData)
- {
- this.refMetaData = refMetaData;
- this.vfsRoot = refMetaData.getVfsRoot();
- }
-
- /**
- * Retrieves the Reference of this object.
- *
- * @return The non-null Reference of this object.
- * @throws javax.naming.NamingException If a naming exception was encountered while retrieving the reference.
- */
- public Reference getReference() throws NamingException
- {
- Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactoryJAXRPC.class.getName(), null);
-
- // Add a reference to the ServiceRefMetaData and WSDLDefinitions
- myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
-
- // FIXME: JBWS-1431 Merge ws-security config with jaxrpc/jaxws config
- if (getSecurityConfig() != null)
- myRef.add(new BinaryRefAddr(SECURITY_CONFIG, marshallSecurityConfig()));
-
- // Add references to port component links
- for (UnifiedPortComponentRefMetaData pcr : refMetaData.getPortComponentRefs())
- {
- String pcLink = pcr.getPortComponentLink();
- if (pcLink != null)
- {
- myRef.add(new StringRefAddr(PORT_COMPONENT_LINK, pcLink));
- try
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
-
- String host = config.getWebServiceHost();
- int port = config.getWebServicePort();
-
- String servletURL = "http://" + host + ":" + port + "/jbossws/pclink";
- myRef.add(new StringRefAddr(PORT_COMPONENT_LINK_SERVLET, servletURL));
- }
- catch (Exception ex)
- {
- throw new NamingException("Cannot obtain path to PortComponentLinkServlet: " + ex);
- }
- }
- }
-
- return myRef;
- }
-
- /** Marshall the ServiceRefMetaData to an byte array
- */
- private byte[] marshallServiceRef() throws NamingException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
- try
- {
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(refMetaData);
- oos.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot marshall service ref meta data, cause: " + e.toString());
- }
- return baos.toByteArray();
- }
-
- /** Marshall the WSSecurityConfiguration to an byte array
- */
- private byte[] marshallSecurityConfig() throws NamingException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
- try
- {
- WSSecurityConfiguration securityConfig = WSSecurityConfigFactory.newInstance().createConfiguration(
- refMetaData.getVfsRoot(), WSSecurityOMFactory.CLIENT_RESOURCE_NAME
- );
-
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(securityConfig);
- oos.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot marshall security config, cause: " + e.toString());
- }
- return baos.toByteArray();
- }
-
- private URL getSecurityConfig()
- {
- URL securityConfigURL = null;
- try
- {
- UnifiedVirtualFile vfConfig = vfsRoot.findChild("WEB-INF/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
- securityConfigURL = vfConfig.toURL();
- }
- catch (IOException ex)
- {
- // ignore
- }
- try
- {
- UnifiedVirtualFile vfConfig = vfsRoot.findChild("META-INF/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
- securityConfigURL = vfConfig.toURL();
- }
- catch (IOException ex)
- {
- // ignore
- }
- return securityConfigURL;
- }
-}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceRefBinderJAXWS.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceRefBinderJAXWS.java 2010-10-26 12:46:45 UTC (rev 13188)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceRefBinderJAXWS.java 2010-10-26 12:48:14 UTC (rev 13189)
@@ -34,9 +34,8 @@
public final class NativeServiceRefBinderJAXWS extends AbstractServiceRefBinderJAXWS
{
@Override
- protected Referenceable createJAXWSReferenceable(final String serviceImplClass, final String targetClassName,
- final UnifiedServiceRefMetaData serviceRefUMDM)
+ protected Referenceable createJAXWSReferenceable(final UnifiedServiceRefMetaData serviceRefUMDM)
{
- return new NativeServiceReferenceableJAXWS(serviceImplClass, targetClassName, serviceRefUMDM);
+ return new NativeServiceReferenceableJAXWS(serviceRefUMDM);
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceReferenceableJAXWS.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceReferenceableJAXWS.java 2010-10-26 12:46:45 UTC (rev 13188)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceReferenceableJAXWS.java 2010-10-26 12:48:14 UTC (rev 13189)
@@ -27,15 +27,13 @@
/**
* {@inheritDoc}
*
- * @author Thomas.Diesler(a)jboss.org
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public class NativeServiceReferenceableJAXWS extends AbstractServiceReferenceableJAXWS<NativeServiceObjectFactoryJAXWS>
{
- public NativeServiceReferenceableJAXWS(final String serviceImplClass, final String targetClassName,
- final UnifiedServiceRefMetaData serviceRefUMDM)
+ public NativeServiceReferenceableJAXWS(final UnifiedServiceRefMetaData serviceRefMD)
{
- super(serviceImplClass, targetClassName, serviceRefUMDM);
+ super(serviceRefMD);
}
@Override
14 years, 1 month