public class

WorkdayCredentials

extends Object
implements SOAPHandler<T extends SOAPMessageContext>
java.lang.Object
   ↳ org.mule.modules.workday.api.internal.WorkdayCredentials

Class Overview

This class creates a handler that will add the WS-Security username and password to the to the SOAP request messages for a client side proxy.

Summary

Fields
private static String SOAPENVNamespace Namespace for the SOAP Envelope.
private static String SOAPENVPrefix The prefix that will be used for the SOAP Envelope namespace.
private static String WSSENamespace Namespace for the WS-Security SOAP header elements.
private static String WSSEPasswordText The WS-Security URI that specifies that the password will be transmitted as plain text.
private static String WSSEPrefix The prefix that will be used for the WS-Security namespace.
private String password The password that will be sent in the WS-Security header on the SOAP request message.
private String username The user name that will be sent in the WS-Security header on the SOAP request message.
Public Constructors
WorkdayCredentials(String username, String password)
Creates a WorkdayCredentials handler and initialises the member variables.
Public Methods
static void addWorkdayCredentials(BindingProvider bindingProvider, String username, String password)
This method created an instance of the WorkdayCredentials class and adds it as a handler to the bindingProvider supplied.
void close(MessageContext messageContext)
Set<QName> getHeaders()
Returns null as this handler doesn't process any Headers, it just adds one.
boolean handleFault(SOAPMessageContext smc)
Returns true, no action is taken for faults messages.
boolean handleMessage(SOAPMessageContext smc)
Adds WS-Security header to request messages.
[Expand]
Inherited Methods
From class java.lang.Object
From interface javax.xml.ws.handler.Handler
From interface javax.xml.ws.handler.soap.SOAPHandler

Fields

private static String SOAPENVNamespace

Namespace for the SOAP Envelope.

private static String SOAPENVPrefix

The prefix that will be used for the SOAP Envelope namespace.

private static String WSSENamespace

Namespace for the WS-Security SOAP header elements.

private static String WSSEPasswordText

The WS-Security URI that specifies that the password will be transmitted as plain text.

private static String WSSEPrefix

The prefix that will be used for the WS-Security namespace.

private String password

The password that will be sent in the WS-Security header on the SOAP request message.

private String username

The user name that will be sent in the WS-Security header on the SOAP request message. This is of the form systemid@tenant.

Public Constructors

public WorkdayCredentials (String username, String password)

Creates a WorkdayCredentials handler and initialises the member variables. In most cases, the addWorkdayCredentials static method should be used instead.

Parameters
username The id and tenant name for the user. This is of the form systemid@tenant.
password The password for the system user.

Public Methods

public static void addWorkdayCredentials (BindingProvider bindingProvider, String username, String password)

This method created an instance of the WorkdayCredentials class and adds it as a handler to the bindingProvider supplied.

Parameters
bindingProvider The client stub to which the handler will be added. The most convenient way to obtain the required bindingProvvider is to call one of the getPort methods on the Service class for the Web service and then cast the returned object to a BindingProvider.
username The id and tenant name for the user. This is of the form systemid@tenant.
password The password for the system user.

public void close (MessageContext messageContext)

Parameters
messageContext

public Set<QName> getHeaders ()

Returns null as this handler doesn't process any Headers, it just adds one.

public boolean handleFault (SOAPMessageContext smc)

Returns true, no action is taken for faults messages.

Parameters
smc

public boolean handleMessage (SOAPMessageContext smc)

Adds WS-Security header to request messages.

Parameters
smc