Wsdl development

# check out the branch of transfer-interface for new wsdl development:
~/tmp $ cvs co -r glite-data-transfer-interface_branch_4_0_0_0 org.glite.data.transfer-interface

ZSI

Installation

# download ZSI 2.0 through the homepage http://pywebsvcs.sourceforge.net 
# or use the direct link http://surfnet.dl.sourceforge.net/sourceforge/pywebsvcs/ZSI-2.0.tar.gz
~/tmp $ wget http://surfnet.dl.sourceforge.net/sourceforge/pywebsvcs/ZSI-2.0.tar.gz

# ZSI 2.0 is incompatible with ZSI 1.7, used by the ETICS client, so it's better not to install the library
# Instead, extract the tar.gz file to some location and update the PYTHONPATH accordingly:
~/tmp $ tar -zxf ZSI-2.0.tar.gz
~/tmp $ export PYTHONPATH="${PWD}/ZSI-2.0/:${PYTHONPATH}"

# If you want to run the test python server, you must patch the fault.py file as 
# described in http://pywebsvcs.sourceforge.net/cookbook.pdf
# Otherwise, you can use the diff file under the /test/python folder 
~/tmp/ZSI-2.0/ZSI $ patch -p0 < ~/tmp/org.glite.data.transfer-interface/test/python/fault.diff

Notes

xmlns attributes: pay attention to put the correct path in xmlns attributes, otherwise ZSI will produce incorrect code without showing any warning message.

For example:

<wsdl:definitions
    ...
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"        <-- Missing '/' at the end
    >

<wsdl:definitions
    ...
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"       <-- Ok
    >

The first definition (missing '/'), the wsdl2py tool generates an empty locator class for the service (completely empty, without even a 'pass' statement).

<wsdl:definitions
    ...
    xmlns:xs="http://www.w3.org/2001/XMLSchema/">            <-- Extra '/' at the end 

<wsdl:definitions
    ...
    xmlns:xs="http://www.w3.org/2001/XMLSchema">             <-- Ok

With the first definition (extra '/') ZSI will fail loading 'base' attribute of restrictions, at least for types extending string.

Problem with nillable double elements: the client does not deserialize correctly a missing double element, raising an exception, even if it was declared as nillable in the schema.

Restrictions: ZSI handles simple types with restrictions, however it does not enforce them, at least for enumerated types.

Generate WSDL / code

Creating the base workspace:

etics-workspace-setup
etics-get-project org.glite
etics-checkout --ignorelocking --project-config glite_branch_3_1_0_dev -c glite-data_branch_3_1_0_axis2 org.glite.data
etics-build org.glite.data.transfer-fts

One should download Axis2 and set axis2.location in the location.properties of these components:

wget http://apache.zone-h.org/ws/axis2/1_4_1/axis2-1.4.1-bin.zip
unzip axis2-1.4.1-bin.zip
echo "axis2.location=$PWD/axis2-1.4.1" >> org.glite.data.transfer-fts/location.properties
chmod +x $PWD/axis2-1.4.1/bin/*.sh
cp org.glite.data.transfer-fts/location.properties org.glite.data.transfer-interface/location.properties

And then one can generate a new WSDL (do not forget to set JAVA_HOME):

cd org.glite.data.transfer-interface
ant generate2.wsdl.fts

And use the WSDL to for a new web service endpoint:

cd org.glite.data.transfer-fts
ant channel.soap.generate2


Last edit: ZsoltMolnar on date
Number of topics: 1

Maintainers: PaoloTedesco, ZsoltMolnar


Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r13 - 2009-02-19 - ZsoltMolnar
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EGEE All webs login

This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Ask a support question or Send feedback