Difference between revisions of "Ws-call"

From GreenVulcano Wiki
Jump to: navigation, search
(AxisWebServiceInvoker)
(WSDLInfo)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Description==
 
==Description==
  
The plugin ''ws-call'' defines the parameters for calling a Web Service.
+
The {{GVESB}} plugin '''ws-call''' defines the parameters for calling a Web Service.
  
 
=={{VULCON}} / {{GVCONSOLE}} Configuration==
 
=={{VULCON}} / {{GVCONSOLE}} Configuration==
  
 
The ws-call Element is used by [[Channel]] and [[routed-call]]. Its attributes are:
 
The ws-call Element is used by [[Channel]] and [[routed-call]]. Its attributes are:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| type || fixed || This attribute must assume the value '''call'''.
 +
|-
 +
| class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.virtual.ws.WSCallOperation'''.
 +
|-
 +
| name || required || Operation name. Used in the [[Flow]] section to associate workflow nodes to VCL operations.
 +
|}
  
* ''type'': call.
+
and its subelements:
* ''class'': it.greenvulcano.gvesb.virtual.ws.WSCallOperation.
+
* [[Description]]
* ''name'': Operation name. Used in the [[Flow]] section to associate workflow nodes to VCL operations.
+
* [[Ws-call#AxisWebServiceInvoker|AxisWebServiceInvoker]]
 +
* [[Proxy]] '''MOVED on v3.4'''
  
and its subelements:
+
===AxisWebServiceInvoker===
  
* Description,
+
This element is used by [[ws-call]].
* AxisWebServiceInvoker,
 
* [[Proxy]]
 
  
 +
Its attributes are:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| type || fixed || This attribute must assume the value '''invoker'''.
 +
|-
 +
| class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.virtual.ws.GVWebServiceInvoker'''.
 +
|-
 +
| service || optional || Service name.
 +
|-
 +
| serviceNS || optional || Service NameSpace.
 +
|-
 +
| operation || required || Operation name.
 +
|-
 +
| emptyAction || optional || f true the SOAPAction header is not set in the request. Default to false.
 +
|-
 +
| portName || optional || Port Name
 +
|-
 +
| timeout || optional || Timeout in seconds.
 +
|-
 +
| ref-dp || optional || Name of [[Data_provider|Data Provider]] to use for preparing the request.
 +
|-
 +
| throwsFault || optional || If ''true'' throws Exception "Error invoking operation". If ''false'' returns the Fault response. Default to false.
 +
The attribute's admitted values are:
 +
* true
 +
* false
 +
|-
 +
| use-saaj || optional || Defines whether to use SAAJ to invoke the WebService mode instead of the default Axis2 mode. <br/> NOTE: If you choose to use SAAJ as a way of calling the WebService, Axis2 modules are not enabled. <br/> The attribute's admitted values are:
 +
* true
 +
* false
 +
|-
 +
| returnType || optional || Defines how to set the response data in the object field of output [[GVBuffer]]:
 +
* context : the MessageContext
 +
* envelope : the envelope as XML serialized as string
 +
* body : the body as XML serialized as string
 +
* body-element : the first child of body as XML serialized as string
 +
* header : the header as XML serialized as string
 +
* envelope-om : the envelope as OMMessage
 +
* body-om : the body as OMMessage
 +
* body-element-om : the first child of body as OMMessage
 +
* header-om : the header as OMMessage
 +
Default: context
 +
|}
 +
<div class="version_ge3.4">
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| emptyAction || optional || if true the SOAPAction header is not set in the request. Default to false.
 +
|}
 +
</div>
  
===AxisWebServiceInvoker===
+
and has the sub-elements:
 +
* [[Description]]
 +
* [[#XPathNamespace|XPathNamespace]]
 +
* [[#WSDLInfo|WSDLInfo]]
 +
* [[#EngageModule|EngageModule]]
 +
<div class="version_ge3.4">
 +
* [[BasicHttpAuth]]
 +
* [[NTLMHttpAuth]]
 +
* [[Proxy]]
 +
</div>
  
 +
====XPathNamespace====
  
This element is used by ''ws-call''.
+
Defines a namespace that can be used in XPath.
 +
The 'gvesb' prefix is reserved.
  
Its attributes are:
+
The following table shows the XPathNamespace element's attributes:
* ''type'': invoker.
+
{|class="gvtable"
* ''class'': it.greenvulcano.gvesb.virtual.ws.GVWebServiceInvoker.
+
! Attribute !! Type !! Description
* ''service'': Service name.
+
|-
* ''serviceNS'': Service NameSpace.
+
| prefix || required || Namespace prefix.
* ''operation'': Operation name.
+
|-
* ''portName'': Port Name
+
| namespace || optional || Namespace.
* ''timeout'': Timeout in seconds.
+
If not set, the prefix is associated to the default namespace.
* ''ref-dp'': Name of Data Provider to use to prepare the request.
+
The attribute's value can't be null.
* ''use-saaj'': Defines whether to use SAAJ to invoke the WebService mode instead of the default Axis2 mode. <br/> NOTE: If you choose to use SAAJ as a way of calling the WebService, Axis2 modules are not enabled. <br/> The attribute's admitted values are:
+
|}
** true
 
** false
 
* ''returnType'': Defines how to set the response data in the object field of output GVBuffer:
 
** context : the MessageContext. Default value
 
** envelope : the envelope as XML serialized as byte []
 
** body : the body as XML serialized as byte []
 
** body-element : the first child of body as XML serialized as byte []
 
** header : the header as XML serialized as byte []
 
  
and has the subelements:
+
Might contain the sub-element [[Description]].
* Description,
 
* [[XPathNamespace]],
 
* WSDLInfo (see bellow),
 
* EngageModule (see bellow)
 
  
 
====WSDLInfo====
 
====WSDLInfo====
  
This subelement returns a WSDL through his URL. It is used by ''AxisWebServiceInvoker''.
+
This element returns a WSDL through his URL.
  
 
Its attributes are:
 
Its attributes are:
* ''type'': wsdlinfo.
+
{|class="gvtable"
* ''wsdl'': WSDL file URL.
+
! Attribute !! Type !! Description
 +
|-
 +
| type || fixed || This attribute must assume the value '''wsdlinfo'''.
 +
|-
 +
| wsdl || required || WSDL file URL.
 +
|}
 +
<div class="version_ge3.4/3.3.4">
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| ws-endpoint-url || optional || Override the endpoint URL defined in the wsdl. Is overridden by the WS_ENDPOINT_URL GVBuffer's property value.
 +
|}
 +
</div>
  
 
====EngageModule====
 
====EngageModule====
  
It is only used by ''AxisWebServiceInvoker''. Its attributes are:
+
Its attributes are:
* ''name'': Defines the name of a module to hire to handle WS-*. <br/> If set, takes precedence over the attribute ''specifications''. <br/> The attribute's admitted values are:
+
{|class="gvtable"
** rampart
+
! Attribute !! Type !! Description
** sandesha2
+
|-
* ''type'': Defines the class that implements the hander for the module to engage. <br/> The attribute's default value is:
+
| name || required || Defines the name of a module to hire to handle WS-*. <br/> If set, takes precedence over the attribute ''specifications''. <br/> The attribute's admitted values are:
** it.greenvulcano.gvesb.virtual.ws.module.DefaultModuleHandler.
+
* rampart
The attribute's admitted values are:
+
* sandesha2
** it.greenvulcano.gvesb.virtual.ws.module.rampart.RampartModuleH
+
|-
** it.greenvulcano.gvesb.virtual.ws.module.sandesha2.Sandesha2Modu
+
| type || required || Defines the class that implements the hander for the module to engage. <br/> The attribute's admitted values are:
* ''specification'': The specification to implement, mandatory and other than 'NO-SPEC' if the name attribute is not declared. <br/> The attribute's default value is: NO-SPEC. <br/> The attribute's admitted values are:
+
* it.greenvulcano.gvesb.virtual.ws.module.DefaultModuleHandler (Default value) .
** NO-SPEC
+
* it.greenvulcano.gvesb.virtual.ws.module.rampart.RampartModuleHandler
** WS-Security
+
* it.greenvulcano.gvesb.virtual.ws.module.sandesha2.Sandesha2ModuleHandler
** WS-ReliableMessaging
+
|-
 +
| specification || required || The specification to implement, mandatory and other than 'NO-SPEC' if the name attribute is not declared. <br/> The attribute's default value is: NO-SPEC. <br/> The attribute's admitted values are:
 +
* NO-SPEC
 +
* WS-Security
 +
* WS-ReliableMessaging
 +
|}
  
It has the subelements:
+
It has the sub-elements:
* Description,
+
* [[Description]]
* PolicyData (see bellow),
+
* [[#PolicyData|PolicyData]]
* ModuleProperty (see bellow).
+
* [[#ModuleProperty|ModuleProperty]]
  
 
=====PolicyData=====
 
=====PolicyData=====
Line 103: Line 177:
 
               <wsp:Policy>
 
               <wsp:Policy>
 
                     <sp:UsernameToken  
 
                     <sp:UsernameToken  
                       sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />  
+
                       sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/
 +
                      securitypolicy/IncludeToken/AlwaysToRecipient"/>  
 
               </wsp:Policy>  
 
               </wsp:Policy>  
 
           </sp:SignedSupportingTokens>
 
           </sp:SignedSupportingTokens>
 
           <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
 
           <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
 
               <ramp:user>alice</ramp:user>
 
               <ramp:user>alice</ramp:user>
               <ramp:passwordCallbackClass>org.apache.rampart.samples.policy.sample01.PWCBHandler</ramp:passwordCallbackClass>   
+
               <ramp:passwordCallbackClass>
 +
                    org.apache.rampart.samples.policy.sample01.PWCBHandler
 +
              </ramp:passwordCallbackClass>   
 
           </ramp:RampartConfig>
 
           </ramp:RampartConfig>
 
         </wsp:All>  
 
         </wsp:All>  
Line 115: Line 192:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
The PolicyData Element is used only by ''EngageModule'' and has the following attributes:
+
The PolicyData Element is used only by ''EngageModule'' and has the following attribute:
* ''policy_key'': Defines the key to set the policy for the service invocation. <br/> The attribute's admitted values are:
+
{|class="gvtable"
** rampartPolicy
+
! Attribute !! Type !! Description
 +
|-
 +
| policy_key || required || Defines the key to set the policy for the service invocation. <br/> The attribute's admitted values are:
 +
* rampartPolicy
 +
|}
  
 
=====ModuleProperty=====
 
=====ModuleProperty=====
  
 
This element is a specific property form the module to engage. For example: <br/>
 
This element is a specific property form the module to engage. For example: <br/>
The property ''org.apache.axis2.addressing.AddressingConstants.DISABLE_OUTBOUND_ADDRESSING_VALIDATION'' set to ''true'' prevents a fault if SOAPAction is not set.
+
The property '''org.apache.axis2.addressing.AddressingConstants.DISABLE_OUTBOUND_ADDRESSING_VALIDATION''' set to ''true'' prevents a fault if SOAPAction is not setted.
  
 
The ModuleProperty Element is used only by ''EngageModule''. Its attributes are:
 
The ModuleProperty Element is used only by ''EngageModule''. Its attributes are:
* ''name''
+
{|class="gvtable"
* ''value''
+
! Attribute !! Type !! Description
* ''type'': The attribute's default value is String and its admitted values are:
+
|-
** String
+
| name || required || Name of the ModuleProperty
** Boolean
+
|-
** Byte
+
| value || required ||
** Short
+
|-
** Int
+
| type || optional || The attribute's default value is String and its admitted values are:
** Long
+
* String
** Float
+
* Boolean
** Double
+
* Byte
 +
* Short
 +
* Int
 +
* Long
 +
* Float
 +
* Double
 +
|}

Latest revision as of 10:53, 31 December 2014

Description

The GreenVulcano® ESB plugin ws-call defines the parameters for calling a Web Service.

VulCon / GV Console Configuration

The ws-call Element is used by Channel and routed-call. Its attributes are:

Attribute Type Description
type fixed This attribute must assume the value call.
class fixed This attribute must assume the value it.greenvulcano.gvesb.virtual.ws.WSCallOperation.
name required Operation name. Used in the Flow section to associate workflow nodes to VCL operations.

and its subelements:

AxisWebServiceInvoker

This element is used by ws-call.

Its attributes are:

Attribute Type Description
type fixed This attribute must assume the value invoker.
class fixed This attribute must assume the value it.greenvulcano.gvesb.virtual.ws.GVWebServiceInvoker.
service optional Service name.
serviceNS optional Service NameSpace.
operation required Operation name.
emptyAction optional f true the SOAPAction header is not set in the request. Default to false.
portName optional Port Name
timeout optional Timeout in seconds.
ref-dp optional Name of Data Provider to use for preparing the request.
throwsFault optional If true throws Exception "Error invoking operation". If false returns the Fault response. Default to false.

The attribute's admitted values are:

  • true
  • false
use-saaj optional Defines whether to use SAAJ to invoke the WebService mode instead of the default Axis2 mode.
NOTE: If you choose to use SAAJ as a way of calling the WebService, Axis2 modules are not enabled.
The attribute's admitted values are:
  • true
  • false
returnType optional Defines how to set the response data in the object field of output GVBuffer:
  • context : the MessageContext
  • envelope : the envelope as XML serialized as string
  • body : the body as XML serialized as string
  • body-element : the first child of body as XML serialized as string
  • header : the header as XML serialized as string
  • envelope-om : the envelope as OMMessage
  • body-om : the body as OMMessage
  • body-element-om : the first child of body as OMMessage
  • header-om : the header as OMMessage

Default: context

Attribute Type Description
emptyAction optional if true the SOAPAction header is not set in the request. Default to false.

and has the sub-elements:

XPathNamespace

Defines a namespace that can be used in XPath. The 'gvesb' prefix is reserved.

The following table shows the XPathNamespace element's attributes:

Attribute Type Description
prefix required Namespace prefix.
namespace optional Namespace.

If not set, the prefix is associated to the default namespace. The attribute's value can't be null.

Might contain the sub-element Description.

WSDLInfo

This element returns a WSDL through his URL.

Its attributes are:

Attribute Type Description
type fixed This attribute must assume the value wsdlinfo.
wsdl required WSDL file URL.
Attribute Type Description
ws-endpoint-url optional Override the endpoint URL defined in the wsdl. Is overridden by the WS_ENDPOINT_URL GVBuffer's property value.

EngageModule

Its attributes are:

Attribute Type Description
name required Defines the name of a module to hire to handle WS-*.
If set, takes precedence over the attribute specifications.
The attribute's admitted values are:
  • rampart
  • sandesha2
type required Defines the class that implements the hander for the module to engage.
The attribute's admitted values are:
  • it.greenvulcano.gvesb.virtual.ws.module.DefaultModuleHandler (Default value) .
  • it.greenvulcano.gvesb.virtual.ws.module.rampart.RampartModuleHandler
  • it.greenvulcano.gvesb.virtual.ws.module.sandesha2.Sandesha2ModuleHandler
specification required The specification to implement, mandatory and other than 'NO-SPEC' if the name attribute is not declared.
The attribute's default value is: NO-SPEC.
The attribute's admitted values are:
  • NO-SPEC
  • WS-Security
  • WS-ReliableMessaging

It has the sub-elements:

PolicyData

This element is an XML that describes the policies for a specific. Currently it is used only for the WS-Security implemented by the module rampart.

Below is an example of policy to be included on the module rampart:

<wsp:Policy wsu:Id="UTOverTransport" 
             xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
             xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
   <wsp:ExactlyOne>
       <wsp:All>
           <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
              <wsp:Policy>
                 <sp:TransportToken>
                    <wsp:Policy>
                       <sp:HttpsToken RequireClientCertificate="false"/>
                    </wsp:Policy>
                 </sp:TransportToken>
                 <sp:AlgorithmSuite> <wsp:Policy> <sp:Basic256/> </wsp:Policy> </sp:AlgorithmSuite>
                 <sp:Layout> <wsp:Policy> <sp:Lax/> </wsp:Policy> </sp:Layout> <sp:IncludeTimestamp/>
              </wsp:Policy>
           </sp:TransportBinding>
           <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
               <wsp:Policy>
                    <sp:UsernameToken 
                       sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/
                       securitypolicy/IncludeToken/AlwaysToRecipient"/> 
               </wsp:Policy> 
           </sp:SignedSupportingTokens>
           <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
               <ramp:user>alice</ramp:user>
               <ramp:passwordCallbackClass>
                    org.apache.rampart.samples.policy.sample01.PWCBHandler
               </ramp:passwordCallbackClass>  
           </ramp:RampartConfig>
        </wsp:All> 
    </wsp:ExactlyOne> 
</wsp:Policy>

The PolicyData Element is used only by EngageModule and has the following attribute:

Attribute Type Description
policy_key required Defines the key to set the policy for the service invocation.
The attribute's admitted values are:
  • rampartPolicy
ModuleProperty

This element is a specific property form the module to engage. For example:
The property org.apache.axis2.addressing.AddressingConstants.DISABLE_OUTBOUND_ADDRESSING_VALIDATION set to true prevents a fault if SOAPAction is not setted.

The ModuleProperty Element is used only by EngageModule. Its attributes are:

Attribute Type Description
name required Name of the ModuleProperty
value required
type optional The attribute's default value is String and its admitted values are:
  • String
  • Boolean
  • Byte
  • Short
  • Int
  • Long
  • Float
  • Double