Ascio Web Service v3
Java Axis UploadMessage
UploadMessageResponse UploadMessage(SecurityHeaderDetails securityHeader,UploadMessageRequest request)
Response codes
ResultCode | Message | Value |
---|---|---|
200 | OK | |
401 | Authorization failed | |
404 | Object not found |
UploadMessage Request
Property |
---|
request |
UploadMessageResponse
Property | Description |
---|---|
UploadMessageResult | |
MessageId | Example: 1 |
ResultCode | Example: 1 |
ResultMessage | |
Errors |
Used in Classes
Java Axis example
package ascio.v3.examples;
import java.util.Calendar;
import com.ascio.www._2013._02.*;
import ascio.lib.*;
public class UploadMessageExample {
public static UploadMessageResponse main() {
AscioConfig config = new AscioConfig();
V3 env = config.getTesting().getV3();
String fileContentString = "abc123";
Attachment attachment = new Attachment();
attachment.setFileName("anything.jpg");
attachment.setContent(fileContentString.getBytes());
ArrayOfAttachmentAttachment attachments[] = new ArrayOfAttachmentAttachment[]{attachment};
Message message = new Message();
message.setAttachments(attachments);
message.setBody("BodyTest");
message.setCreated(Calendar.getInstance());
message.setFromAddress("administrator@ascio-test-domain.com");
message.setSubject("base64-encoded or 7 Bit ASCII");
message.setToAddress("ToAddressTest");
message.setType(MessageType.MessageToPartner);
UploadMessageRequest request = new UploadMessageRequest();
request.setOrderId("TEST123456");
request.setMessage(message);
try {
UploadMessageResponse response = env.getClient().uploadMessage(request);
System.out.println("response\n");
System.out.println("UploadMessage Code\t:" + response.getResultCode());
System.out.println("UploadMessage Message\t: " + response.getResultMessage());
if(response.getResultCode() > 200){
for(String error : response.getErrors()) {
System.out.print(error);
}
}
return response;
} catch (Exception e) {
System.out.print(e);
}
return new UploadMessageResponse();package ascio.v3.examples;
import java.util.Calendar;
import com.ascio.www._2013._02.*;
import ascio.lib.*;
public class UploadMessageExample {
public static UploadMessageResponse main() {
AscioConfig config = new AscioConfig();
V3 env = config.getTesting().getV3();
String fileContentString = "abc123";
Attachment attachment = new Attachment();
attachment.setFileName("anything.jpg");
attachment.setContent(fileContentString.getBytes());
ArrayOfAttachmentAttachment attachments[] = new ArrayOfAttachmentAttachment[]{attachment};
Message message = new Message();
message.setAttachments(attachments);
message.setBody("BodyTest");
message.setCreated(Calendar.getInstance());
message.setFromAddress("administrator@ascio-test-domain.com");
message.setSubject("base64-encoded or 7 Bit ASCII");
message.setToAddress("ToAddressTest");
message.setType(MessageType.MessageToPartner);
UploadMessageRequest request = new UploadMessageRequest();
request.setOrderId("TEST123456");
request.setMessage(message);
try {
UploadMessageResponse response = env.getClient().uploadMessage(request);
System.out.println("response\n");
System.out.println("UploadMessage Code\t:" + response.getResultCode());
System.out.println("UploadMessage Message\t: " + response.getResultMessage());
if(response.getResultCode() > 200){
for(String error : response.getErrors()) {
System.out.print(error);
}
}
return response;
} catch (Exception e) {
System.out.print(e);
}
return new UploadMessageResponse();
WSDL for AWS v3
https://aws.demo.ascio.com/v3/aws.wsdl (OTE)
https://aws.ascio.com/v3/aws.wsdl (Live)
Please configure the IP-Whitelisting in the portal/demo-portal.
https://aws.demo.ascio.com/v3/aws.wsdl (OTE)
https://aws.ascio.com/v3/aws.wsdl (Live)
Please configure the IP-Whitelisting in the portal/demo-portal.