|
JTR 4.0 API Documentation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjtr.ws.wsif.WsifHelper
public class WsifHelper
This is the WSIF-based implementation of the IWsHelper
interface.
Application level runner implementations do not need to directly access this
class. They can access and invoke webservices by means of the methods
inherited from their superclass, that is the
jtr.runnersAbstractWsRunner
class.
WsifHelperFactory
Field Summary | |
---|---|
protected org.apache.log4j.Logger |
logger
|
protected WebServiceConfig |
wsConfig
|
protected WebServiceRtConfig |
wsRtConfig
|
Constructor Summary | |
---|---|
WsifHelper()
Default constructor. |
Method Summary | |
---|---|
void |
asynchronousInputOnlyInvoke(Binding binding)
This method performs an asynchronous invocation of the webservice, following a one-way messaging pattern. |
void |
generateRuntimeConfig(WebServiceConfig wsCfg)
This method produces the WSIF-based runtime classes required to access and invoke the webservices represented by the input WebServiceConfig instance.This method is invoked once by the AbstractWsRunner class,
before the test() method of the application-level runner
implementation is actually invoked. |
java.lang.Throwable |
getFaultCause(Binding binding)
This method returns the cause of the webservice failure as a WsProviderException instance. |
java.lang.String |
getFaultMessageAsString(Binding binding)
This method returns the String representation of the fault message associated
with the given webservice operation. |
boolean |
getMessageBooleanPart(Binding binding,
java.lang.String partName,
WsMsgType msgType)
This method gets the boolean content of a specific message part. |
byte |
getMessageBytePart(Binding binding,
java.lang.String partName,
WsMsgType msgType)
This method gets the byte content of a specific message part. |
char |
getMessageCharPart(Binding binding,
java.lang.String partName,
WsMsgType msgType)
This method gets the char content of a specific message part. |
double |
getMessageDoublePart(Binding binding,
java.lang.String partName,
WsMsgType msgType)
This method gets the double content of a specific message part. |
float |
getMessageFloatPart(Binding binding,
java.lang.String partName,
WsMsgType msgType)
This method gets the float content of a specific message part. |
int |
getMessageIntPart(Binding binding,
java.lang.String partName,
WsMsgType msgType)
This method gets the int content of a specific message part. |
long |
getMessageLongPart(Binding binding,
java.lang.String partName,
WsMsgType msgType)
This method gets the long content of a specific message part. |
java.lang.Object |
getMessageObjectPart(Binding binding,
java.lang.String partName,
WsMsgType msgType)
This method gets the Object content of a specific message part. |
java.lang.String[] |
getMessageParts(Binding binding,
WsMsgType msgType)
Returns the String[] of the part names of the given message. |
protected org.apache.wsif.WSIFMessage |
getOperationMessage(Binding binding,
WsMsgType msgType)
This method returns a WSIFMessage instance representing
the message of type msgType associated with the webservice
identified by the union of the remaining input parameters. |
WebServiceRtConfig |
getWsRtConfig()
This method does not belong to the IWsHelper interface. |
java.lang.Object |
invoke(Binding binding,
java.lang.Object input)
|
java.lang.Object |
invoke(IRunnerWs runner,
Binding binding,
java.lang.Object input)
This method performs a request/response synchronous webservice invocation. |
IWsResponse |
invokeAsync(Binding binding,
java.lang.Object input)
|
java.util.concurrent.Future<?> |
invokeAsync(Binding binding,
java.lang.Object input,
IWsResponseListener rl)
|
IWsResponse |
invokeAsync(IRunnerWs runner,
Binding binding,
java.lang.Object input)
This method performs an asynchronous invocation of the webservice described by the binding parameter. |
java.util.concurrent.Future<?> |
invokeAsync(IRunnerWs runner,
Binding binding,
java.lang.Object input,
IWsResponseListener rl)
This method performs an asynchronous invocation of the webservice described by the binding parameter. |
void |
invokeOneWay(Binding binding,
java.lang.Object input)
|
void |
invokeOneWay(IRunnerWs runner,
Binding binding,
java.lang.Object input)
This method performs a request only webservice invocation. |
protected org.apache.wsif.WSIFOperation |
renewOperation(WebServiceRtPort port,
java.lang.String operationName)
This method reinstantiates an operation for subsequent reuse and sets the newly created operation into the given WebServiceRtPort . |
void |
setMessageBooleanPart(Binding binding,
java.lang.String partName,
boolean val,
WsMsgType msgType)
This method sets the boolean content of a specific message part. |
void |
setMessageBytePart(Binding binding,
java.lang.String partName,
byte val,
WsMsgType msgType)
This method sets the byte content of a specific message part. |
void |
setMessageCharPart(Binding binding,
java.lang.String partName,
char val,
WsMsgType msgType)
This method sets the char content of a specific message part. |
void |
setMessageDoublePart(Binding binding,
java.lang.String partName,
double val,
WsMsgType msgType)
This method sets the double content of a specific message part. |
void |
setMessageFloatPart(Binding binding,
java.lang.String partName,
float val,
WsMsgType msgType)
This method sets the float content of a specific message part. |
void |
setMessageIntPart(Binding binding,
java.lang.String partName,
int val,
WsMsgType msgType)
This method sets the int content of a specific message part. |
void |
setMessageLongPart(Binding binding,
java.lang.String partName,
long val,
WsMsgType msgType)
This method sets the long content of a specific message part. |
void |
setMessageObjectPart(Binding binding,
java.lang.String partName,
java.lang.Object val,
WsMsgType msgType)
This method sets the Object content of a specific message part. |
boolean |
synchronousInvoke(Binding binding)
This method performs a synchronous invocation of the webservice, following a request/response pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected WebServiceRtConfig wsRtConfig
protected WebServiceConfig wsConfig
protected org.apache.log4j.Logger logger
Constructor Detail |
---|
public WsifHelper()
Method Detail |
---|
public void generateRuntimeConfig(WebServiceConfig wsCfg) throws WsProviderException
WebServiceConfig
instance.AbstractWsRunner
class,
before the test()
method of the application-level runner
implementation is actually invoked.
generateRuntimeConfig
in interface IWsHelper
wsCfg
- JTR configuration file derived webservice configuration
WsProviderException
public java.lang.Object invoke(Binding binding, java.lang.Object input) throws WsProviderException
WsProviderException
public boolean synchronousInvoke(Binding binding) throws WsProviderException
IWsHelper
synchronousInvoke
in interface IWsHelper
binding
- The webservice binding to be used
WsProviderException
IWsHelper.synchronousInvoke(Binding binding)
public void asynchronousInputOnlyInvoke(Binding binding) throws WsProviderException
IWsHelper
asynchronousInputOnlyInvoke
in interface IWsHelper
binding
- The webservice binding to be used
WsProviderException
IWsHelper.asynchronousInputOnlyInvoke(Binding binding)
protected org.apache.wsif.WSIFOperation renewOperation(WebServiceRtPort port, java.lang.String operationName) throws WsProviderException
WebServiceRtPort
.
port
- The port the operation to be renewed belongs tooperationName
- The operation name
org.apache.wsif.WSIFException
WsProviderException
protected org.apache.wsif.WSIFMessage getOperationMessage(Binding binding, WsMsgType msgType)
WSIFMessage
instance representing
the message of type msgType
associated with the webservice
identified by the union of the remaining input parameters.
binding
- The webservice-binding to usemsgType
- The message type (input, output, fault)
WsMsgType
public java.lang.String getFaultMessageAsString(Binding binding)
IWsHelper
String
representation of the fault message associated
with the given webservice operation.
getFaultMessageAsString
in interface IWsHelper
binding
- The webservice binding to be used
IWsHelper.getFaultMessageAsString(jtr.config.ws.Binding)
public java.lang.Throwable getFaultCause(Binding binding)
IWsHelper
WsProviderException
instance.
getFaultCause
in interface IWsHelper
binding
- The webservice binding to be used
IWsHelper.getFaultCause(jtr.config.ws.Binding)
public java.lang.Object getMessageObjectPart(Binding binding, java.lang.String partName, WsMsgType msgType) throws WsProviderException
IWsHelper
Object
content of a specific message part.
getMessageObjectPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partmsgType
- The message type (input, output, fault)
WsProviderException
IWsHelper.getMessageObjectPart(jtr.config.ws.Binding,
java.lang.String, jtr.ws.WsMsgType)
public int getMessageIntPart(Binding binding, java.lang.String partName, WsMsgType msgType) throws WsProviderException
IWsHelper
int
content of a specific message part.
getMessageIntPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partmsgType
- The message type (input, output, fault)
WsProviderException
IWsHelper.getMessageIntPart(jtr.config.ws.Binding,
java.lang.String, jtr.ws.WsMsgType)
public boolean getMessageBooleanPart(Binding binding, java.lang.String partName, WsMsgType msgType) throws WsProviderException
IWsHelper
boolean
content of a specific message part.
getMessageBooleanPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partmsgType
- The message type (input, output, fault)
WsProviderException
IWsHelper.getMessageBooleanPart(jtr.config.ws.Binding,
java.lang.String, jtr.ws.WsMsgType)
public byte getMessageBytePart(Binding binding, java.lang.String partName, WsMsgType msgType) throws WsProviderException
IWsHelper
byte
content of a specific message part.
getMessageBytePart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partmsgType
- The message type (input, output, fault)
WsProviderException
IWsHelper.getMessageBytePart(jtr.config.ws.Binding,
java.lang.String, jtr.ws.WsMsgType)
public char getMessageCharPart(Binding binding, java.lang.String partName, WsMsgType msgType) throws WsProviderException
IWsHelper
char
content of a specific message part.
getMessageCharPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partmsgType
- The message type (input, output, fault)
WsProviderException
IWsHelper.getMessageCharPart(jtr.config.ws.Binding,
java.lang.String, jtr.ws.WsMsgType)
public double getMessageDoublePart(Binding binding, java.lang.String partName, WsMsgType msgType) throws WsProviderException
IWsHelper
double
content of a specific message part.
getMessageDoublePart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partmsgType
- The message type (input, output, fault)
WsProviderException
IWsHelper.getMessageDoublePart(jtr.config.ws.Binding,
java.lang.String, jtr.ws.WsMsgType)
public float getMessageFloatPart(Binding binding, java.lang.String partName, WsMsgType msgType) throws WsProviderException
IWsHelper
float
content of a specific message part.
getMessageFloatPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partmsgType
- The message type (input, output, fault)
WsProviderException
IWsHelper.getMessageFloatPart(jtr.config.ws.Binding,
java.lang.String, jtr.ws.WsMsgType)
public long getMessageLongPart(Binding binding, java.lang.String partName, WsMsgType msgType) throws WsProviderException
IWsHelper
long
content of a specific message part.
getMessageLongPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partmsgType
- The message type (input, output, fault)
WsProviderException
IWsHelper.getMessageLongPart(jtr.config.ws.Binding,
java.lang.String, jtr.ws.WsMsgType)
public void setMessageObjectPart(Binding binding, java.lang.String partName, java.lang.Object val, WsMsgType msgType) throws WsProviderException
IWsHelper
Object
content of a specific message part.
setMessageObjectPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partval
- The actual value of the partmsgType
- The message type (input, output, fault)
WsProviderException
IWsHelper.setMessageObjectPart(jtr.config.ws.Binding,
java.lang.String, java.lang.Object, jtr.ws.WsMsgType)
public void setMessageIntPart(Binding binding, java.lang.String partName, int val, WsMsgType msgType)
IWsHelper
int
content of a specific message part.
setMessageIntPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partval
- The actual value of the partmsgType
- The message type (input, output, fault)IWsHelper.setMessageIntPart(jtr.config.ws.Binding, String, int, jtr.ws.WsMsgType)
public void setMessageBooleanPart(Binding binding, java.lang.String partName, boolean val, WsMsgType msgType)
IWsHelper
boolean
content of a specific message part.
setMessageBooleanPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partval
- The actual value of the partmsgType
- The message type (input, output, fault)IWsHelper.setMessageBooleanPart(jtr.config.ws.Binding, String, boolean, jtr.ws.WsMsgType)
public void setMessageBytePart(Binding binding, java.lang.String partName, byte val, WsMsgType msgType)
IWsHelper
byte
content of a specific message part.
setMessageBytePart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partval
- The actual value of the partmsgType
- The message type (input, output, fault)IWsHelper.setMessageBytePart(jtr.config.ws.Binding,
java.lang.String, byte, jtr.ws.WsMsgType)
public void setMessageCharPart(Binding binding, java.lang.String partName, char val, WsMsgType msgType)
IWsHelper
char
content of a specific message part.
setMessageCharPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partval
- The actual value of the partmsgType
- The message type (input, output, fault)IWsHelper.setMessageCharPart(jtr.config.ws.Binding,
java.lang.String, char, jtr.ws.WsMsgType)
public void setMessageDoublePart(Binding binding, java.lang.String partName, double val, WsMsgType msgType)
IWsHelper
double
content of a specific message part.
setMessageDoublePart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partval
- The actual value of the partmsgType
- The message type (input, output, fault)IWsHelper.setMessageDoublePart(jtr.config.ws.Binding,
java.lang.String, double, jtr.ws.WsMsgType)
public void setMessageFloatPart(Binding binding, java.lang.String partName, float val, WsMsgType msgType)
IWsHelper
float
content of a specific message part.
setMessageFloatPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partval
- The actual value of the partmsgType
- The message type (input, output, fault)IWsHelper.setMessageFloatPart(jtr.config.ws.Binding,
java.lang.String, float, jtr.ws.WsMsgType)
public void setMessageLongPart(Binding binding, java.lang.String partName, long val, WsMsgType msgType)
IWsHelper
long
content of a specific message part.
setMessageLongPart
in interface IWsHelper
binding
- The webservice binding to be usedpartName
- The name of the message partval
- The actual value of the partmsgType
- The message type (input, output, fault)IWsHelper.setMessageLongPart(jtr.config.ws.Binding,
java.lang.String, long, jtr.ws.WsMsgType)
public java.lang.String[] getMessageParts(Binding binding, WsMsgType msgType)
IWsHelper
String[]
of the part names of the given message.
getMessageParts
in interface IWsHelper
IWsHelper.getMessageParts(Binding, WsMsgType)
public WebServiceRtConfig getWsRtConfig()
IWsHelper
interface. It
might be useful for accessing webservice-implementation specific
functionalities not directly exposed by the JTR framework.
null
if not availablepublic void invokeOneWay(Binding binding, java.lang.Object input) throws WsProviderException
WsProviderException
public java.util.concurrent.Future<?> invokeAsync(Binding binding, java.lang.Object input, IWsResponseListener rl) throws WsProviderException
WsProviderException
public IWsResponse invokeAsync(Binding binding, java.lang.Object input) throws WsProviderException
WsProviderException
public java.lang.Object invoke(IRunnerWs runner, Binding binding, java.lang.Object input) throws WsProviderException
IWsHelper
input
parameter is the invocation argument, while the
returned Object
instance is the result of the invocation.
invoke
in interface IWsHelper
runner
- The runner on whose behalf the service is invokedbinding
- The JTR description of the webservice that must be invokedinput
- The input message
WsProviderException
public void invokeOneWay(IRunnerWs runner, Binding binding, java.lang.Object input) throws WsProviderException
IWsHelper
input
parameter is the invocation argument.
invokeOneWay
in interface IWsHelper
runner
- The runner on whose behalf the service is invokedbinding
- The JTR description of the webservice that must be invokedinput
- The input message
WsProviderException
public java.util.concurrent.Future<?> invokeAsync(IRunnerWs runner, Binding binding, java.lang.Object input, IWsResponseListener rl) throws WsProviderException
IWsHelper
binding
parameter. The returned Future
instance can be
used to check whether the response message has been received or not. Once the
response message has been received the provided IWsResponseListener
will be notified and will be able to inspect the response.
invokeAsync
in interface IWsHelper
runner
- The runner on whose behalf the service is invokedbinding
- The JTR description of the webservice that must be invokedinput
- The input messagerl
- The listener to be notified upon response reception
Future
required to check for response availability
WsProviderException
public IWsResponse invokeAsync(IRunnerWs runner, Binding binding, java.lang.Object input) throws WsProviderException
IWsHelper
binding
parameter. The returned IWsResponse
instance is
required to check for response mesage availability and to inspect the response itself.
invokeAsync
in interface IWsHelper
runner
- The runner on whose behalf the service is invokedbinding
- The JTR description of the webservice that must be invokedinput
- The input message
IWsResponse
instance required to check for response mesage
availability and to inspect the response itself
WsProviderException
|
The JTR Project is licensed under GPL version 2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |