This is a problem if, for example, your management have negotiated an SLA which completely locks you out of your own server, but you need to upload a very large amount of documents to different locations. (The bulk upload tool only lets you put them in one place. The other tools require you to set up a file structure on the same server as Matrix is installed on.)
The following Java code snippet should help, showing how to upload a file with the Squiz Matrix SOAP API. It assumes you have generated the source code for the client using wsimport and added that web services client source to your project.
At present I have this working by making the intended 'parent' and the SOAP service asset in Matrix set to have 'public' write permissions, which is not such great security. But it works. Might investigate security more later.
Also, if you're not getting errors back, check the error log in Squiz.
private final edu.somewhere.www._web_services.soap.MatrixWebServices mwservices = new edu.somewhere.www._web_services.soap.MatrixWebServices();
// private final edu.somewhere.www._web_services.soap.MatrixSOAPService servicess = new edu.somewhere.www._web_services.soap.MatrixSOAPService();
MatrixSOAPService port = mwservices.getMatrixWebServicesPort();
Holder<String> NewAssetIDOut = new Holder<String>();
Holder<String> createMsgOut = new Holder<String>();
File file = new File("/path/to/my/TestWordFile.docx");
byte[] pdfBytes = Files.readAllBytes(file.toPath());
String fileContentsEncoded = Base64.encode(pdfBytes);
List<AttributeInfo> attributeInfo = new ArrayList<AttributeInfo>();
port.createAsset(
// @WebParam(name = "TypeCode", targetNamespace = "")
// AssetType typeCode,
AssetType.WORD_DOC,
// @WebParam(name = "Name", targetNamespace = "")
// String name,
"TestWordFile",
// @WebParam(name = "ParentID", targetNamespace = "")
// String parentID,
"84985",
// @WebParam(name = "LinkType", targetNamespace = "")
// String linkType,
"2",
// @WebParam(name = "LinkValue", targetNamespace = "")
// String linkValue,
"84985",
// @WebParam(name = "SortOrder", targetNamespace = "")
// Integer sortOrder,
0,
// @WebParam(name = "IsDependant", targetNamespace = "")
// String isDependant,
"TRUE",
// @WebParam(name = "IsExclusive", targetNamespace = "")
// String isExclusive,
"TRUE",
// @WebParam(name = "FileName", targetNamespace = "")
// String fileName,
"TestWordFile.docx",
// @WebParam(name = "FileContentBase64", targetNamespace = "")
// String fileContentBase64,
fileContentsEncoded,
// @WebParam(name = "AttributeInfo", targetNamespace = "")
// List<AttributeInfo> attributeInfo,
attributeInfo,
// @WebParam(name = "NewAssetID", targetNamespace = "", mode = WebParam.Mode.OUT)
// Holder<String> newAssetID,
NewAssetIDOut,
// @WebParam(name = "CreateMessage", targetNamespace = "", mode = WebParam.Mode.OUT)
// Holder<String> createMessage);
createMsgOut);
System.out.println( "created??" + NewAssetIDOut.value + " ~~ " + createMsgOut.value);