JBossWS SVN: r13040 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-29 04:08:28 -0400 (Wed, 29 Sep 2010)
New Revision: 13040
Removed:
stack/native/branches/netty/
Log:
Removing branch not used anymore
14 years, 3 months
JBossWS SVN: r13039 - in stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples: jmstransport/fromjava/META-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-09-28 23:29:41 -0400 (Tue, 28 Sep 2010)
New Revision: 13039
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jboss-dependency.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/jboss-dependency.xml
Log:
[JBWS-3127]:Added the missed file in previous commit
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jboss-dependency.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jboss-dependency.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jboss-dependency.xml 2010-09-29 03:29:41 UTC (rev 13039)
@@ -0,0 +1,4 @@
+<dependency xmlns="urn:jboss:dependency:1.0">
+ <item>org.hornetq:name="RequestQueue",module=JMS,type=Queue</item>
+ <item>org.hornetq:name="ResponseQueue",module=JMS,type=Queue</item>
+</dependency>
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/jboss-dependency.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/jboss-dependency.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/jboss-dependency.xml 2010-09-29 03:29:41 UTC (rev 13039)
@@ -0,0 +1,4 @@
+<dependency xmlns="urn:jboss:dependency:1.0">
+ <item>org.hornetq:name="RequestQueue",module=JMS,type=Queue</item>
+ <item>org.hornetq:name="ResponseQueue",module=JMS,type=Queue</item>
+</dependency>
\ No newline at end of file
14 years, 3 months
JBossWS SVN: r13038 - in stack/cxf/trunk/modules/testsuite/cxf-spring-tests: src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-09-28 23:01:03 -0400 (Tue, 28 Sep 2010)
New Revision: 13038
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java
Log:
[JBWS-3127]:Fix the build-Add queue deployment dependency to assure the jms queue deployed first
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml 2010-09-28 17:33:40 UTC (rev 13037)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml 2010-09-29 03:01:03 UTC (rev 13038)
@@ -17,6 +17,11 @@
<mkdir dir="${tests.output.dir}/test-libs"/>
<!-- jaxws-samples-jmstransport -->
+ <jar jarfile="${tests.output.dir}/test-libs/hornetq-samples-jmstransport-as6.sar">
+ <fileset dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
+ <include name="hornetq-jms.xml"/>
+ </fileset>
+ </jar>
<war
warfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport.war"
webxml="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/WEB-INF/web.xml">
@@ -30,34 +35,41 @@
</webinf>
</war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport-as6.sar">
- <fileset dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
+ <!-- jms transport from java for as6 -->
+
+ <jar jarfile="${tests.output.dir}/test-libs/hornetq-fromjava-jmsendpoints-as6.sar">
+ <fileset dir="${tests.output.dir}/test-resources/jaxws/samples/jmsendpoints/META-INF">
<include name="hornetq-jms.xml"/>
</fileset>
</jar>
-
+
<jar jarfile="${tests.output.dir}/test-libs/jaxws-fromjava-jmsendpoints-as6.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/jmstransport/Organization.class"/>
<include name="org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJmsImpl.class"/>
</fileset>
<metainf dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/fromjava/META-INF">
- <include name="hornetq-jms.xml"/>
<include name="jbossws-cxf.xml"/>
+ <include name="jboss-dependency.xml"/>
</metainf>
</jar>
+
+ <!-- jms endpoints sample-->
+
+ <jar jarfile="${tests.output.dir}/test-libs/hornetq-jmsendpoints-as6.sar">
+ <fileset dir="${tests.output.dir}/test-resources/jaxws/samples/jmsendpoints/META-INF">
+ <include name="hornetq-jms.xml"/>
+ </fileset>
+ </jar>
-
- <!-- jms endpoints sample-->
- <!-- jms transport from java for as6 -->
<jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmsendpoints-as6.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.class"/>
<include name="org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.class"/>
</fileset>
<metainf dir="${tests.output.dir}/test-resources/jaxws/samples/jmsendpoints/META-INF">
- <include name="hornetq-jms.xml"/>
<include name="jbossws-cxf.xml"/>
+ <include name="jboss-dependency.xml"/>
</metainf>
</jar>
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java 2010-09-28 17:33:40 UTC (rev 13037)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java 2010-09-29 03:01:03 UTC (rev 13038)
@@ -56,7 +56,7 @@
public static Test suite() throws Exception
{
if (isHornetQAvailable()) {
- return new JBossWSTestSetup(JMSEndpointsTestCase.class, "jaxws-samples-jmsendpoints-as6.jar");
+ return new JBossWSTestSetup(JMSEndpointsTestCase.class, "hornetq-jmsendpoints-as6.sar, jaxws-samples-jmsendpoints-as6.jar");
} else {
return new TestSuite();
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java 2010-09-28 17:33:40 UTC (rev 13037)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java 2010-09-29 03:01:03 UTC (rev 13038)
@@ -58,7 +58,7 @@
if (isHornetQAvailable())
{
return new JBossWSTestSetup(FromJavaJMSTransportTestCase.class,
- "jaxws-fromjava-jmsendpoints-as6.jar");
+ "hornetq-fromjava-jmsendpoints-as6.sar, jaxws-fromjava-jmsendpoints-as6.jar");
}
else
{
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java 2010-09-28 17:33:40 UTC (rev 13037)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java 2010-09-29 03:01:03 UTC (rev 13038)
@@ -66,7 +66,7 @@
if (isHornetQAvailable())
{
return new JBossWSTestSetup(JMSTransportTestCase.class,
- "jaxws-samples-jmstransport-as6.sar, jaxws-samples-jmstransport.war");
+ "hornetq-samples-jmstransport-as6.sar, jaxws-samples-jmstransport.war");
}
else
{
14 years, 3 months
JBossWS SVN: r13037 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj.
by jbossws-commits@lists.jboss.org
Author: sergeyb
Date: 2010-09-28 13:33:40 -0400 (Tue, 28 Sep 2010)
New Revision: 13037
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java
Log:
[JBWS-3084] Fixing the test port
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java 2010-09-28 16:54:54 UTC (rev 13036)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java 2010-09-28 17:33:40 UTC (rev 13037)
@@ -46,7 +46,7 @@
*/
public class SOAPConnectionTestCase extends JBossWSTest
{
- private final String serviceURL = "http://" + getServerHost() + ":8081/saaj-soap-connection/SaajService";
+ private final String serviceURL = "http://" + getServerHost() + ":8080/saaj-soap-connection/SaajService";
public static Test suite()
{
14 years, 3 months
JBossWS SVN: r13036 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj.
by jbossws-commits@lists.jboss.org
Author: sergeyb
Date: 2010-09-28 12:54:54 -0400 (Tue, 28 Sep 2010)
New Revision: 13036
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionFactoryImpl.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
Log:
[JBWS-3084] Fixing some formatting issues
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionFactoryImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionFactoryImpl.java 2010-09-28 16:38:50 UTC (rev 13035)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionFactoryImpl.java 2010-09-28 16:54:54 UTC (rev 13036)
@@ -25,11 +25,13 @@
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPException;
-public class SOAPConnectionFactoryImpl extends SOAPConnectionFactory {
+public class SOAPConnectionFactoryImpl extends SOAPConnectionFactory
+{
- @Override
- public SOAPConnection createConnection() throws SOAPException {
- return new SOAPConnectionImpl();
- }
+ @Override
+ public SOAPConnection createConnection() throws SOAPException
+ {
+ return new SOAPConnectionImpl();
+ }
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java 2010-09-28 16:38:50 UTC (rev 13035)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java 2010-09-28 16:54:54 UTC (rev 13036)
@@ -53,116 +53,138 @@
import org.apache.cxf.transport.MessageObserver;
import org.apache.cxf.transport.http.HTTPConduit;
-public class SOAPConnectionImpl extends SOAPConnection {
+public class SOAPConnectionImpl extends SOAPConnection
+{
@SuppressWarnings("unchecked")
@Override
- public SOAPMessage call(SOAPMessage msgOut, Object addressObject) throws SOAPException {
+ public SOAPMessage call(SOAPMessage msgOut, Object addressObject) throws SOAPException
+ {
+ String address = getAddress(addressObject);
+ ConduitInitiator ci = getConduitInitiator(address);
- String address = getAddress(addressObject);
- ConduitInitiator ci = getConduitInitiator(address);
+ // create a new Message and Exchange
+ EndpointInfo info = new EndpointInfo();
+ info.setAddress(address);
+ Message outMessage = new MessageImpl();
+ Exchange exch = new ExchangeImpl();
+ outMessage.setExchange(exch);
- // create a new Message and Exchange
- EndpointInfo info = new EndpointInfo();
- info.setAddress(address);
- Message outMessage = new MessageImpl();
- Exchange exch = new ExchangeImpl();
- outMessage.setExchange(exch);
-
- // sent SOAPMessage
- try {
- final Conduit c = ci.getConduit(info);
+ // sent SOAPMessage
+ try
+ {
+ final Conduit c = ci.getConduit(info);
- Map<String, List<String>> outHeaders = new HashMap<String, List<String>>();
- for (Iterator it = msgOut.getMimeHeaders().getAllHeaders(); it.hasNext();) {
- MimeHeader mimeHeader = (MimeHeader)it.next();
- if ("Content-Type".equals(mimeHeader.getName())) {
- outMessage.put(Message.CONTENT_TYPE, mimeHeader.getValue());
- }
+ Map<String, List<String>> outHeaders = new HashMap<String, List<String>>();
+ for (Iterator it = msgOut.getMimeHeaders().getAllHeaders(); it.hasNext();)
+ {
+ MimeHeader mimeHeader = (MimeHeader)it.next();
+ if ("Content-Type".equals(mimeHeader.getName()))
+ {
+ outMessage.put(Message.CONTENT_TYPE, mimeHeader.getValue());
+ }
- // disable the chunked encoding if requested
- if ("Transfer-Encoding".equals(mimeHeader.getName())
- && "disabled".equals(mimeHeader.getValue())
- && c instanceof HTTPConduit) {
- ((HTTPConduit)c).getClient().setAllowChunking(false);
- continue;
- }
+ // disable the chunked encoding if requested
+ if ("Transfer-Encoding".equals(mimeHeader.getName())
+ && "disabled".equals(mimeHeader.getValue())
+ && c instanceof HTTPConduit)
+ {
+ ((HTTPConduit)c).getClient().setAllowChunking(false);
+ continue;
+ }
- List<String> values = outHeaders.get(mimeHeader.getName());
- if (values == null) {
- values = new ArrayList<String>();
- outHeaders.put(mimeHeader.getName(), values);
- }
- values.add(mimeHeader.getValue());
- }
- outMessage.put(Message.HTTP_REQUEST_METHOD, "POST");
- outMessage.put(Message.PROTOCOL_HEADERS, outHeaders);
- c.prepare(outMessage);
+ List<String> values = outHeaders.get(mimeHeader.getName());
+ if (values == null)
+ {
+ values = new ArrayList<String>();
+ outHeaders.put(mimeHeader.getName(), values);
+ }
+ values.add(mimeHeader.getValue());
+ }
+ outMessage.put(Message.HTTP_REQUEST_METHOD, "POST");
+ outMessage.put(Message.PROTOCOL_HEADERS, outHeaders);
+ c.prepare(outMessage);
- OutputStream outs = outMessage.getContent(OutputStream.class);
- msgOut.writeTo(outs);
+ OutputStream outs = outMessage.getContent(OutputStream.class);
+ msgOut.writeTo(outs);
- c.setMessageObserver(new MessageObserver() {
- public void onMessage(Message inMessage) {
- LoadingByteArrayOutputStream bout = new LoadingByteArrayOutputStream();
- try {
- IOUtils.copy(inMessage.getContent(InputStream.class), bout);
- inMessage.getExchange().put(InputStream.class, bout.createInputStream());
+ c.setMessageObserver(new MessageObserver() {
+ public void onMessage(Message inMessage)
+ {
+ LoadingByteArrayOutputStream bout = new LoadingByteArrayOutputStream();
+ try
+ {
+ IOUtils.copy(inMessage.getContent(InputStream.class), bout);
+ inMessage.getExchange().put(InputStream.class, bout.createInputStream());
- Map<String, List<String>> inHeaders =
- (Map<String, List<String>>)inMessage.get(Message.PROTOCOL_HEADERS);
+ Map<String, List<String>> inHeaders =
+ (Map<String, List<String>>)inMessage.get(Message.PROTOCOL_HEADERS);
- inMessage.getExchange().put(Message.PROTOCOL_HEADERS, inHeaders);
- c.close(inMessage);
- } catch (IOException e) {
- //ignore
- }
+ inMessage.getExchange().put(Message.PROTOCOL_HEADERS, inHeaders);
+ c.close(inMessage);
+ }
+ catch (IOException e)
+ {
+ //ignore
}
- });
+ }
+ });
- c.close(outMessage);
- } catch (Exception ex) {
- throw new SOAPException("SOAPMessage can not be sent", ex);
- }
+ c.close(outMessage);
+ }
+ catch (Exception ex)
+ {
+ throw new SOAPException("SOAPMessage can not be sent", ex);
+ }
- // read SOAPMessage
- try {
- InputStream ins = exch.get(InputStream.class);
- Map<String, List<String>> inHeaders =
- (Map<String, List<String>>)exch.get(Message.PROTOCOL_HEADERS);
+ // read SOAPMessage
+ try
+ {
+ InputStream ins = exch.get(InputStream.class);
+ Map<String, List<String>> inHeaders =
+ (Map<String, List<String>>)exch.get(Message.PROTOCOL_HEADERS);
- MimeHeaders mimeHeaders = new MimeHeaders();
- if (inHeaders != null) {
- for (Map.Entry<String, List<String>> entry : inHeaders.entrySet()) {
- if (entry.getValue() != null) {
- for (String value : entry.getValue()) {
- mimeHeaders.addHeader(entry.getKey(), value);
- }
- }
+ MimeHeaders mimeHeaders = new MimeHeaders();
+ if (inHeaders != null)
+ {
+ for (Map.Entry<String, List<String>> entry : inHeaders.entrySet())
+ {
+ if (entry.getValue() != null)
+ {
+ for (String value : entry.getValue())
+ {
+ mimeHeaders.addHeader(entry.getKey(), value);
+ }
}
- }
+ }
+ }
- MessageFactory msgFac = MessageFactory.newInstance();
- return msgFac.createMessage(mimeHeaders, ins);
- } catch (Exception ex) {
- throw new SOAPException("SOAPMessage can not be read", ex);
- }
+ MessageFactory msgFac = MessageFactory.newInstance();
+ return msgFac.createMessage(mimeHeaders, ins);
+ }
+ catch (Exception ex)
+ {
+ throw new SOAPException("SOAPMessage can not be read", ex);
+ }
}
@Override
- public void close() throws SOAPException {
+ public void close() throws SOAPException
+ {
// complete
}
- private String getAddress(Object addressObject) throws SOAPException {
- if (addressObject instanceof URL || addressObject instanceof String) {
- return addressObject.toString();
- }
- throw new SOAPException("Address object of type " + addressObject.getClass().getName()
+ private String getAddress(Object addressObject) throws SOAPException
+ {
+ if (addressObject instanceof URL || addressObject instanceof String)
+ {
+ return addressObject.toString();
+ }
+ throw new SOAPException("Address object of type " + addressObject.getClass().getName()
+ " is not supported");
}
14 years, 3 months
JBossWS SVN: r13035 - in stack/cxf/trunk/modules: server/src/main/java/org/jboss/wsf/stack/cxf/saaj and 9 other directories.
by jbossws-commits@lists.jboss.org
Author: sergeyb
Date: 2010-09-28 12:38:50 -0400 (Tue, 28 Sep 2010)
New Revision: 13035
Added:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionFactoryImpl.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/javax.xml.soap.SOAPConnectionFactory
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/InputStreamDataSource.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/ServiceIface.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/ServiceImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/wsdl/SaajService.wsdl
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
[JBWS-3084] Enabling control of chunked encoding when using SOAPConnection
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionFactoryImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionFactoryImpl.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionFactoryImpl.java 2010-09-28 16:38:50 UTC (rev 13035)
@@ -0,0 +1,35 @@
+/*
+ * 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.wsf.stack.cxf.saaj;
+
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPException;
+
+public class SOAPConnectionFactoryImpl extends SOAPConnectionFactory {
+
+ @Override
+ public SOAPConnection createConnection() throws SOAPException {
+ return new SOAPConnectionImpl();
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java 2010-09-28 16:38:50 UTC (rev 13035)
@@ -0,0 +1,192 @@
+/*
+ * 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.wsf.stack.cxf.saaj;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.MimeHeader;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.helpers.LoadingByteArrayOutputStream;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.transport.Conduit;
+import org.apache.cxf.transport.ConduitInitiator;
+import org.apache.cxf.transport.ConduitInitiatorManager;
+import org.apache.cxf.transport.MessageObserver;
+import org.apache.cxf.transport.http.HTTPConduit;
+
+public class SOAPConnectionImpl extends SOAPConnection {
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public SOAPMessage call(SOAPMessage msgOut, Object addressObject) throws SOAPException {
+
+ String address = getAddress(addressObject);
+ ConduitInitiator ci = getConduitInitiator(address);
+
+
+ // create a new Message and Exchange
+ EndpointInfo info = new EndpointInfo();
+ info.setAddress(address);
+ Message outMessage = new MessageImpl();
+ Exchange exch = new ExchangeImpl();
+ outMessage.setExchange(exch);
+
+ // sent SOAPMessage
+ try {
+ final Conduit c = ci.getConduit(info);
+
+
+ Map<String, List<String>> outHeaders = new HashMap<String, List<String>>();
+ for (Iterator it = msgOut.getMimeHeaders().getAllHeaders(); it.hasNext();) {
+ MimeHeader mimeHeader = (MimeHeader)it.next();
+ if ("Content-Type".equals(mimeHeader.getName())) {
+ outMessage.put(Message.CONTENT_TYPE, mimeHeader.getValue());
+ }
+
+ // disable the chunked encoding if requested
+ if ("Transfer-Encoding".equals(mimeHeader.getName())
+ && "disabled".equals(mimeHeader.getValue())
+ && c instanceof HTTPConduit) {
+ ((HTTPConduit)c).getClient().setAllowChunking(false);
+ continue;
+ }
+
+ List<String> values = outHeaders.get(mimeHeader.getName());
+ if (values == null) {
+ values = new ArrayList<String>();
+ outHeaders.put(mimeHeader.getName(), values);
+ }
+ values.add(mimeHeader.getValue());
+ }
+ outMessage.put(Message.HTTP_REQUEST_METHOD, "POST");
+ outMessage.put(Message.PROTOCOL_HEADERS, outHeaders);
+ c.prepare(outMessage);
+
+ OutputStream outs = outMessage.getContent(OutputStream.class);
+ msgOut.writeTo(outs);
+
+ c.setMessageObserver(new MessageObserver() {
+ public void onMessage(Message inMessage) {
+ LoadingByteArrayOutputStream bout = new LoadingByteArrayOutputStream();
+ try {
+ IOUtils.copy(inMessage.getContent(InputStream.class), bout);
+ inMessage.getExchange().put(InputStream.class, bout.createInputStream());
+
+ Map<String, List<String>> inHeaders =
+ (Map<String, List<String>>)inMessage.get(Message.PROTOCOL_HEADERS);
+
+ inMessage.getExchange().put(Message.PROTOCOL_HEADERS, inHeaders);
+ c.close(inMessage);
+ } catch (IOException e) {
+ //ignore
+ }
+ }
+ });
+
+ c.close(outMessage);
+ } catch (Exception ex) {
+ throw new SOAPException("SOAPMessage can not be sent", ex);
+ }
+
+ // read SOAPMessage
+ try {
+ InputStream ins = exch.get(InputStream.class);
+ Map<String, List<String>> inHeaders =
+ (Map<String, List<String>>)exch.get(Message.PROTOCOL_HEADERS);
+
+ MimeHeaders mimeHeaders = new MimeHeaders();
+ if (inHeaders != null) {
+ for (Map.Entry<String, List<String>> entry : inHeaders.entrySet()) {
+ if (entry.getValue() != null) {
+ for (String value : entry.getValue()) {
+ mimeHeaders.addHeader(entry.getKey(), value);
+ }
+ }
+ }
+ }
+
+ MessageFactory msgFac = MessageFactory.newInstance();
+ return msgFac.createMessage(mimeHeaders, ins);
+ } catch (Exception ex) {
+ throw new SOAPException("SOAPMessage can not be read", ex);
+ }
+
+
+ }
+
+ @Override
+ public void close() throws SOAPException {
+ // complete
+ }
+
+ private String getAddress(Object addressObject) throws SOAPException {
+ if (addressObject instanceof URL || addressObject instanceof String) {
+ return addressObject.toString();
+ }
+ throw new SOAPException("Address object of type " + addressObject.getClass().getName()
+ + " is not supported");
+ }
+
+ private ConduitInitiator getConduitInitiator(String address) throws SOAPException {
+
+ ConduitInitiator ci = null;
+ try {
+ Bus bus = BusFactory.getThreadDefaultBus(true);
+ ConduitInitiatorManager mgr = bus.getExtension(ConduitInitiatorManager.class);
+
+ if (address.startsWith("http")) {
+ ci = mgr.getConduitInitiator("http://cxf.apache.org/transports/http");
+ }
+ if (ci == null) {
+ ci = mgr.getConduitInitiatorForUri(address);
+ }
+
+ } catch (Exception ex) {
+ throw new SOAPException("No ConduitInitiator is available for " + address, ex);
+ }
+
+ if (ci == null) {
+ throw new SOAPException("No ConduitInitiator is available for " + address);
+ }
+ return ci;
+ }
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/javax.xml.soap.SOAPConnectionFactory
===================================================================
--- stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/javax.xml.soap.SOAPConnectionFactory (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/javax.xml.soap.SOAPConnectionFactory 2010-09-28 16:38:50 UTC (rev 13035)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.cxf.saaj.SOAPConnectionFactoryImpl
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2010-09-28 14:51:13 UTC (rev 13034)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2010-09-28 16:38:50 UTC (rev 13035)
@@ -121,9 +121,25 @@
dir="${tests.output.dir}/test-resources/jaxws/samples/wsrm/WEB-INF/wsdl"
prefix="WEB-INF/wsdl"/>
</war>
-
+
+ <!-- saaj-soap-connection -->
+ <war
+ warfile="${tests.output.dir}/test-libs/saaj-soap-connection.war"
+ webxml="${tests.output.dir}/test-resources/saaj/cxf/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/saaj/ServiceImpl.class"/>
+ <include name="org/jboss/test/ws/saaj/ServiceIface.class"/>
+ <include name="org/jboss/test/ws/saaj/InputStreamDataSource.class"/>
+ </classes>
+ <zipfileset
+ dir="${tests.output.dir}/test-resources/saaj/cxf/WEB-INF/wsdl"
+ prefix="WEB-INF/wsdl"/>
+ </war>
+
+
<!-- Please add alphabetically -->
+
</target>
</project>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/InputStreamDataSource.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/InputStreamDataSource.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/InputStreamDataSource.java 2010-09-28 16:38:50 UTC (rev 13035)
@@ -0,0 +1,44 @@
+package org.jboss.test.ws.saaj;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import javax.activation.DataSource;
+
+public class InputStreamDataSource implements DataSource
+{
+
+ private InputStream is;
+ private String contentType;
+ private String name;
+
+ public InputStreamDataSource(InputStream is, String contentType, String name)
+ {
+ this.is = is;
+ this.contentType = contentType;
+ this.name = name;
+ }
+ @Override
+ public String getContentType()
+ {
+ return contentType;
+ }
+
+ @Override
+ public InputStream getInputStream() throws IOException
+ {
+ return is;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public OutputStream getOutputStream() throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/InputStreamDataSource.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java 2010-09-28 16:38:50 UTC (rev 13035)
@@ -0,0 +1,120 @@
+/*
+ * 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.saaj;
+
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPMessage;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 11-Jun-2010
+ */
+public class SOAPConnectionTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() + ":8081/saaj-soap-connection/SaajService";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(SOAPConnectionTestCase.class, "saaj-soap-connection.war");
+ }
+
+ public void testSoapConnectionWithoutChunkedEncoding() throws Exception
+ {
+ doTestSoapConnection(true);
+ }
+
+ public void testSoapConnectionWithChunkedEncoding() throws Exception
+ {
+ doTestSoapConnection(false);
+ }
+
+ private void doTestSoapConnection(boolean disableChunking) throws Exception
+ {
+ SOAPFactory soapFac = SOAPFactory.newInstance();
+ MessageFactory msgFac = MessageFactory.newInstance();
+ SOAPConnectionFactory conFac = SOAPConnectionFactory.newInstance();
+ SOAPMessage msg = msgFac.createMessage();
+
+ if (disableChunking)
+ {
+ // this is the custom header checked by ServiceImpl
+ msg.getMimeHeaders().addHeader("Transfer-Encoding-Disabled", "true");
+ // this is a hint to SOAPConnection that the chunked encoding is not needed
+ msg.getMimeHeaders().addHeader("Transfer-Encoding", "disabled");
+ }
+
+ QName sayHi = new QName("http://www.jboss.org/jbossws/saaj", "sayHello");
+ msg.getSOAPBody().addChildElement(soapFac.createElement(sayHi));
+ AttachmentPart ap1 = msg.createAttachmentPart();
+
+ char[] content = new char[16 * 1024];
+ Arrays.fill(content, 'A');
+
+ ap1.setContent(new String(content), "text/plain");
+ msg.addAttachmentPart(ap1);
+
+ AttachmentPart ap2 = msg.createAttachmentPart();
+ ap2.setContent("Attachment content - Part 2", "text/plain");
+ msg.addAttachmentPart(ap2);
+ msg.saveChanges();
+
+ SOAPConnection con = conFac.createConnection();
+ URL endpoint = new URL(serviceURL);
+ SOAPMessage response = con.call(msg, endpoint);
+ QName sayHiResp = new QName("http://www.jboss.org/jbossws/saaj", "sayHelloResponse");
+
+ Iterator<?> sayHiRespIterator = response.getSOAPBody().getChildElements(sayHiResp);
+ SOAPElement soapElement = (SOAPElement)sayHiRespIterator.next();
+ assertNotNull(soapElement);
+
+ assertEquals(2, response.countAttachments());
+
+ String[] values = response.getMimeHeaders().getHeader("Transfer-Encoding-Disabled");
+ if (disableChunking)
+ {
+ // this means that the ServiceImpl executed the code branch verifying
+ // that chunking was disabled
+ assertNotNull(values);
+ assertTrue(values.length == 1);
+ }
+ else
+ {
+ assertNull(values);
+ }
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/ServiceIface.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/ServiceIface.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/ServiceIface.java 2010-09-28 16:38:50 UTC (rev 13035)
@@ -0,0 +1,35 @@
+/*
+ * 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.test.ws.saaj;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService
+(
+ targetNamespace = "http://www.jboss.org/jbossws/saaj"
+)
+public interface ServiceIface
+{
+ @WebMethod
+ String sayHello();
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/ServiceIface.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/ServiceImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/ServiceImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/ServiceImpl.java 2010-09-28 16:38:50 UTC (rev 13035)
@@ -0,0 +1,116 @@
+/*
+ * 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.test.ws.saaj;
+
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.activation.DataHandler;
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.helpers.LoadingByteArrayOutputStream;
+
+@WebService
+(
+ portName = "SaajServicePort",
+ serviceName = "SaajService",
+ wsdlLocation = "WEB-INF/wsdl/SaajService.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/saaj",
+ endpointInterface = "org.jboss.test.ws.saaj.ServiceIface"
+)
+public class ServiceImpl implements ServiceIface
+{
+ @Resource
+ private WebServiceContext context;
+
+ public String sayHello()
+ {
+ Map<String, List<String>> reqHeaders = CastUtils.cast(
+ (Map<?, ?>)context.getMessageContext().get(MessageContext.HTTP_REQUEST_HEADERS));
+
+ boolean chunkedEncodingDisabled = reqHeaders.get("transfer-encoding-disabled") != null;
+
+ List<String> transferEncHeader = reqHeaders.get("transfer-encoding");
+
+ if (!chunkedEncodingDisabled)
+ {
+ if (transferEncHeader == null || transferEncHeader.size() != 1)
+ {
+ throw new RuntimeException("Transfer-Encoding is missing");
+ }
+ if (!"chunked".equals(transferEncHeader.get(0)))
+ {
+ throw new RuntimeException("Wrong Transfer-Encoding value");
+ }
+ }
+ else
+ {
+ if (transferEncHeader != null)
+ {
+ throw new RuntimeException("Unexpected Transfer-Encoding header");
+ }
+ Map<String, List<String>> respHeaders = CastUtils.cast(
+ (Map<?, ?>)context.getMessageContext().get(MessageContext.HTTP_RESPONSE_HEADERS));
+ if (respHeaders == null) {
+ respHeaders = new HashMap<String, List<String>>();
+ context.getMessageContext().put(MessageContext.HTTP_RESPONSE_HEADERS, respHeaders);
+ }
+ respHeaders.put("Transfer-Encoding-Disabled", Arrays.asList("true"));
+ }
+
+ Map<String, DataHandler> dataHandlers = CastUtils.cast(
+ (Map<?, ?>)context.getMessageContext().get(MessageContext.INBOUND_MESSAGE_ATTACHMENTS));
+
+ Map<String, DataHandler> outDataHandlers = CastUtils.cast(
+ (Map<?, ?>)context.getMessageContext().get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS));
+
+ int index = 0;
+ try
+ {
+ for (Map.Entry<String, DataHandler> entry : dataHandlers.entrySet())
+ {
+ InputStream is = entry.getValue().getInputStream();
+ LoadingByteArrayOutputStream bous = new LoadingByteArrayOutputStream();
+ IOUtils.copy(is, bous);
+ String name = Integer.toString(index++);
+ DataHandler handler = new DataHandler(
+ new InputStreamDataSource(bous.createInputStream(), "text/plain", name));
+ outDataHandlers.put(name, handler);
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException(ex);
+ }
+
+ return "Hello World!";
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/ServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/web.xml 2010-09-28 16:38:50 UTC (rev 13035)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
+ version="2.5" 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_2_5.xsd">
+ <servlet>
+ <servlet-name>SaajService</servlet-name>
+ <servlet-class>org.jboss.test.ws.saaj.ServiceImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SaajService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/wsdl/SaajService.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/wsdl/SaajService.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/wsdl/SaajService.wsdl 2010-09-28 16:38:50 UTC (rev 13035)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="SaajService" targetNamespace="http://www.jboss.org/jbossws/saaj" xmlns:tns="http://www.jboss.org/jbossws/saaj" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.jboss.org/jbossws/saaj" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://www.jboss.org/jbossws/saaj">
+<xsd:element name="sayHello" type="tns:sayHello"/>
+<xsd:complexType name="sayHello">
+<xsd:sequence/>
+</xsd:complexType>
+<xsd:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
+<xsd:complexType name="sayHelloResponse">
+<xsd:sequence>
+<xsd:element minOccurs="0" name="return" type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="sayHelloResponse">
+ <wsdl:part name="parameters" element="tns:sayHelloResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="sayHello">
+ <wsdl:part name="parameters" element="tns:sayHello">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="ServiceIface">
+ <wsdl:operation name="sayHello">
+ <wsdl:input name="sayHello" message="tns:sayHello">
+ </wsdl:input>
+ <wsdl:output name="sayHelloResponse" message="tns:sayHelloResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SaajServiceSoapBinding" type="tns:ServiceIface">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="sayHello">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="sayHelloResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SaajService">
+ <wsdl:port name="SaajServicePort" binding="tns:SaajServiceSoapBinding">
+ <soap:address location="http://localhost:8080/SaajService"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/saaj/cxf/WEB-INF/wsdl/SaajService.wsdl
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
14 years, 3 months
JBossWS SVN: r13034 - in framework/trunk/hudson/hudson-home/jobs: SWITCH-BINDIST-AS-5.1.0 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-28 10:51:13 -0400 (Tue, 28 Sep 2010)
New Revision: 13034
Modified:
framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml
framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml
Log:
Excluding netty.jar from SWITCH-BINDIST hudson job comparisons on AS 5.x
Modified: framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml 2010-09-28 13:58:59 UTC (rev 13033)
+++ framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml 2010-09-28 14:51:13 UTC (rev 13034)
@@ -55,7 +55,8 @@
STACK_ID=cxf
setupEnv
redeployBinaryDistribution
-diff -r $CXF_AS_HOME $JBOSS_HOME > $WORKSPACE/cxf_vs_cxfOverNative.diff
+# excluding netty.jar from comparison as that was not included in AS 5.x, but JBossWS-Native 3.2.x or greater required (and added) it
+diff -r $CXF_AS_HOME $JBOSS_HOME -x netty.jar > $WORKSPACE/cxf_vs_cxfOverNative.diff
rm -rf $JBOSS_HOME
Modified: framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml 2010-09-28 13:58:59 UTC (rev 13033)
+++ framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml 2010-09-28 14:51:13 UTC (rev 13034)
@@ -55,7 +55,8 @@
STACK_ID=cxf
setupEnv
redeployBinaryDistribution
-diff -r $CXF_AS_HOME $JBOSS_HOME > $WORKSPACE/cxf_vs_cxfOverNative.diff
+# excluding netty.jar from comparison as that was not included in AS 5.x, but JBossWS-Native 3.2.x or greater required (and added) it
+diff -r $CXF_AS_HOME $JBOSS_HOME -x netty.jar > $WORKSPACE/cxf_vs_cxfOverNative.diff
rm -rf $JBOSS_HOME
14 years, 3 months
JBossWS SVN: r13033 - in framework/trunk/hudson/hudson-home/jobs: SWITCH-BINDIST-AS-5.1.0 and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-28 09:58:59 -0400 (Tue, 28 Sep 2010)
New Revision: 13033
Modified:
framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml
framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml
framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.0/config.xml
framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.1/config.xml
Log:
Removing leftover of checks for metro stack
Modified: framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml 2010-09-27 17:01:51 UTC (rev 13032)
+++ framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml 2010-09-28 13:58:59 UTC (rev 13033)
@@ -50,13 +50,6 @@
#------------------------------------- CXF stack checks -------------------------------------
-cp -r $METRO_AS_HOME $JBOSS_HOME
-STACK_DIR=$CXF_BIN_DIST_DIR
-STACK_ID=cxf
-setupEnv
-redeployBinaryDistribution
-diff -r $CXF_AS_HOME $JBOSS_HOME > $WORKSPACE/cxf_vs_cxfOverMetro.diff
-rm -rf $JBOSS_HOME
cp -r $NATIVE_AS_HOME $JBOSS_HOME
STACK_DIR=$CXF_BIN_DIST_DIR
STACK_ID=cxf
@@ -68,13 +61,6 @@
#------------------------------------- NATIVE stack checks -------------------------------------
-cp -r $METRO_AS_HOME $JBOSS_HOME
-STACK_DIR=$NATIVE_BIN_DIST_DIR
-STACK_ID=native
-setupEnv
-redeployBinaryDistribution
-diff -r $NATIVE_AS_HOME $JBOSS_HOME > $WORKSPACE/native_vs_nativeOverMetro.diff
-rm -rf $JBOSS_HOME
cp -r $CXF_AS_HOME $JBOSS_HOME
STACK_DIR=$NATIVE_BIN_DIST_DIR
STACK_ID=native
Modified: framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml 2010-09-27 17:01:51 UTC (rev 13032)
+++ framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml 2010-09-28 13:58:59 UTC (rev 13033)
@@ -50,13 +50,6 @@
#------------------------------------- CXF stack checks -------------------------------------
-cp -r $METRO_AS_HOME $JBOSS_HOME
-STACK_DIR=$CXF_BIN_DIST_DIR
-STACK_ID=cxf
-setupEnv
-redeployBinaryDistribution
-diff -r $CXF_AS_HOME $JBOSS_HOME > $WORKSPACE/cxf_vs_cxfOverMetro.diff
-rm -rf $JBOSS_HOME
cp -r $NATIVE_AS_HOME $JBOSS_HOME
STACK_DIR=$CXF_BIN_DIST_DIR
STACK_ID=cxf
@@ -68,13 +61,6 @@
#------------------------------------- NATIVE stack checks -------------------------------------
-cp -r $METRO_AS_HOME $JBOSS_HOME
-STACK_DIR=$NATIVE_BIN_DIST_DIR
-STACK_ID=native
-setupEnv
-redeployBinaryDistribution
-diff -r $NATIVE_AS_HOME $JBOSS_HOME > $WORKSPACE/native_vs_nativeOverMetro.diff
-rm -rf $JBOSS_HOME
cp -r $CXF_AS_HOME $JBOSS_HOME
STACK_DIR=$NATIVE_BIN_DIST_DIR
STACK_ID=native
Modified: framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.0/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.0/config.xml 2010-09-27 17:01:51 UTC (rev 13032)
+++ framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.0/config.xml 2010-09-28 13:58:59 UTC (rev 13033)
@@ -50,13 +50,6 @@
#------------------------------------- CXF stack checks -------------------------------------
-cp -r $METRO_AS_HOME $JBOSS_HOME
-STACK_DIR=$CXF_BIN_DIST_DIR
-STACK_ID=cxf
-setupEnv
-redeployBinaryDistribution
-diff -r $CXF_AS_HOME $JBOSS_HOME > $WORKSPACE/cxf_vs_cxfOverMetro.diff
-rm -rf $JBOSS_HOME
cp -r $NATIVE_AS_HOME $JBOSS_HOME
STACK_DIR=$CXF_BIN_DIST_DIR
STACK_ID=cxf
@@ -68,13 +61,6 @@
#------------------------------------- NATIVE stack checks -------------------------------------
-cp -r $METRO_AS_HOME $JBOSS_HOME
-STACK_DIR=$NATIVE_BIN_DIST_DIR
-STACK_ID=native
-setupEnv
-redeployBinaryDistribution
-diff -r $NATIVE_AS_HOME $JBOSS_HOME > $WORKSPACE/native_vs_nativeOverMetro.diff
-rm -rf $JBOSS_HOME
cp -r $CXF_AS_HOME $JBOSS_HOME
STACK_DIR=$NATIVE_BIN_DIST_DIR
STACK_ID=native
Modified: framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.1/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.1/config.xml 2010-09-27 17:01:51 UTC (rev 13032)
+++ framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.1/config.xml 2010-09-28 13:58:59 UTC (rev 13033)
@@ -50,13 +50,6 @@
#------------------------------------- CXF stack checks -------------------------------------
-cp -r $METRO_AS_HOME $JBOSS_HOME
-STACK_DIR=$CXF_BIN_DIST_DIR
-STACK_ID=cxf
-setupEnv
-redeployBinaryDistribution
-diff -r $CXF_AS_HOME $JBOSS_HOME > $WORKSPACE/cxf_vs_cxfOverMetro.diff
-rm -rf $JBOSS_HOME
cp -r $NATIVE_AS_HOME $JBOSS_HOME
STACK_DIR=$CXF_BIN_DIST_DIR
STACK_ID=cxf
@@ -68,13 +61,6 @@
#------------------------------------- NATIVE stack checks -------------------------------------
-cp -r $METRO_AS_HOME $JBOSS_HOME
-STACK_DIR=$NATIVE_BIN_DIST_DIR
-STACK_ID=native
-setupEnv
-redeployBinaryDistribution
-diff -r $NATIVE_AS_HOME $JBOSS_HOME > $WORKSPACE/native_vs_nativeOverMetro.diff
-rm -rf $JBOSS_HOME
cp -r $CXF_AS_HOME $JBOSS_HOME
STACK_DIR=$NATIVE_BIN_DIST_DIR
STACK_ID=native
14 years, 3 months
JBossWS SVN: r13032 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-27 13:01:51 -0400 (Mon, 27 Sep 2010)
New Revision: 13032
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java
Log:
[JBWS-3088] Prevent index out of bound exception when looking for relatesTo's type
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java 2010-09-27 14:11:04 UTC (rev 13031)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java 2010-09-27 17:01:51 UTC (rev 13032)
@@ -110,10 +110,19 @@
if (relatesTo != null)
{
String type = relatesTo.getRelationshipType();
+ QName relatesToType;
int index = type.indexOf("}");
- String ns = type.substring(1, index + 1);
- String name = type.substring(index + 1);
- return builder.newRelatesTo(relatesTo.getValue(), new QName(ns, name));
+ if (index == -1)
+ {
+ relatesToType = new QName(type);
+ }
+ else
+ {
+ String ns = type.substring(1, index + 1);
+ String name = type.substring(index + 1);
+ relatesToType = new QName(ns, name);
+ }
+ return builder.newRelatesTo(relatesTo.getValue(), relatesToType);
}
else
{
14 years, 3 months
JBossWS SVN: r13031 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-27 10:11:04 -0400 (Mon, 27 Sep 2010)
New Revision: 13031
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java
Log:
[JBWS-2987] Reverting addition on spring bus holder which is causing regressions in cxf tests
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java 2010-09-27 11:51:10 UTC (rev 13030)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java 2010-09-27 14:11:04 UTC (rev 13031)
@@ -176,7 +176,6 @@
{
gac.destroy();
}
- ctx.destroy();
super.close();
}
14 years, 3 months