Author: jim.ma
Date: 2010-02-27 06:54:43 -0500 (Sat, 27 Feb 2010)
New Revision: 11700
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java
Log:
[JBPAPP-3808]:Added the missing content in previous commit
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java 2010-02-27
11:37:19 UTC (rev 11699)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java 2010-02-27
11:54:43 UTC (rev 11700)
@@ -21,13 +21,43 @@
*/
package org.jboss.test.ws.jaxws.jbws2927;
+import java.net.URL;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.addressing.JAXWSAConstants;
+
+import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+import org.jboss.ws.extensions.addressing.soap.SOAPAddressingPropertiesImpl;
+
+import org.jboss.wsf.test.JBossWSTest;
+
/**
- * JBWS2927TestCase.
+ * A JBWS2927TestCase.
*
* @author <a href="ema(a)redhat.com">Jim Ma</a>
*/
-public class JBWS2927TestCase extends TestCase
+public class JBWS2927TestCase extends JBossWSTest
{
+ public void testHandleInboundMessage() throws Exception
+ {
+ WSAddressingClientHandler wsHandler = new WSAddressingClientHandler();
+ SOAPMessageContextJAXWS context = new SOAPMessageContextJAXWS();
+ context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, new Boolean(false));
+ context.put(BindingProvider.SOAPACTION_URI_PROPERTY, "inputAction");
+ context.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, new
SOAPAddressingPropertiesImpl());
+ context.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, new
SOAPAddressingPropertiesImpl());
+ MessageFactory factory = MessageFactory.newInstance();
+
+ URL reqMessage =
getResourceFile("jaxws/jbws2927/request-message.xml").toURL();
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPMessage soapMsg = msgFactory.createMessage(null, reqMessage.openStream());
+ context.setMessage(soapMsg);
+
+ wsHandler.handleMessage(context);
+ }
}
Show replies by date