Open-Xchange-SOAP-WSDL2JAVA

From Open-Xchange
Revision as of 08:40, 20 December 2011 by Choeger (talk | contribs) (Created page with "= How to provision Open-Xchange with Java and SOAP = == Generating code with wsdl2java from Axis2 == See the sample script below on how to generate stubs for the Open-Xchange p...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to provision Open-Xchange with Java and SOAP

Generating code with wsdl2java from Axis2

See the sample script below on how to generate stubs for the Open-Xchange provisioning APIs.

#!/bin/bash

DEST=/home/someuser/workspace/axistest
AXISPATH=/home/someuser/axis2-1.5.6
OXURL=http://localhost/servlet/axis2/services
JAVA_HOME=/usr/lib/jvm/java-6-sun

for class in Context User Group Resource; do
       lname=$(echo $class | tr '[:upper:]' '[:lower:]')
       if [ -d $DEST/$lname ]; then
               rm -rf $DEST/$lname
       fi
       $AXISPATH/bin/wsdl2java.sh -p ox${lname} -u -uw -sp -uri $OXURL/OX${class}Service?wsdl -o $DEST/$lname -ns2p http://soap.admin.openexchange.com=admin.soap.${lname},http://dataobjects.soap.admin.openexchange.com/xsd=admin.soap.${lname}.dataobjects,http://dataobjects.rmi.admin.openexchange.com/xsd=admin.rmi.${lname}.dataobjects,http://exceptions.rmi.admin.openexchange.com/xsd=admin.rmi.${lname}.exceptions,http://rmi.java/xsd=admin.rmi.${lname},http://io.java/xsd=admin.javaio.${lname}
done

The script generates stubs for each of the Context, User, Group and Resource API within a separate directory.