Toupper ws bottom-up method

From GreenVulcano Wiki
Revision as of 21:36, 9 February 2012 by F.albanese (talk | contribs) (Created page with "We start from a {{GVESB}} service "toupper" that simply returns the user input in uppercase mode. Once launched bottom-up development method wizard and inserted all paramete...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

We start from a GreenVulcano® ESB service "toupper" that simply returns the user input in uppercase mode.

Once launched bottom-up development method wizard and inserted all parameters, VulCon® creates the WSDL file describing our service.

This is the "toupper_ws.wsdl" generated, assuming that we have chosen the REST transport protocol with GET verb:

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.greenvulcano.it/greenvulcano"
                  xmlns:gv="http://www.greenvulcano.it/greenvulcano"
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                  xmlns:soapjms="http://www.w3.org/2010/soapjms/"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <wsdl:types>
        <xsd:schema elementFormDefault="qualified"
                    targetNamespace="http://www.greenvulcano.it/greenvulcano"/>
    </wsdl:types>
    <wsdl:message name="TOUPPER#GVESBRequest">
        <wsdl:part element="gv:TOUPPER#GVESB" name="parameters"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="TOUPPER#GVESBResponse">
        <wsdl:part element="gv:TOUPPER#GVESBResponse" name="parameters"></wsdl:part>
    </wsdl:message>
    <wsdl:portType name="toupper_wsPortType">
        <wsdl:operation name="TOUPPER#GVESB">
            <wsdl:input message="gv:TOUPPER#GVESBRequest" name="TOUPPER#GVESBRequest"></wsdl:input>
            <wsdl:output message="gv:TOUPPER#GVESBResponse" name="TOUPPER#GVESBResponse"></wsdl:output>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="toupper_ws_HttpBinding" type="gv:toupper_wsPortType">
        <http:binding verb="GET"/>
        <wsdl:operation name="TOUPPER#GVESB">
            <http:operation location="toupper_ws/TOUPPER#GVESB"/>
            <wsdl:input name="TOUPPER#GVESBRequest">
                <mime:content part="TOUPPER#GVESBRequest" type="text/xml"/>
            </wsdl:input>
            <wsdl:output name="TOUPPER#GVESBResponse">
                <mime:content part="TOUPPER#GVESBRequest" type="text/xml"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="toupper_ws">
        <wsdl:port binding="gv:toupper_ws_HttpBinding" name="toupper_ws_HttpBinding">
            <http:address location="http://localhost:8080/gvaxis2/services/toupper_ws"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

VulCon creates also the "toupper_ws.aar" that contains the "toupper_ws.wsdl" and the "services.xml". This AAR will be used by GreenVulcano® ESB for deploying our new Web Service.

Now we must only insert our generated elements in GreenVulcano® ESB installation directory:

  • Copy the "toupper_ws.wsdl" in folder "GreenV/xmlconfig/wsdl".
  • Copy the "toupper_ws.aar" in folder "GreenV/webservices/services".

Opening the GV Console in the section "Web Service"->"WSDL", we can see in the top area the Web Service description that is present in the "GVAdapter.xml" file. In the bottom area we can see our "echo_ws.wsdl" that is ready to be deployed, just check it and click the "Deploy" button.

Finally we can see our new Web Service in Axis2 console.