Skip navigation links

Java API Reference for Oracle Infrastructure Web Services
11
Release 1 (11.1.1)

E10654-04


oracle.webservices.addressing
Class AddressingHelper

java.lang.Object
  extended by oracle.webservices.addressing.AddressingHelper


public class AddressingHelper
extends Object

A helper class for dealing with ws addressing headers. This helper class supports setting/getting addressing headers for both client/service.


Constructor Summary
AddressingHelper()
           

 

Method Summary
static void clearAllOutgoingAddressingProperties(Map<String,Object> context)
          clear out all the previous addressing settings on the outgoing context.
static String generateNewMessageId()
          Generate a new UUID to be used as a message id
static AddressingInfo getAddressingInfo(WebServiceContext wsCxt)
          create an AddressingInfo Object using the addressing properties that is based on the incoming message In other words, ReplyTO will become to, MsgId will be set in the RelatesTo etc null if no addressing properties are found.
static String getIncomingAction(Map<String,Object> context)
          Resturns the message id set in the incoming request/reply in a call back or polling case, this method should only be called when the response becomes available
static String getIncomingAction(MessageContext context)
          Resturns the message id set in the incoming request/reply in a call back or polling case, this method should only be called when the response becomes available
static String getIncomingAddressingNamespace(Map<String,Object> context)
          returns the addressing namespace used in the incoming soap message header
static String getIncomingFaultToAddress(Map<String,Object> context)
          get the fault to value from the incoming request
static String getIncomingFaultToAddress(MessageContext context)
          get the fault to value from the incoming request
static String getIncomingMessageId(Map<String,Object> context)
          Resturns the message id set in the incoming reply in a call back or polling case, this method should only be called when the response becomes available
static String getIncomingMessageId(MessageContext context)
          Resturns the message id set in the incoming reply in a call back or polling case, this method should only be called when the response becomes available
static String[] getIncomingRelatesToMessageId(Map<String,Object> context)
          Get the relates to message id set from the incoming reply
static String[] getIncomingRelatesToMessageId(MessageContext context)
          Get the relates to message id set from the incoming reply
static String getIncomingReplyToAddress(Map<String,Object> context)
          get the reply to value from the incoming request
static String getIncomingReplyToAddress(MessageContext context)
          get the reply to value from the incoming request
static String getIncomingToAddress(Map<String,Object> context)
          get the to value from the incoming request
static String getOutgoingAction(Map<String,Object> context)
          Returns the action value of the outgoing message.
static String getOutgoingAddressingNamespace(Map<String,Object> context)
          returns the addressing namespace used for the outoing message.
static String getOutgoingMessageId(Map<String,Object> context)
          Returns the message id of the outgoing message.
static String getOutgoingReplyToAddress(Map<String,Object> context)
          get the replyToAddress that has been set for an async operation.
static oracle.j2ee.ws.common.addressing.api.EndpointReference getReplyTo(Map<String,Object> context)
           
static oracle.j2ee.ws.common.addressing.api.ReferenceParameters getReplyToReferenceParameters(Map<String,Object> context)
           
static AddressingInfo newAddressingInfoFromString(String s)
          create an instance of addressing info from a string
static void setOutgoingAction(Map<String,Object> context, String action)
          set the action field of the outgoing addressing properties
static void setOutgoingAddressingNamespace(Map<String,Object> context, String version)
          Set the outgoing addressing targetnamespace.
static void setOutgoingFaultToAddress(Map<String,Object> context, String faultToAddress)
          Allows the client to programmatically set the FaultTo address for a fault
static void setOutgoingFaultToEndpointReference(Map<String,Object> context, W3CEndpointReference epr)
          Allows the client to programmatically set the faultTo EndpointReference containing any ReferenceParameters
static String setOutgoingMessageId(Map<String,Object> context)
          sets a new message id of the outgoing message by generating a new UUID
static void setOutgoingMessageId(Map<String,Object> context, String msgID)
          sets the message id of the outgoing message
static void setOutgoingRelatesToMessageId(Map<String,Object> context, String relatesToId)
          Sets the relatesTo message id in the outgoing request.
static void setOutgoingReplyToAddress(Map<String,Object> context, String replyToAddress)
          Allows the client to programmatically set the ReplyTo address for an async operation.
static void setOutgoingReplyToEndpointReference(Map<String,Object> context, W3CEndpointReference epr)
          Allows the client to programmatically set the replyTo EndpointReference containing any ReferenceParameters
static void setOutgoingToAddress(Map<String,Object> context, String toAddress)
          Allows the client to programmatically set the To Address for an async operation.
static void useDefaultReplyTo(Map<String,Object> context)
          Allows the client to specify that the next invocation should send the default replyto in the message so the callback will go back to the current server.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

AddressingHelper

public AddressingHelper()

Method Detail

newAddressingInfoFromString

public static AddressingInfo newAddressingInfoFromString(String s)
create an instance of addressing info from a string
Parameters:
s - must be the result of an instance of AddressingInfo.toString()
Returns:
An instance of AddressingInfo populated with the information found in the passed string. or null if the string is not recognizable.

generateNewMessageId

public static String generateNewMessageId()
Generate a new UUID to be used as a message id
Returns:
a new message id in string format

getOutgoingMessageId

public static String getOutgoingMessageId(Map<String,Object> context)
Returns the message id of the outgoing message. This method should only be called after invoking an operation that sends a message or returs the response from the server side
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
The message id of the outgoing message.

getOutgoingAction

public static String getOutgoingAction(Map<String,Object> context)
Returns the action value of the outgoing message. This method should only be called after invoking an operation that sends a message or after returing the response from the server side
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
the action header of the outgoing message.

getOutgoingReplyToAddress

public static String getOutgoingReplyToAddress(Map<String,Object> context)
get the replyToAddress that has been set for an async operation.
Parameters:
context - a requestContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
replyToAddress that was set earlier

getOutgoingAddressingNamespace

public static String getOutgoingAddressingNamespace(Map<String,Object> context)
returns the addressing namespace used for the outoing message. This method should only be called after invoking an operation that sends a message or after returing the response from the server side
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
addressing namespace used

setOutgoingMessageId

public static void setOutgoingMessageId(Map<String,Object> context,
                                        String msgID)
sets the message id of the outgoing message
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
msgID -

setOutgoingMessageId

public static String setOutgoingMessageId(Map<String,Object> context)
sets a new message id of the outgoing message by generating a new UUID
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
the newly generated message id that is already set in the request message

setOutgoingAction

public static void setOutgoingAction(Map<String,Object> context,
                                     String action)
set the action field of the outgoing addressing properties
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
action -

setOutgoingReplyToAddress

public static void setOutgoingReplyToAddress(Map<String,Object> context,
                                             String replyToAddress)
Allows the client to programmatically set the ReplyTo address for an async operation.
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
replyToAddress - The value of the replyTo header to put in the outgoing message.

setOutgoingFaultToAddress

public static void setOutgoingFaultToAddress(Map<String,Object> context,
                                             String faultToAddress)
Allows the client to programmatically set the FaultTo address for a fault
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
faultToAddress - The value of the FaultTo header to put in the outgoing message.

setOutgoingToAddress

public static void setOutgoingToAddress(Map<String,Object> context,
                                        String toAddress)
Allows the client to programmatically set the To Address for an async operation.
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
toAddress - The value of the To header to put in the outgoing message.

useDefaultReplyTo

public static void useDefaultReplyTo(Map<String,Object> context)
Allows the client to specify that the next invocation should send the default replyto in the message so the callback will go back to the current server.
Parameters:
context - Messagecontext from WebServiceContext

setOutgoingRelatesToMessageId

public static void setOutgoingRelatesToMessageId(Map<String,Object> context,
                                                 String relatesToId)
Sets the relatesTo message id in the outgoing request. This will be typically done by the async service implementation before calling the client's callback.
Parameters:
context - MesssageContext from WebServiceContext
relatesToId -

setOutgoingAddressingNamespace

public static void setOutgoingAddressingNamespace(Map<String,Object> context,
                                                  String version)
Set the outgoing addressing targetnamespace. Note that only limitted support for 2003/03 and 2004/08 Addressing properties are not supported
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext

setOutgoingReplyToEndpointReference

public static void setOutgoingReplyToEndpointReference(Map<String,Object> context,
                                                       W3CEndpointReference epr)
                                                throws SOAPException
Allows the client to programmatically set the replyTo EndpointReference containing any ReferenceParameters
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
epr - an instance of W3CEndpiontReference
Throws:
SOAPException

setOutgoingFaultToEndpointReference

public static void setOutgoingFaultToEndpointReference(Map<String,Object> context,
                                                       W3CEndpointReference epr)
                                                throws SOAPException
Allows the client to programmatically set the faultTo EndpointReference containing any ReferenceParameters
Parameters:
context - requestContext from the bindingProvider or Messagecontext from WebServiceContext
epr - an instance of W3CEndpiontReference
Throws:
SOAPException

clearAllOutgoingAddressingProperties

public static void clearAllOutgoingAddressingProperties(Map<String,Object> context)
clear out all the previous addressing settings on the outgoing context.
Parameters:
context -

getIncomingMessageId

public static String getIncomingMessageId(Map<String,Object> context)
Resturns the message id set in the incoming reply in a call back or polling case, this method should only be called when the response becomes available
Parameters:
context - responseContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
Incoming message ID.

getIncomingAction

public static String getIncomingAction(Map<String,Object> context)
Resturns the message id set in the incoming request/reply in a call back or polling case, this method should only be called when the response becomes available
Parameters:
context - responseContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
Incoming message ID.

getIncomingAddressingNamespace

public static String getIncomingAddressingNamespace(Map<String,Object> context)
returns the addressing namespace used in the incoming soap message header
Parameters:
context - responseContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
Addressing namespace

getIncomingRelatesToMessageId

public static String[] getIncomingRelatesToMessageId(Map<String,Object> context)
Get the relates to message id set from the incoming reply
Parameters:
context - responseContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
An array of relatesTo message identifiers

getIncomingReplyToAddress

public static String getIncomingReplyToAddress(Map<String,Object> context)
get the reply to value from the incoming request
Parameters:
context - Messagecontext from WebServiceContext
Returns:
The incoming ReplyTo address

getIncomingToAddress

public static String getIncomingToAddress(Map<String,Object> context)
get the to value from the incoming request
Parameters:
context - Messagecontext from WebServiceContext
Returns:
The incoming ReplyTo address

getIncomingFaultToAddress

public static String getIncomingFaultToAddress(Map<String,Object> context)
get the fault to value from the incoming request
Parameters:
context - Messagecontext from WebServiceContext
Returns:
The incoming faultTo address

getAddressingInfo

public static AddressingInfo getAddressingInfo(WebServiceContext wsCxt)
create an AddressingInfo Object using the addressing properties that is based on the incoming message In other words, ReplyTO will become to, MsgId will be set in the RelatesTo etc null if no addressing properties are found.
Parameters:
wsCxt -
Returns:
An AddressingInfo instance.

getReplyTo

public static oracle.j2ee.ws.common.addressing.api.EndpointReference getReplyTo(Map<String,Object> context)

getReplyToReferenceParameters

public static oracle.j2ee.ws.common.addressing.api.ReferenceParameters getReplyToReferenceParameters(Map<String,Object> context)

getIncomingMessageId

public static String getIncomingMessageId(MessageContext context)
Resturns the message id set in the incoming reply in a call back or polling case, this method should only be called when the response becomes available
Parameters:
context - responseContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
Incoming message ID.

getIncomingAction

public static String getIncomingAction(MessageContext context)
Resturns the message id set in the incoming request/reply in a call back or polling case, this method should only be called when the response becomes available
Parameters:
context - responseContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
Incoming message ID.

getIncomingRelatesToMessageId

public static String[] getIncomingRelatesToMessageId(MessageContext context)
Get the relates to message id set from the incoming reply
Parameters:
context - responseContext from the bindingProvider or Messagecontext from WebServiceContext
Returns:
An array of relatesTo message identifiers

getIncomingReplyToAddress

public static String getIncomingReplyToAddress(MessageContext context)
get the reply to value from the incoming request
Parameters:
context - Messagecontext from WebServiceContext
Returns:
The incoming ReplyTo address

getIncomingFaultToAddress

public static String getIncomingFaultToAddress(MessageContext context)
get the fault to value from the incoming request
Parameters:
context - Messagecontext from WebServiceContext
Returns:
The incoming faultTo address

Skip navigation links

Java API Reference for Oracle Infrastructure Web Services
11
Release 1 (11.1.1)

E10654-04


Copyright © 2006, 2010, Oracle and/or its affiliates. All rights reserved..