Difference between revisions of "Bottom-up development method"

From GreenVulcano Wiki
Jump to: navigation, search
(Wizard bottom-up development method)
(Example)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== '''Wizard bottom-up development method''' ==
 
== '''Wizard bottom-up development method''' ==
 
[[File:ws1.png|thumb|WebService Wizard first window]]
 
[[File:ws1.png|thumb|WebService Wizard first window]]
Wizard bottom-up development method helps user to create a {{GVESB}} service as a [http://en.wikipedia.org/wiki/Web_service Web Services]. Right click on GVServices-->Services label and select "Wizard New WebService...".
+
Wizard bottom-up development method helps user to publish a {{GVESB}} service as a [http://en.wikipedia.org/wiki/Web_service Web Service]. Right click on GVServices-->Services label and select "Wizard New WebService...".
 
New WebService Wizard window will be open.
 
New WebService Wizard window will be open.
 
Fill the window fields as following:
 
Fill the window fields as following:
 
*In the "WebService name" field set the WebService name that you want to publish
 
*In the "WebService name" field set the WebService name that you want to publish
*In the "target namespace" field you can change the default operation target namespace proposed
+
*In the "target namespace" field you can change the proposed default operation target namespace
*In the "Operation" field choose the operation to bind from list proposed
+
*In the "Operation" field choose the operation to bind from the proposed list
 
[[File:ws2.png|thumb|WebService Wizard second window ]]
 
[[File:ws2.png|thumb|WebService Wizard second window ]]
 
On the second page you can change:
 
On the second page you can change:
 
*Soap Action and the mapped operation name to the WebService, This optional property is set on an outgoing SOAP/JMS request message to indicate the SoapAction value associated with the Web Services request. This property is similar to the SoapAction HTTP header used when transporting Web Service requests over an HTTP transport. The value of the SoapAction property is a URI identifying the intent of the SOAP request. If the SoapAction property is specified, it is used by the server component to determine the target of the request. The SOAP specification places no restrictions on the format or specificity of the URI or that it is resolvable. Typically, this property is set to the SoapAction value from the WSDL document.
 
*Soap Action and the mapped operation name to the WebService, This optional property is set on an outgoing SOAP/JMS request message to indicate the SoapAction value associated with the Web Services request. This property is similar to the SoapAction HTTP header used when transporting Web Service requests over an HTTP transport. The value of the SoapAction property is a URI identifying the intent of the SOAP request. If the SoapAction property is specified, it is used by the server component to determine the target of the request. The SOAP specification places no restrictions on the format or specificity of the URI or that it is resolvable. Typically, this property is set to the SoapAction value from the WSDL document.
 
[[File:ws3.png|thumb|WebService Wizard third window]]
 
[[File:ws3.png|thumb|WebService Wizard third window]]
On the third page you can choose your preferred transport protocol. Properties indicate the version number of the protocol used by the client and server.If the SOAP request message represents a two-way request, the client component must set the JMS message.
+
On the third page you can choose your preferred [[GVWebServices#Transport|transport]] protocol. Properties indicate the version number of the protocol used by the client and server.If the SOAP request message represents a two-way request, the client component must set the JMS message.
 
*Soap Transport
 
*Soap Transport
 
*Soap12 Transport
 
*Soap12 Transport
Line 28: Line 28:
 
[[File:ws4.png|thumb|WebService Wizard fourth window]]
 
[[File:ws4.png|thumb|WebService Wizard fourth window]]
 
On the last page you must choose:
 
On the last page you must choose:
*The Web Service input type
+
*The Web Service input type, used to choose what must be passes as input to the workflow:
*The [[Data provider]] name
+
**context        : the [http://axis.apache.org/axis2/java/core/api/org/apache/axis2/context/MessageContext.html MessageContext]
 +
**envelope        : the envelope as XML serialized string
 +
**body            : the body as XML serialized string
 +
**body-element    : the first child of body as XML serialized string
 +
**header          : the header as XML serialized string
 +
**envelope-om    : the envelope as [http://ws.apache.org/axiom/apidocs/org/apache/axiom/soap/SOAPEnvelope.html SOAPEnvelope] object
 +
**body-om        : the body as [http://ws.apache.org/axiom/apidocs/org/apache/axiom/soap/SOAPBody.html SOAPBody] object
 +
**body-element-om : the first child of body as [http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html OMElement] object
 +
**header-om      : the header as [http://ws.apache.org/axiom/apidocs/org/apache/axiom/soap/SOAPHeader.html SOAPHeader] object
 +
*The [[Data provider]] name, used to adapt the workflow output to the Web service output
 
And optionally:
 
And optionally:
 
*The input XSD name
 
*The input XSD name
Line 36: Line 45:
 
*HTTP or HTTPS
 
*HTTP or HTTPS
 
*Web Service's target namespace is in the XSD or it is that proposed by default
 
*Web Service's target namespace is in the XSD or it is that proposed by default
*Use the original wsdl or not
+
*Use the original, already provided, wsdl or create a new one
  
 
== Example ==
 
== Example ==
Line 46: Line 55:
 
!  
 
!  
 
|-
 
|-
| Credit Card
+
| echo_ws
| withdrawal
+
| echo
| This operation.............................................................
+
| This operation gets the user input and returns itself to user.
| [[Example 1]]
+
| [[echo_ws bottom-up method]]
 
|-
 
|-
| Credit Card
+
| toupper_ws
| Saldo
+
| toupper
| This operation.............................................................
+
| This operation gets the user input and returns it in uppercase.
| [[Example 2]]
+
| [[toupper_ws bottom-up method]]
 +
|-
 +
| getAnagrafica_ws
 +
| getAnagrafica
 +
| This operation call a {{GVESB}} service getAnagrafica. This service execute a query on db and return all user an table anagrafica.
 +
| [[getAnagrafica_ws bottom-up method]]
 
|}
 
|}

Latest revision as of 10:33, 13 February 2012

Wizard bottom-up development method

WebService Wizard first window

Wizard bottom-up development method helps user to publish a GreenVulcano® ESB service as a Web Service. Right click on GVServices-->Services label and select "Wizard New WebService...". New WebService Wizard window will be open. Fill the window fields as following:

  • In the "WebService name" field set the WebService name that you want to publish
  • In the "target namespace" field you can change the proposed default operation target namespace
  • In the "Operation" field choose the operation to bind from the proposed list
WebService Wizard second window

On the second page you can change:

  • Soap Action and the mapped operation name to the WebService, This optional property is set on an outgoing SOAP/JMS request message to indicate the SoapAction value associated with the Web Services request. This property is similar to the SoapAction HTTP header used when transporting Web Service requests over an HTTP transport. The value of the SoapAction property is a URI identifying the intent of the SOAP request. If the SoapAction property is specified, it is used by the server component to determine the target of the request. The SOAP specification places no restrictions on the format or specificity of the URI or that it is resolvable. Typically, this property is set to the SoapAction value from the WSDL document.
WebService Wizard third window

On the third page you can choose your preferred transport protocol. Properties indicate the version number of the protocol used by the client and server.If the SOAP request message represents a two-way request, the client component must set the JMS message.

  • Soap Transport
  • Soap12 Transport
  • Rest Transport
  • JMS Transport

If you choose Rest Transport, you must additionally select the verb for the operation. If you choose JMS Transport, you must additionally:

  • Select the JMS connection factory
  • Set the JMS destination name
  • Set JMS destination type
  • Reply destination: Destination where a reply will be posted
  • Content Type: This property is similar to the Content-Type header found in an HTTP message and is used to describe the content type of the message
  • ByteMessage
  • TextMessage
WebService Wizard fourth window

On the last page you must choose:

  • The Web Service input type, used to choose what must be passes as input to the workflow:
    • context  : the MessageContext
    • envelope  : the envelope as XML serialized string
    • body  : the body as XML serialized string
    • body-element  : the first child of body as XML serialized string
    • header  : the header as XML serialized string
    • envelope-om  : the envelope as SOAPEnvelope object
    • body-om  : the body as SOAPBody object
    • body-element-om : the first child of body as OMElement object
    • header-om  : the header as SOAPHeader object
  • The Data provider name, used to adapt the workflow output to the Web service output

And optionally:

  • The input XSD name
  • The output XSD name

Lastly check the preferred Radio Button for:

  • HTTP or HTTPS
  • Web Service's target namespace is in the XSD or it is that proposed by default
  • Use the original, already provided, wsdl or create a new one

Example

Web Service name Operation Description
echo_ws echo This operation gets the user input and returns itself to user. echo_ws bottom-up method
toupper_ws toupper This operation gets the user input and returns it in uppercase. toupper_ws bottom-up method
getAnagrafica_ws getAnagrafica This operation call a GreenVulcano® ESB service getAnagrafica. This service execute a query on db and return all user an table anagrafica. getAnagrafica_ws bottom-up method