Simple Java quickstart for playing with the Zuora API and simplify your java project(s). You can either:
git cloneor fork this project and add your customer-specific code to it- or better you can
git clonethis repository then declare it as a dependency in your other project
Extract from the pom.xml file of your other project:
<dependency>
<groupId>com.zuora</groupId>
<artifactId>z-java</artifactId>
<version>0.1</version>
</dependency>If you find bugs and/or add functionalities, please create a pull request.
This is a sample project to build the stub classes for using the Zuora SOAP API. Based on the WSDL downloaded from your Zuora tenant, you can then generate a JAR file to include in your projects and/or add this whole project as a Maven Dependency in your other projects.
First, clone the github repository on your computer
git clone https://github.com/mpham-zuora/z-java.git
cd z-java
Copy the sample properties files and edit it to add your credentials
cp src/main/resources/config.sample.properties src/main/resources/config.properties
Build the JAR file
mvn package
- Add your WSDL to the
src/main/wsdlfolder - Edit the
pom.xmlfileline 123and change the value for your WSDL name mvn packageand that's it!
mvn install
ZApi zapi = new ZApi();
// This should be called before any other call
zapi.zLogin();
// Example on how to do a query
QueryResult result = zapi.zQuery("SELECT AccountNumber, Name FROM Account");- This works perfectly with the Heroku Java Quickstart as long as you define
z-javaas an unmanaged dependency - Unfortunately,
z-javais not working when embedded in an Android application, as Apache Axis 2 relies on core libraries (javax.xml.*) which are not part of the Dalvik virtual machine