In this topic:
Getting Started with SOAP
Before You Begin
See the API Overview.
Learn about Queries.
Resources and Endpoints
Accessible resources in Gotransverse are called Entities. Requests in SOAP rely heavily on the type of entity. For example, an instance of a billing account has a type of BillingAccount. One thing to note is that type are always in capitalized camel case, in contrast to entity names, which are always traditional camel case: billingAccount
Sample SOAP calls - SOAP snippets
Java code illustrating some SOAP queries and commands - Sample Java applications (SOAP)
Help with specific entities - Locate the entity you need to interact with through the search or in the table of contents to see parameters for the entity and example calls. An example:
All SOAP calls are made against the WSDL for your API version
|WSDL for SOAP requests (1.28)||https://my.tractbilling.com/t/s/billing/1.28?wsdl|
Set up the WSDL URL, defaulting to Tract production site.
URL wsdlURL = new URL(wsdl);
Create the service
Name serviceName = new QName("http://www.tractbilling.com/billing/1.28/service", "TractService"); TractService svc = new TractService("https://my.tractbilling.com/t/s/billing/1.28?wsdl", serviceName); Tract port = svc.getTractPort();
Specify the username/password per basic authentication specification
BindingProvider bp = (BindingProvider)port; Map<String,Object> map = bp.getRequestContext(); map.put(BindingProvider.USERNAME_PROPERTY, username); map.put(BindingProvider.PASSWORD_PROPERTY, password); return port;
Use the port variable to create the web service request.
All queries, updates, and additions in SOAP use the POST method.
You don't pass any information on your tenant in the call or the header; Gotransverse routes your call to the appropriate tenant based on your Gotransverse credentials. This means the basic header contains only your authorization credentials.
There is no content type included in SOAP calls, but all request bodies must be valid XML.
Example Call (HTTP)
This is a query for billing accounts. Note the POST method, the authorization, and the use of the BillingAccount type.
POST /t/s/billing/1.28?wsdl HTTP/1.1 Host: my.tractbilling.com Authorization: Basic aWFsZXhhbmRlci1RQTpmdWs4MzgzODMh <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:query xmlns="http://www.tractbilling.com/billing/1_28/domain" xmlns:ns2="http://www.tractbilling.com/billing/1_28/service"> <ns2:queryRequest> <simpleDataQuery> <type>BillingAccount</type> </simpleDataQuery> </ns2:queryRequest> </ns2:query> </soap:Body> </soap:Envelope>