I've downloaded the java example "job-submit-fax" however this is using old code (com.premiereconnect.premconn._2007._02) . I created the new classes using the WSDL com.easylink.ws.RequestResponse._2011._01)
There has been changes from com.premiereconnect.premconn._2007._02 to com.easylink.ws.RequestResponse._2011._01 and I don't know how to submit the request. Below is
the code but at the end of the code I don't know what methods to use to actually submit the request. Do you have update-to-date java examples using the new classes (com.easylink.ws.RequestResponse._2011._01)?
com.easylink.ws.JobSubmit._2011._01.MessageType JobMessage = new com.easylink.ws.JobSubmit._2011._01.MessageType();
com.easylink.ws.JobSubmit._2011._01.JobOptionsType JobOptions = new com.easylink.ws.JobSubmit._2011._01.JobOptionsType();
com.easylink.ws.JobSubmit._2011._01.FaxOptionsType FaxOptionsType = new com.easylink.ws.JobSubmit._2011._01.FaxOptionsType();
com.easylink.ws.JobSubmit._2011._01.ReportOptionsType ReportOptionsType = new com.easylink.ws.JobSubmit._2011._01.ReportOptionsType();
com.easylink.ws.JobSubmit._2011._01.DocumentType DocumentType = new com.easylink.ws.JobSubmit._2011._01.DocumentType();
com.easylink.ws.JobSubmit._2011._01.DocDataType DocDataType = new com.easylink.ws.JobSubmit._2011._01.DocDataType();
com.easylink.ws.JobSubmit._2011._01.ContentsType ContentsType = new com.easylink.ws.JobSubmit._2011._01.ContentsType();
com.easylink.ws.JobSubmit._2011._01.ContentPartType ContentPartType = new com.easylink.ws.JobSubmit._2011._01.ContentPartType();
com.easylink.ws.JobSubmit._2011._01.DeliveryItemListType ItemType = new com.easylink.ws.JobSubmit._2011._01.DeliveryItemListType();
com.easylink.ws.JobSubmit._2011._01.FaxType FaxType = new com.easylink.ws.JobSubmit._2011._01.FaxType();
// Initialize WebService objects
com.easylink.ws.RequestResponse._2011._01.Request requestHeader = new com.easylink.ws.RequestResponse._2011._01.Request();
com.easylink.ws.RequestResponse._2011._01.Response responseHeader = new com.easylink.ws.RequestResponse._2011._01.Response();
// Initialize WebService objects
JobSubmitRequest parameterJobSubmitRequest = new com.easylink.ws.JobSubmit._2011._01.JobSubmitRequest();
JobMessage.setJobOptions(JobOptions);
JobOptions.setFaxOptions(FaxOptionsType);
JobMessage.setDestinations(ItemType);
FaxType.setPhone(faxPhone);
//Inserts the information into the destination element of the XML
ItemType.getList();
ItemType.getFax();
DocumentType.setDocData(DocDataType);
JobMessage.setContents(ContentsType);
DocDataType.setFormat(com.easylink.ws.JobSubmit._2011._01.DocEncodingFormat.text);
ContentPartType.setDocument(DocumentType);
DocumentType.setDocType("text");
DocDataType.set_value("This is a test of a Java Fax Job Submit!");
org.apache.axis.types.URI docUrl;
docUrl.setHost(https://test2messaging.easylink.com/soap/sync);
JobMessage.setReports(ReportOptionsType);
BindingProvider bp = null;
String address = "https://test2messaging.easylink.com/soap/sync"; // Set URL returns a string value of the submit URL
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address);
com.easylink.ws.RequestResponse._2011._01.XDDSAuthType XDDSAuth = new com.easylink.ws.RequestResponse._2011._01.XDDSAuthType();
XDDSAuth.setPassword(userPWD);
com.easylink.ws.RequestResponse._2011._01.UIDType uidType = new com.easylink.ws.RequestResponse._2011._01.UIDType();
uidType.set_value(userID);
XDDSAuth.setRequesterID(uidType);
// Setup and Assign Authentication Object
com.easylink.ws.RequestResponse._2011._01.RequestAuthentication Auth = new com.easylink.ws.RequestResponse._2011._01.RequestAuthentication();
Auth.setXDDSAuth(XDDSAuth);
// Set Header Tags
requestHeader.setAuthentication(Auth); // Authentication in Header
requestHeader.setReceiverKey(docUrl); // Receiver Key in Header
//Make Jobsubmit call
// Check Status code of the result