com.atomikos.icatch.jaxb.wsc.v200410
Class Utils

java.lang.Object
  extended by com.atomikos.icatch.jaxb.wsc.v200410.Utils

public final class Utils
extends Object

Copyright © 2005, Atomikos. All rights reserved. Utilities for the WS-C and WS-T protocols. This class is in a separate package because it should work for both WS-AT and WS-BA.


Field Summary
static String CONTEXT_HEADER_NAME
           
static String TYPE_ELEMENT_NAME
           
static String WSAT_DURABLE_2PC_PROTOCOL_URI_08_2005
           
static String WSAT_TYPE_URI
           
static String WSC_BASE_ACTION_URI
           
static String WSC_NAMESPACE_URI
           
 
Method Summary
static Propagation extractPropagationFromHeader(javax.xml.soap.SOAPHeaderElement header, String type, Transport transport, long defaultTimeout)
          Extracts a propagation from the header
static OutgoingAddressingHeaders extractRegistrationServiceAddress(javax.xml.soap.SOAPHeaderElement header)
          Extracts a registration service address from a soap header element.
static javax.xml.soap.SOAPHeaderElement findPropagationHeader(javax.xml.soap.SOAPMessage msg, String type)
          Finds a propagation header of the given WSC type.
static void insertPropagationHeader(javax.xml.soap.SOAPMessage msg, String root, String tid, long timeout, String regServiceAddress, String type)
          Inserts a propagation of the given type into the message.
static void registerAsParticipant(OutgoingAddressingHeaders registrationAddress, String registrationRequesterAddress, String localParticipantURI, Transport t, long timeout)
          Registers as a subordinate with the remote coordination service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_ELEMENT_NAME

public static final String TYPE_ELEMENT_NAME
See Also:
Constant Field Values

CONTEXT_HEADER_NAME

public static final String CONTEXT_HEADER_NAME
See Also:
Constant Field Values

WSC_NAMESPACE_URI

public static final String WSC_NAMESPACE_URI
See Also:
Constant Field Values

WSC_BASE_ACTION_URI

public static final String WSC_BASE_ACTION_URI
See Also:
Constant Field Values

WSAT_TYPE_URI

public static final String WSAT_TYPE_URI
See Also:
Constant Field Values

WSAT_DURABLE_2PC_PROTOCOL_URI_08_2005

public static final String WSAT_DURABLE_2PC_PROTOCOL_URI_08_2005
See Also:
Constant Field Values
Method Detail

extractPropagationFromHeader

public static Propagation extractPropagationFromHeader(javax.xml.soap.SOAPHeaderElement header,
                                                       String type,
                                                       Transport transport,
                                                       long defaultTimeout)
                                                throws javax.xml.soap.SOAPException
Extracts a propagation from the header

Parameters:
header -
type - The target coordination type
transport - The transport to use
defaultTimeout - The timeout if none in header
Returns:
The propagation, or null if not found
Throws:
javax.xml.soap.SOAPException

extractRegistrationServiceAddress

public static OutgoingAddressingHeaders extractRegistrationServiceAddress(javax.xml.soap.SOAPHeaderElement header)
                                                                   throws javax.xml.soap.SOAPException
Extracts a registration service address from a soap header element.

Parameters:
header - The header
Returns:
The address information, or null if not found.
Throws:
javax.xml.soap.SOAPException

registerAsParticipant

public static void registerAsParticipant(OutgoingAddressingHeaders registrationAddress,
                                         String registrationRequesterAddress,
                                         String localParticipantURI,
                                         Transport t,
                                         long timeout)
                                  throws MalformedURLException,
                                         RemoteException,
                                         javax.xml.soap.SOAPException
Registers as a subordinate with the remote coordination service.

Parameters:
registrationAddress - The address where to register
registrationRequesterAddress - The address where the response should go to
localParticipantURI - The (GLOBALLY UNIQUE) URI of the participant to register
t - The transport to use (protocol specific)
timeout - The timeout in millis to wait for registration acknowledgement.
Throws:
MalformedURLException
RemoteException
javax.xml.soap.SOAPException

insertPropagationHeader

public static void insertPropagationHeader(javax.xml.soap.SOAPMessage msg,
                                           String root,
                                           String tid,
                                           long timeout,
                                           String regServiceAddress,
                                           String type)
                                    throws javax.xml.soap.SOAPException
Inserts a propagation of the given type into the message.

Parameters:
msg -
root -
tid -
timeout -
regServiceAddress -
type -
Throws:
javax.xml.soap.SOAPException

findPropagationHeader

public static javax.xml.soap.SOAPHeaderElement findPropagationHeader(javax.xml.soap.SOAPMessage msg,
                                                                     String type)
                                                              throws javax.xml.soap.SOAPException
Finds a propagation header of the given WSC type.

Parameters:
msg - The message
type - The coordination type
Returns:
The header, or null if not found
Throws:
javax.xml.soap.SOAPException


Copyright © 2012. All Rights Reserved.