Overview
While you configure a Service Group on an Intermediary with a WADL/WSDL, you may later want to retrieve the WADL/WSDL which you can obtain through the bundled SDK.
Information
Below APIs can be used to retrieve the WSDL exposed on AccessPoint.
com.actional.soapstation.task.IAccessPointTask
public String getWsdlFileUrl(String accessPointId) throws APIException;
//this method returns URL from where Wsdl can be retrieved for the specified AccessPoint.
public GeneratedWsdlContentDef generateWSDL(String accessPointId) throws APIException;
//Generates the WSDL file for the specified Access Point.
Example usage for the methods is present in SSTClient.java bundled with anttask, and snippets are presented below.
// Display information about each access point in the group.
AccessPointNode[] aps = getConfig().serviceTask.getAccessPoints(group.getKeyID());
getConfig().acervate(aps);
Arrays.sort(aps, com.actional.soapapi.Util.COMPARATOR_BASEDATA_KEYNAME);
for (int i = 0, s = Util.length(aps); i < s; i++)
{
AccessPointNode ap = aps[i];
...
infoField(2, "Client WSDL/WADL", getConfig().apTask.getWsdlFileUrl(ap.getKeyID()));
// display the WSDL content
GeneratedWsdlContentDef wsdlContent = getConfig().apTask.generateWSDL(ap.getKeyID()); if (wsdlContent != null)
{ Blob content = wsdlContent.getContent(); if (content != null) { byte[] bytes = content.getBytes(); if (bytes != null) { infoField(2, "WSDLContent", new String(bytes)); } } }
}
Note that getWsdlFileUrl
returns the public WADL/WSDL only (application.wadl/application.json) and generateWSDL
can only get the WADL/WSDL content loaded in Intermediary memory and XML file. Due to security requirements, we cannot expose the original file's location and thus allow access to the file system.