All hash related service methods are defined within the WSDL url:
https://mygacl.trendmicro.com/ws/level-0/files?wsdl and (non-public) https://mygacl.trendmicro.com/ws/level-0/internal/files?wsdl
As a general rule of thumb, all hash based SOAP queries require at least one FileIdentifier as input parameter. Methods that require more than one identifier, return a list of results instead of a single result. If multiple results are returned, the first result corresponds to the first input identifier, the second to the second and so forth.
A FileIdentifier has 2 properties, a SHA1 and an optional MD5 hash identifying the file. MD5 is not required, though if specified both hashes are compared for maximum security (not needed in the majority of cases).
Depending on the way the SOAP stubs were created, the file identifier expects the hashes in their byte[] or hex encoded string representation (the latter is also the format used within XML).
Java Example:
// 20 byte SHA1 hash... byte[] sha1 = new BigInteger("289959da899bf03a34dd232ac70205df401098b0", 16).toByteArray(); FileIdentifier fid = new FileIdentifier(); fid.setSha1(sha1);
C# Example:
// 40 chars hex encoded SHA1 hash... string sha1 = "289959da899bf03a34dd232ac70205df401098b0"; fileIdentifier fid = new fileIdentifier(); fid.sha1 = sha1;
PHP Example:
// 40 chars hex encoded SHA1 hash... $sha1 = "289959da899bf03a34dd232ac70205df401098b0"; array("file", array("sha1" => $sha1)); // Note: In PHP the name of the identifier depends on the name of the // input parameter ("file") of the service method. If the input parameter // is a list, use array(array("sha1" => $sha1), ...).
Provide access to metadata or tag related file information using a known hash as query parameter. The returned information can be seen within the class diagrams.