Difference between revisions of "Ws-call"

From GreenVulcano Wiki
Jump to: navigation, search
(Created page with "==Description== The plugin ''ws-call'' defines the parameters for calling a Web Service. =={{VULCON}} / {{GVCONSOLE}} Configuration== The ws-call Element is used by [[Channel]...")
 
(AxisWebServiceInvoker)
Line 41: Line 41:
 
** body-element : the first child of 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 []
 
** header : the header as XML serialized as byte []
 +
 +
and has the subelements:
 +
* Description,
 +
* [[XPathNamespace]],
 +
* WSDLInfo (see bellow),
 +
* EngageModule (see bellow)
 +
 +
====WSDLInfo====
 +
 +
This subelement returns a WSDL through his URL. It is used by ''AxisWebServiceInvoker''.
 +
 +
Its attributes are:
 +
* ''type'': wsdlinfo.
 +
* ''wsdl'': WSDL file URL.
 +
 +
====EngageModule====
 +
 +
It is only used by ''AxisWebServiceInvoker''. 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:
 +
** rampart
 +
** sandesha2
 +
* ''type'': Defines the class that implements the hander for the module to engage. <br/> The attribute's default value is:
 +
** it.greenvulcano.gvesb.virtual.ws.module.DefaultModuleHandler.
 +
The attribute's admitted values are:
 +
** it.greenvulcano.gvesb.virtual.ws.module.rampart.RampartModuleH
 +
** it.greenvulcano.gvesb.virtual.ws.module.sandesha2.Sandesha2Modu
 +
* ''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:
 +
** NO-SPEC
 +
** WS-Security
 +
** WS-ReliableMessaging
 +
 +
It has the subelements:
 +
* Description,
 +
* PolicyData (see bellow),
 +
* ModuleProperty (see bellow).
 +
 +
=====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'':
 +
 +
<syntaxhighlight lang="XML">
 +
<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>
 +
</syntaxhighlight>
 +
 +
The PolicyData Element is used only by ''EngageModule'' and has the following attributes:
 +
* ''policy_key'': Defines the key to set the policy for the service invocation. <br/> The attribute's admitted values are:
 +
** rampartPolicy
 +
 +
=====ModuleProperty=====
 +
 +
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 ModuleProperty Element is used only by ''EngageModule''. Its attributes are:
 +
* ''name''
 +
* ''value''
 +
* ''type'': The attribute's default value is String and its admitted values are:
 +
** String
 +
** Boolean
 +
** Byte
 +
** Short
 +
** Int
 +
** Long
 +
** Float
 +
** Double

Revision as of 18:04, 1 February 2012

Description

The 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:

  • type: call.
  • class: it.greenvulcano.gvesb.virtual.ws.WSCallOperation.
  • name: Operation name. Used in the Flow section to associate workflow nodes to VCL operations.

and its subelements:

  • Description,
  • AxisWebServiceInvoker,
  • Proxy


AxisWebServiceInvoker

This element is used by ws-call.

Its attributes are:

  • type: invoker.
  • class: it.greenvulcano.gvesb.virtual.ws.GVWebServiceInvoker.
  • service: Service name.
  • serviceNS: Service NameSpace.
  • operation: Operation name.
  • portName: Port Name
  • timeout: Timeout in seconds.
  • ref-dp: Name of Data Provider to use to prepare the request.
  • use-saaj: 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: 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:

  • Description,
  • XPathNamespace,
  • WSDLInfo (see bellow),
  • EngageModule (see bellow)

WSDLInfo

This subelement returns a WSDL through his URL. It is used by AxisWebServiceInvoker.

Its attributes are:

  • type: wsdlinfo.
  • wsdl: WSDL file URL.

EngageModule

It is only used by AxisWebServiceInvoker. Its attributes are:

  • name: 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: Defines the class that implements the hander for the module to engage.
    The attribute's default value is:
    • it.greenvulcano.gvesb.virtual.ws.module.DefaultModuleHandler.

The attribute's admitted values are:

    • it.greenvulcano.gvesb.virtual.ws.module.rampart.RampartModuleH
    • it.greenvulcano.gvesb.virtual.ws.module.sandesha2.Sandesha2Modu
  • specification: 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 subelements:

  • Description,
  • PolicyData (see bellow),
  • ModuleProperty (see bellow).
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 attributes:

  • policy_key: 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 set.

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

  • name
  • value
  • type: The attribute's default value is String and its admitted values are:
    • String
    • Boolean
    • Byte
    • Short
    • Int
    • Long
    • Float
    • Double