developer:soap:methods:createbatchupload

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
developer:soap:methods:createbatchupload [2009/07/24 16:57]
tem
developer:soap:methods:createbatchupload [2009/09/08 11:42] (current)
charlie
Line 188: Line 188:
 </​code>​ </​code>​
  
 +==== Java ====
  
 +This example uses the [[developer/​javalibrary|USAePay Java library]]. ​ For directions on how to install the library and create the token/​client objects, go to either the [[..:​howto:​javajaxrpc|Java JAX-RPC Howto]] or the [[..:​howto:​javajaxws|Java JAX-WS Howto]].
 +
 +<code java>
 +try {
 + // Create request object
 + String FileName = "​ExampleFile.csv";​
 + String Format = "​csv";​
 + String Encoding = "​base64";​
 + StringArray Fields = new StringArray();​
 + Fields.add("​invoice"​);​
 + Fields.add("​cardholder"​);​
 + Fields.add("​avsstreet"​);​
 + Fields.add("​avszip"​);​
 + Fields.add("​ccnum"​);​
 + Fields.add("​ccexp"​);​
 + Fields.add("​amount"​);​
 + String RawData = "​12345,​John Doe,1234 Test St,​54321,​4000100011112224,​1012,​1.23\n54321,​Joe Test,4321 Example St,​12345,​4000100111112223,​0313,​12.34";​
 +
 + BASE64Encoder encoder = new BASE64Encoder();​
 + String Data = encoder.encodeBuffer(RawData.getBytes()); ​   ​
 +
 + boolean AutoStart = true;
 + boolean OverrideDuplicates = true;
 +
 + // Create response object
 + BatchUploadStatus response;
 +
 +response = client.createBatchUpload(token,​ FileName,​AutoStart,​Format,​Encoding,​Fields,​Data,​OverrideDuplicates);​
 + } catch (Exception e) {
 +     System.out.println("​Soap Exception: " + e.getMessage());​
 + }
 +</​code>​
  
  
  
developer/soap/methods/createbatchupload.txt ยท Last modified: 2009/09/08 11:42 by charlie

Page Tools