Difference between revisions of "GetAnagrafica ws bottom-up method"
(→Web Service wizard) |
(→SYSTEM SECTION) |
||
Line 3: | Line 3: | ||
Let's start from a {{GVESB}} [[service]] "getAnagrafica" that simply returns the anagrafic data present in table ''Anagrafica''. | Let's start from a {{GVESB}} [[service]] "getAnagrafica" that simply returns the anagrafic data present in table ''Anagrafica''. | ||
− | == | + | == System section == |
The first image shows how to create an operation system section. | The first image shows how to create an operation system section. | ||
In the tag system let's define a new Channel "CH_DB" and add a [[db-call]] operation, in [[db-call]] operation set the parameters for the Element DBOoperation, Statement and ResultSet: | In the tag system let's define a new Channel "CH_DB" and add a [[db-call]] operation, in [[db-call]] operation set the parameters for the Element DBOoperation, Statement and ResultSet: |
Revision as of 17:37, 13 February 2012
Definition
Let's start from a GreenVulcano® ESB service "getAnagrafica" that simply returns the anagrafic data present in table Anagrafica.
System section
The first image shows how to create an operation system section. In the tag system let's define a new Channel "CH_DB" and add a db-call operation, in db-call operation set the parameters for the Element DBOoperation, Statement and ResultSet:
- DBOperations-->DataSourceConnection
- jndi-name: insert the name of jndi DataSource in this example ds.anagrafica
- Statement
- StatementValue: in this field insert the following query "select cognome,nome,citta from anagrafica"
- ResultSet-->QueryFormatter
- type: choose base_formatter
- structure: ONLY_DATA, remember if you don't want also metadata form query select for filed structure the value ONLY_DATA
The system section has been configured.
SERVICE SECTION
This section shows the getAnagrafica service configuration. To configure the service do the following steps:
- On the elements Service add a service with name "getAnagrafica".
- On the "request" node set db-call as operation
- As output-service set a xsl trasformation to transform the data as Web Service XSD expected.
To create a new trasformation go in section GvDataTrasformation and execute the following steps:
- On section Trasformation add new xsl trasformation
- On the opened page set:
- trasformation name:"getAnagrafica"
- Data source:Default
- xsd input: choose database.xsd
- root xsd input: RowSet (is the root element that return the query)
- xsd output: anagrafica.xsd (the schema that the Web Service expected)
- root XSD output: the root element of the xsd.
To create the xsl trasformation between the file Database.xsd and anagrafica.xsd you can use XML Data mapper tool
Web Service wizard
On service element choose bottom-up development method, on the opened page set the following parameter:
- Web Service name: getAnagrafica
- Target namespace operation: http://www.greenvulcano.it/greenvulcano
- Operation to bind: choose getAnagrafica - RequestReply
- choose soap trasport as protocol
- set input type Web Service: body (this indicate that the input at getAnagrafica service is only the body of soap request)
- set data provider name: domWSDataProvider
If you are familiary with soapui framework you can test the web service, the image "WebService soapui test" shows how to.
If you want, you can download VulCon configuration for this example.