public final class WsitServiceTask
extends org.apache.tools.ant.Task
Creates WSIT service configuration file from a WSDL and a Policy fragment.
The task takes the WSDL file specified strips any existing policy information from it and merges in the Policy fragment.
The bindingpolicy attribute specifies the id of the Policy to be applied to the binding. This is usually the Policy that defines the Security Policy that the service requires and any server side configuration required by that Policy (such as keystore locations).
The inputpolicy and outputpolicy can be used to apply additional Policies to the input and output operations as well.
The class attribute specifies the full name of the web service implementation class.
The task will create a file in the outputdir named wsit-[class].xml. So if the value of the
class attribute is "com.appsec.ping.PingService" then the output file will be named
wsit-com.appsec.ping.PingService.xml. Metro looks on the classpath for WSIT configuration
files with this format.
To use this task, include a taskdef for the appsecinc-anttasks in your build.xml
<taskdef resource="com/appsecinc/ant/appsecinc-anttasks.properties" classpath="appsecinc-anttasks.jar" />
You can then use the task
<wsit-service
outputdir="src/WEB-INF"
wsdl="src/wsdl/MyService.wsdl"
policy="src/policy/WSTrustPolicy.xml"
class="com.appsec.MyService"
bindingpolicy="TrustPolicy"
inputpolicy="SignedInputPolicy"
outputpolicy="SignedOutputPolicy"
/>
| Constructor and Description |
|---|
WsitServiceTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
void |
setBindingpolicy(String bindingpolicy)
Required - The id of a Policy in the Policy fragment to apply to the binding.
|
void |
setClass(String classname)
Required - the full name (including the package) of the web service implementation class.
|
void |
setFaultpolicy(String faultpolicy)
Optional - Specifies a policy to apply to all fault operations
|
void |
setInputpolicy(String inputpolicy)
Optional - Specifies a policy to apply to all input operations
|
void |
setOutputdir(File output)
Required - The configuration files will be written to this directory.
|
void |
setOutputpolicy(String outputpolicy)
Optional - Specifies a policy to apply to all output operations
|
void |
setPolicy(File policy)
Required - the policy fragment with WSIT configuration to apply.
|
void |
setUpdatewsdl(boolean updatewsdl)
Optional - updates the wsdl with the policy.
|
void |
setWsdl(File wsdl)
Required - the service's WSDL.
|
void |
setWsdloutdir(File wsdloutdir)
Optional - the output folder for the wsdl.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic void execute()
execute in class org.apache.tools.ant.Taskpublic void setWsdl(File wsdl)
wsdl - public void setPolicy(File policy)
policy - public void setOutputdir(File output)
output - public void setClass(String classname)
classname - public void setBindingpolicy(String bindingpolicy)
bindingpolicy - public void setInputpolicy(String inputpolicy)
inputpolicy - public void setOutputpolicy(String outputpolicy)
outputpolicy - public void setFaultpolicy(String faultpolicy)
faultpolicy - public void setUpdatewsdl(boolean updatewsdl)
updatewsdl - public void setWsdloutdir(File wsdloutdir)
wsdloutdir - Copyright © 2011-2012 Application Security, Inc. All Rights Reserved.