Class WebServiceCommand
- java.lang.Object
-
- org.jbpm.process.workitem.webservice.WebServiceCommand
-
- All Implemented Interfaces:
org.kie.api.executor.Command,org.kie.internal.runtime.Cacheable
public class WebServiceCommand extends Object implements org.kie.api.executor.Command, org.kie.internal.runtime.Cacheable
Web Service executor command that executes web service call using Apache CXF. It expects following parameters to be able to operate:- Interface - valid interface/service name of the web service (port type name from wsdl)
- Operation - valid operation name
- Parameter - object that is going to be used as web service message
- Url - location of the wsdl file used to look up service definition
- Namespace - name space of the web service
- Endpoint - overrides the endpoint address defined in the referenced WSDL.
- Username - username for authentication (optional)
- Password - password for authentication (optional)
Web service call is synchronous but since it's executor command it will be invoked as asynchronous task any way.
-
-
Constructor Summary
Constructors Constructor Description WebServiceCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyAuthorization(String userName, String password, org.apache.cxf.endpoint.Client client)voidclose()org.kie.api.executor.ExecutionResultsexecute(org.kie.api.executor.CommandContext ctx)protected org.apache.cxf.endpoint.dynamic.DynamicClientFactorygetDynamicClientFactory(org.kie.api.executor.CommandContext ctx)protected org.apache.cxf.endpoint.ClientgetWSClient(org.kie.api.runtime.process.WorkItem workItem, String interfaceRef, org.kie.api.executor.CommandContext ctx)voidsetClients(ConcurrentHashMap<String,org.apache.cxf.endpoint.Client> clients)
-
-
-
Method Detail
-
execute
public org.kie.api.executor.ExecutionResults execute(org.kie.api.executor.CommandContext ctx) throws Exception- Specified by:
executein interfaceorg.kie.api.executor.Command- Throws:
Exception
-
getWSClient
protected org.apache.cxf.endpoint.Client getWSClient(org.kie.api.runtime.process.WorkItem workItem, String interfaceRef, org.kie.api.executor.CommandContext ctx)
-
getDynamicClientFactory
protected org.apache.cxf.endpoint.dynamic.DynamicClientFactory getDynamicClientFactory(org.kie.api.executor.CommandContext ctx)
-
applyAuthorization
protected void applyAuthorization(String userName, String password, org.apache.cxf.endpoint.Client client)
-
close
public void close()
- Specified by:
closein interfaceorg.kie.internal.runtime.Cacheable
-
setClients
public void setClients(ConcurrentHashMap<String,org.apache.cxf.endpoint.Client> clients)
-
-