Simple Java quickstart for playing with the Zuora API and simplify your java project(s). You can either:
git clone
or fork this project and add your customer-specific code to it- or better you can
git clone
this 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.2</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/abaenglish/z-java.git
cd z-java
You need create config files with credentials apisandbox in this path:
src/main/resources/application.yml
Example:
external:
zuora:
soap:
username: the_username
password: the_password
host: apisandbox.zuora.com
To run the tests, you have to create the file:
src/main/resources/config.properties
With this content:
# Zuora API user credentials (required)
username = the_username
password = the_password
endpoint = https://apisandbox.zuora.com/apps/services/a/79.0
Build the JAR file
mvn package
- Add your WSDL to the
src/main/wsdl
folder - Edit the
pom.xml
fileline 123
and change the value for your WSDL name mvn package
and that's it!
This WSDL has changed some attributes in method Subscription (PLEASE MANTAIN THIS CHANGES WHEN UPDATE WSDL):
- ContractEffectiveDay date -> string
- ServiceActivationDate date -> string
- TermStartDate date -> string
- ContractAcceptanceDate date -> string
This WSDL has changed some attributes in method Amendment (PLEASE MANTAIN THIS CHANGES WHEN UPDATE WSDL):
- ContractEffectiveDate date -> string
- CustomerAcceptanceDate date -> string
- CustomerAcceptanceDate date -> string
- ServiceActivationDate date -> string
- SpecificUpdateDate date -> string
- TermStartDate date -> string
If you have problems with this generate code you change IntelliJ IDEA.
How can I change this properties?
You go terminal and write:
nano /Applications/IntelliJ\ IDEA.app/Contents/bin/idea.properties
and modify:
idea.max.intellisense.filesize=2500
for:
idea.max.intellisense.filesize=250000
You have more info in:
How can I change idea.properties
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");