com.bea.control
Interface ServiceControl

All Superinterfaces:
ExternalCallbackTarget

public interface ServiceControl
extends ExternalCallbackTarget

Provides simplified access to web services. A Web Service control provides an interface between your application and a web service, which allows your application to invoke the methods and handle the callbacks of that web service. Using a Web Service control, you can connect to any web service for which a WSDL file is available. The target web service's operations are exposed as methods of the control.

Author:
Copyright (c) 2005 by BEA Systems. All rights reserved.

Nested Class Summary
static interface ServiceControl.Callback
          This interface provides system notification events such as onAsyncFailure to the service control.
static interface ServiceControl.CallbackJmsQueue
          This annotation provides the ability to override the default queue name for the callback jws for the service control callback endpoint This annotation can be added manually to the service control and modified on the service control.
static interface ServiceControl.Conversation
          The Conversation annotation specifies the conversational phase of the method.
static class ServiceControl.Direction
           
static interface ServiceControl.EndpointMethodName
          The EndpointMethdodName annotation is only used when the JaxRpc Service Endpoint Interface method does not match the method name on the service control.
static interface ServiceControl.ExplicitWrapping
          Deprecated.  
static interface ServiceControl.Handler
          Optional annotation indicating the jax-rpc handlers to use.
static interface ServiceControl.HttpConnectionTimeout
          Configures the HTTP Connection Timeout.
static interface ServiceControl.HttpSoap12Protocol
          The HttpSoap12Protocol annotation specifies that a particular Web Service control supports SOAP 1.2 over HTTP.
static interface ServiceControl.HttpSoapProtocol
          The HttpSoapProtocol annotation specifies that a particular Web Service control supports SOAP over HTTP.
static interface ServiceControl.JmsSoap12Protocol
          The JmsSoap12Protocol annotation specifies that a particular Web Service control supports SOAP 1.2 over JMS.
static interface ServiceControl.JmsSoapProtocol
          The JmsSoapProtocol annotation specifies that a particular Web Service control supports SOAP over JMS.
static interface ServiceControl.Location
          The Location annotation provides the location URL for the target service.
static interface ServiceControl.OperationName
          The OperationName annotation is only used when the target WSDL defines operations with names that are invalid as Java method names.
static interface ServiceControl.Policies
          The Policies annotation is used to define one or more policies for a port/operation.
static interface ServiceControl.Policy
          The Policy annotation is used to define the policy for a port/operation.
static interface ServiceControl.SOAPBinding
          The SOAPBinding annotation indicates the SOAP style, use, and wrapped attributes.
static interface ServiceControl.TypesJarName
          Deprecated.  
static interface ServiceControl.WSDL
          The WSDL annotation specifies the path to the WSDL file.
 
Nested classes/interfaces inherited from interface com.bea.control.ExternalCallbackTarget
ExternalCallbackTarget.CallbackSecurity, ExternalCallbackTarget.ExternalCallbackEvent
 
Method Summary
 String getConversationID()
          Retrieves the conversation ID of the current conversation with this Web Service control instance.
 URL getEndPoint()
          Deprecated. Please use the getEndpointAddress() method
 String getEndpointAddress()
          Gets the endpoint address that the Service control instance will use to invoke the remote endpoint.
 Element[] getInputHeaders()
          Retrieves the SOAP headers that were included in the most recent arriving callback from this Web Service control.
 String getMessagePassword()
          Retrieves the password string that was set by the most recent call to the setMessagePassword method.
 String getMessageUsername()
          Retrieves the username string that was set by the most recent call to setMessageUsername.
 String getPassword()
          Retrieves the password string that was set by the most recent call to the setPassword method.
 weblogic.wsee.jws.Protocol getProtocol()
          Deprecated.  
 javax.xml.rpc.Stub getStub()
          This method allows the caller to retrieve the JAX-RPC stub.
 int getTimeout()
          Gets the timeout that has been set by setTimeout() for the underlying HttpURLConnection, in milliseconds.
 String getUsername()
          Retrieves the username string that was set by the most recent call to setUsername.
 QName getWsdlPort()
          Returns the QName of the port that will be used by the Service Control to call the web service.
 boolean includeXsiType()
          This method returns true if the xsi type is to be included in the cargo of an RPC/ENCODED SOAP message, otherwise false.
 void reset()
          Clears all parameters that were set by previous calls to the setOutputHeaders, setPassword, or setUsername methods.
 void setClientCert(String alias, String password)
          Specifies the information to look up the client certificate when using 2-way SSL.
 void setClientMessageCert(String alias, String password)
          Specifies the information for the client message certificate.
 void setConversationID(String conversationID)
          Sets the unique key that will be proposed as the conversation ID when initiating a conversation with the Web Service control.
 void setEndPoint(URL url)
          Deprecated. Please use the setEndpointAddress(String) method
 void setEndpointAddress(String url)
          Sets the address of the remote target service.
 void setIncludeXsiType(boolean value)
          This method allows the caller t o specify if the xsi type is to be included in the cargo of an RPC/ENCODED SOAP message
 void setKeystore(String location, String password)
          Specifies the keystore information (including type) to use when using client certificates with Secure Sockets Layer (SSL).
 void setKeystore(String location, String password, String type)
          Specifies the keystore information (including type) to use when using client certificates with Secure Sockets Layer (SSL).
 void setMessagePassword(String password)
          Sets the password that will be sent with the message.
 void setMessageUsername(String username)
          Sets the username that will be sent with the message.
 void setOutputHeaders(Element[] headers)
          Sets the SOAP headers that will be included in the next outgoing method invocation message to the Web Service control.
 void setPassword(String password)
          Sets the password that will be sent with the next outgoing Web Service control method invocation.
 void setProtocol(weblogic.wsee.jws.Protocol protocol)
          Deprecated.  
 void setServerMessageCert(X509Certificate cert)
          Specifies the server message certificate.
 void setTimeout(int timeout)
          Sets the timeout for the underlying HttpURLConnection in milliseconds.
 void setTruststore(String location, String password)
          Set the trust-store to use to validate the server using SSL.
 void setTruststore(String location, String password, String type)
          Set the trust-store to use to validate the server using SSL.
 void setUsername(String username)
          Sets the username that will be sent with the next outgoing Web Service control method invocation.
 void setWsdlPort(QName wsdlPortName)
          Specifies the QName for the port within the WSDL which the Service Control should use.
 void useClientKeySSL(boolean b)
          Specifies whether a client certificate should be used with Secure Sockets Layer (SSL).
 

Method Detail

setConversationID

void setConversationID(String conversationID)
Sets the unique key that will be proposed as the conversation ID when initiating a conversation with the Web Service control. Note that WebLogic Server automatically computes a conversation ID when a web service invokes a start method of a Web Service control. Use the setConversationID method to override the automatic value. The only case where it is useful to do so is if you supply the conversation ID of an existing conversation that is currently ongoing on the target web service. You may then invoke methods on the target service that will execute in the context of the specified conversation. However, only the client that originated the conversation may receive callbacks.

Parameters:
conversationID - The new value for the conversation ID.

getConversationID

String getConversationID()
Retrieves the conversation ID of the current conversation with this Web Service control instance.

Returns:
The conversation ID for this Service control's current conversation.

setProtocol

void setProtocol(weblogic.wsee.jws.Protocol protocol)
Deprecated. 

Specifies the protocol to use for messages sent to the target web service.

Parameters:
protocol - The protocol to use.

getProtocol

weblogic.wsee.jws.Protocol getProtocol()
Deprecated. 

Returns a Protocol object representing the protocol to use when sending messages to the target web service.

Returns:
The protocol that will be used.

useClientKeySSL

void useClientKeySSL(boolean b)
Specifies whether a client certificate should be used with Secure Sockets Layer (SSL).

Parameters:
b - true to use a client certificate; otherwise, false.

setKeystore

void setKeystore(String location,
                 String password,
                 String type)
Specifies the keystore information (including type) to use when using client certificates with Secure Sockets Layer (SSL). The default keystore is the WebLogic Server system-identity keystore. Use the type parameters to specify a keystore type other than the default type of "JKS".

Parameters:
location - The path to the keystore file.
password - The password for the keystore.
type - The type of keystore to use.

setKeystore

void setKeystore(String location,
                 String password)
Specifies the keystore information (including type) to use when using client certificates with Secure Sockets Layer (SSL). The default keystore is the WebLogic Server system-identity keystore. The keystore type of "JKS" is used.

Parameters:
location - The path to the keystore file.
password - The password for the keystore.

setTruststore

void setTruststore(String location,
                   String password,
                   String type)
Set the trust-store to use to validate the server using SSL.

Parameters:
location - The file path to the trust-store file.
password - The trust-store password.
type - The type of trust-store. Default is JKS.

setTruststore

void setTruststore(String location,
                   String password)
Set the trust-store to use to validate the server using SSL. The trust-store type of "JKS" is used.

Parameters:
location - The file path to the trust-store file.
password - The trust-store password.

setClientCert

void setClientCert(String alias,
                   String password)
Specifies the information to look up the client certificate when using 2-way SSL.

Parameters:
alias - The path to the keystore (JKS) file.
password - The password for the keystore.

setEndPoint

void setEndPoint(URL url)
Deprecated. Please use the setEndpointAddress(String) method

Provides manual control over URL of the target service.

Parameters:
url - The new destination for callbacks.

getEndpointAddress

String getEndpointAddress()
Gets the endpoint address that the Service control instance will use to invoke the remote endpoint. This will throw a java.lang.UnsupportedOperationException if the endpoint address is for jms.

Returns:
The URL that will be used.

setEndpointAddress

void setEndpointAddress(String url)
Sets the address of the remote target service.

Parameters:
url - The new destination for callbacks.

getEndPoint

URL getEndPoint()
Deprecated. Please use the getEndpointAddress() method

Gets the URL that the Service control instance will use as the base URL. This will throw a java.lang.UnsupportedOperationException if the endpoint address is for jms.

Returns:
The URL that will be used.

setWsdlPort

void setWsdlPort(QName wsdlPortName)
Specifies the QName for the port within the WSDL which the Service Control should use.

Parameters:
wsdlPortName - The QName of the port to use.

getWsdlPort

QName getWsdlPort()
Returns the QName of the port that will be used by the Service Control to call the web service.

Returns:
The QName of the port that will be used.

setUsername

void setUsername(String username)
Sets the username that will be sent with the next outgoing Web Service control method invocation. Used if the Web Service control uses HTTP basic authentication.

Parameters:
username - The username to send for authentication.

setPassword

void setPassword(String password)
Sets the password that will be sent with the next outgoing Web Service control method invocation. Used if the Web Service control uses HTTP basic authentication.

Parameters:
password - The password to send for authentication.

getUsername

String getUsername()
Retrieves the username string that was set by the most recent call to setUsername.

Returns:
The username set by the setUsername method.

getPassword

String getPassword()
Retrieves the password string that was set by the most recent call to the setPassword method.

Returns:
The password set by the setPassword method.

setMessageUsername

void setMessageUsername(String username)
Sets the username that will be sent with the message.

Parameters:
username - The username to send for authentication.

setMessagePassword

void setMessagePassword(String password)
Sets the password that will be sent with the message.

Parameters:
password - The password to send for authentication.

getMessageUsername

String getMessageUsername()
Retrieves the username string that was set by the most recent call to setMessageUsername.

Returns:
The username set by the setMessageUsername method.

getMessagePassword

String getMessagePassword()
Retrieves the password string that was set by the most recent call to the setMessagePassword method.

Returns:
The password set by the setMessagePassword method.

setClientMessageCert

void setClientMessageCert(String alias,
                          String password)
Specifies the information for the client message certificate.

Parameters:
alias - The alias in the keystore (JKS) file.
password - The password for the keystore.

setServerMessageCert

void setServerMessageCert(X509Certificate cert)
Specifies the server message certificate.

Parameters:
cert - The certificate to use.

getInputHeaders

Element[] getInputHeaders()
Retrieves the SOAP headers that were included in the most recent arriving callback from this Web Service control.

Returns:
An array of the SOAP input header elements for this control's most recently receive callback.

setOutputHeaders

void setOutputHeaders(Element[] headers)
Sets the SOAP headers that will be included in the next outgoing method invocation message to the Web Service control.

Parameters:
headers - An array of the new SOAP output header elements.

setTimeout

void setTimeout(int timeout)
Sets the timeout for the underlying HttpURLConnection in milliseconds. The default is 0, meaning no timeout. Negative values are converted to 0.


getTimeout

int getTimeout()
Gets the timeout that has been set by setTimeout() for the underlying HttpURLConnection, in milliseconds. A value of 0 means no timeout.


reset

void reset()
Clears all parameters that were set by previous calls to the setOutputHeaders, setPassword, or setUsername methods.


includeXsiType

boolean includeXsiType()
This method returns true if the xsi type is to be included in the cargo of an RPC/ENCODED SOAP message, otherwise false.

Returns:
returns true if Xsi types are included in the SOAP payload, false otherwise

setIncludeXsiType

void setIncludeXsiType(boolean value)
This method allows the caller t o specify if the xsi type is to be included in the cargo of an RPC/ENCODED SOAP message

Parameters:
value - - set to true if Xsi is desired in the SOAP payload

getStub

javax.xml.rpc.Stub getStub()
                           throws ServiceControlException
This method allows the caller to retrieve the JAX-RPC stub. The stub is only valid within the scope of the current method call. It is not persisted during conversations and it is reset between calls to a web service method (operation). Also not that it also returns the stub for the "selected" port. That is the port that you have chosen via the setWsdlPort or the one that matches most closely with the setProtocol.

Returns:
- the jax rpc stub
Throws:
ServiceControlException