Difference between revisions of "GVWebServices"

From GreenVulcano Wiki
Jump to: navigation, search
(WSOperation)
(Binding)
Line 201: Line 201:
 
* commit-before-reply : The invocation is performed in transactional mode and the commit is carried out immediately before returning the response to clients.
 
* commit-before-reply : The invocation is performed in transactional mode and the commit is carried out immediately before returning the response to clients.
 
* commit-after-reply : The invocation is performed in transactional mode and the commit is carried out immediately after returning the response to clients.
 
* commit-after-reply : The invocation is performed in transactional mode and the commit is carried out immediately after returning the response to clients.
 +
|}
 +
 +
=====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'.
 +
 +
Follows 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:UsernameTokensp:
 +
                        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 by EngageModule, WSOperation.
 +
 +
The following table shows the PolicyData element's attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| policy_key || required || Defines the key to set the policy for the service invocation.
 +
The attribute's admitted values are:
 +
* rampartPolicy
 
|}
 
|}

Revision as of 08:18, 13 February 2012

Description

The element GVWebServices allows to define the Web Services implemented by GreenVulcano® ESB.

VulCon / GV Console Configuration

The GVWebServices Element is present in the VulCon Adapter view, as a GVAdapters subelement.

The following table shows GVWebServices the element's attributes:

Attribute Type Description
version fixed This attribute must assume the value 1.0.
type fixed This attribute must assume the value module.
name fixed This attribute must assume the value WEB_SERVICES.

Its subelements are:

GreenVulcanoWebServices

This element represents the GreenVulcano® ESB Web Services definition.

Its subelements are:

  • Description
  • GreenVulcanoWebService

GreenVulcanoWebService

The key that identifies the service is given either by the field id-key, or by the triple system/service/operation:

  • If this key is not satisfied we will use the default inputObjectDataProviders and outputObjectDataProviders
  • If the defaults are not defined an exception will be thrown.

The following table shows the GreenVulcanoWebService element's attributes:

Attribute Type Description
type fixed This attribute must assume the value greenvulcanowebservice.
id-key optional The attribute's value can't be null.
id-service optional Service
id-system optional System
id-primitive required Primitive to invoke. The attribute's admitted values are:
  • Request
  • RequestReply
  • GetReply
  • GetRequest
  • SendReply

BusinessWebServices

Business web services definition on Axis2.

The following table shows the BusinessWebServices element's attributes:

Attribute Type Description
wsdl-directory required Directory containing the generated WSDL for the services exposed through Axis2.
services-directory required Directory containing the services generated from a WSDL using Axis2.
authenticated-http-soap-address optional This is the default URL that is used to build the soap:

address for Web Services that require authentication exposed with http protocol. This URL can be overridden on different services. If not specified will be required to define it on the services. The final URL will be formed by concatenating the name of the service: default-soap-address/service

authenticated-https-soap-address optional This is the default URL that is used in the build the soap:address for web services that require authentication exposed with https protocol.

This URL can be overridden on different services. If not specified will be required to define it on the services. The final URL will be formed by concatenating the name of the service: default-soap-address/service

http-soap-address optional This is the default URL that is used in the build the soap:address for web services that not require authentication exposed with http protocol.

This URL can be overridden on different services. If not specified will be required to define it on the services. The final URL will be formed by concatenating the name of the service: default-soap-address/service

https-soap-address optional This is the default URL that is used in the build the soap:address for web services that not require authentication exposed with https protocol.

This URL can be overridden on different services. If not specified will be required to define it on the services. The final URL will be formed by concatenating the name of the service: default-soap-address/service

Its subelements are:

  • Description
  • WebService

WebService

This element allows to define a business web services.

The following table shows the WebService element's attributes:

Attribute Type Description
web-service required The attribute's value can't be null.
force-https optional The attribute's admitted values are:
  • true
  • false
soap-address optional Il soap:address will be exactly the here specified url.

As a difference with the default-soap-address, it won't be made any composition with the service name. If default-soap-address is not specified, this is mandatory. The attribute's value can't be null.

input-xsd optional The path of the XSD that defines the types of input that will be declared in the generated WSDL.

May contain an absolute path or a relative path, in which case, is relative to ${{gv.app.home}}/xmlconfig/xsds. May contain placeholders. May also include the types of output, in this case does not specify the parameter 'output-xsd'. The attribute's value can't be null.

output-xsd optional The path of the XSD that defines the types of output that will be declared in the generated WSDL.

May contain an absolute path or a relative path, in which case, is relative to ${{gv.app.home}}/xsds. If not specified only the parameter 'input-xsd' will be used. The attribute's value can't be null.

targetNS-from-xsd optional Defines if the target namespace of the types in the WSDL shall be that specified in the XSD input. If "false", the target namespace is: http://www.greenvulcano.it/greenvulcano

The attribute's admitted values are:

  • true
  • false
useOriginalwsdl optional The attribute's admitted values are:
  • true
  • false

Its subelements are:


WSOperation

This element defines the Web Service Operation.

The following table shows the WSOperation element's attributes:

Attribute Type Description
operation-qname required Qualified Name (QName) of the operation exposed by the web service.

If the namespace is present, it must be specified in braces: {namespace}localname

soap-action optional MIME Header SOAPAction of the HTTP request.

If not specified is set to SERVICE/OPERATION

ref-dp optional DataProvider to be used for sending the reply to the caller.

The DataProvider will return a MessageContext to be sent as a reply. If not used, the webservice adapter expects a org.apache.axiom.soap.SOAPEnvelope as a field object of GVBuffer.

It has the subelements:

Binding

Defined by the triple gv-system/gv-service/gv-operation.

The following table shows the Binding element's attributes:

Attribute Type Description
gv-service required ID service with which to perform the invocation of GreenVulcano® ESB
gv-system optional ID system with which to perform the invocation of GreenVulcano® ESB
gv-operation required GreenVulcano® ESB operation to invoke.
transaction-timeout-secs optional Transaction timeout in seconds.
inputType 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

transaction optional Indicates whether the invocation to be performed in GreenVulcano® ESB is transactional or not.

The possible values are:

  • none : The invocation is performed in non transactional mode.
  • commit-before-reply : The invocation is performed in transactional mode and the commit is carried out immediately before returning the response to clients.
  • commit-after-reply : The invocation is performed in transactional mode and the commit is carried out immediately after returning the response to clients.
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'.

Follows 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:UsernameTokensp: 
                        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 by EngageModule, WSOperation.

The following table shows the PolicyData element's attributes:

Attribute Type Description
policy_key required Defines the key to set the policy for the service invocation.

The attribute's admitted values are:

  • rampartPolicy