[jbossws-commits] JBossWS SVN: r4719 - in stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing: jaxws and 1 other directory.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Wed Oct 10 06:14:17 EDT 2007
Author: thomas.diesler at jboss.com
Date: 2007-10-10 06:14:16 -0400 (Wed, 10 Oct 2007)
New Revision: 4719
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingClientHandler.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
Log:
[JBWS-1811] Cannot access CLIENT_ADDRESSING_PROPERTIES inside client
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingClientHandler.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingClientHandler.java 2007-10-10 09:33:19 UTC (rev 4718)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingClientHandler.java 2007-10-10 10:14:16 UTC (rev 4719)
@@ -35,12 +35,9 @@
import javax.xml.ws.addressing.soap.SOAPAddressingProperties;
import org.jboss.logging.Logger;
+import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
import org.jboss.ws.extensions.addressing.soap.SOAPAddressingPropertiesImpl;
-import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
-import java.util.Set;
-import java.util.HashSet;
-
/**
* A client side handler that reads/writes the addressing properties
* and puts then into the message context.
@@ -55,35 +52,38 @@
private static AddressingBuilder ADDR_BUILDER;
private static AddressingConstantsImpl ADDR_CONSTANTS;
- private static QName[] HEADERS = new QName[2];
+ private static QName[] HEADERS = new QName[2];
- static
+ static
{
ADDR_CONSTANTS = new AddressingConstantsImpl();
ADDR_BUILDER = AddressingBuilder.getAddressingBuilder();
- HEADERS[0] = ADDR_CONSTANTS.getActionQName();
- HEADERS[1] = ADDR_CONSTANTS.getToQName();
- }
-
- public QName[] getHeaders()
+ HEADERS[0] = ADDR_CONSTANTS.getActionQName();
+ HEADERS[1] = ADDR_CONSTANTS.getToQName();
+ }
+
+ public QName[] getHeaders()
{
return HEADERS;
}
public void init(HandlerInfo handlerInfo)
{
- super.init(handlerInfo);
+ super.init(handlerInfo);
}
public boolean handleRequest(MessageContext msgContext)
{
- if(log.isDebugEnabled()) log.debug("handleRequest");
+ log.debug("handleRequest");
- SOAPAddressingProperties addrProps = (SOAPAddressingProperties)msgContext.getProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
+ SOAPAddressingProperties addrProps = (SOAPAddressingProperties)msgContext.getProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES);
+ if (addrProps != null)
+ msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addrProps);
+ addrProps = (SOAPAddressingProperties)msgContext.getProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
if (addrProps != null)
- {
+ {
SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
addrProps.writeHeaders(soapMessage);
}
@@ -99,7 +99,7 @@
public boolean handleResponse(MessageContext msgContext)
{
- if(log.isDebugEnabled()) log.debug("handleResponse");
+ log.debug("handleResponse");
try
{
@@ -109,6 +109,7 @@
SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
SOAPAddressingProperties addrProps = (SOAPAddressingProperties)builder.newAddressingProperties();
addrProps.readHeaders(soapMessage);
+ msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProps);
msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, addrProps);
}
}
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2007-10-10 09:33:19 UTC (rev 4718)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2007-10-10 10:14:16 UTC (rev 4719)
@@ -74,9 +74,16 @@
protected boolean handleOutbound(MessageContext msgContext)
{
- if(log.isDebugEnabled()) log.debug("handleOutbound");
+ log.debug("handleOutbound");
- SOAPAddressingProperties addrProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
+ SOAPAddressingProperties addrProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES);
+ if (addrProps != null)
+ {
+ msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addrProps);
+ msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION);
+ }
+
+ addrProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
if (addrProps != null)
{
SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
@@ -95,7 +102,7 @@
protected boolean handleInbound(MessageContext msgContext)
{
- if(log.isDebugEnabled()) log.debug("handleInbound");
+ log.debug("handleInbound");
try
{
@@ -105,8 +112,10 @@
SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
SOAPAddressingProperties addrProps = (SOAPAddressingProperties)builder.newAddressingProperties();
addrProps.readHeaders(soapMessage);
- msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, addrProps);
- msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, Scope.APPLICATION);
+ msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProps);
+ msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, Scope.APPLICATION);
+ msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, addrProps);
+ msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, Scope.APPLICATION);
}
}
catch (SOAPException ex)
@@ -116,5 +125,4 @@
return true;
}
-
-}
+}
\ No newline at end of file
More information about the jbossws-commits
mailing list