Sending a fax

Hi,

I am using the following WSDL to create a sample application to test Fax service.
http://ws.easylink.com/JobSubmit/2011/01?WSDL


 I am checking the following example in this link:
https://apiforums.easylink.com/system/files/C%23_JobSubmitFaxSingle.txt

The issue is no reference to 
JobSubmitService in the WSDL. Can someone please point to the correct WSDL for JobSubmit and the right sample code for it to refer and evaluate the product.

Thanks.

Comments

  • Use the sample at https://apiforums.easylink.com/content/c-sample-jobsubmit-fax-options with 2.5 in the name.

    Did you import the WSDL as a Web Reference, not just a Reference?

  • Thanks I will check the link with 2.5 in the name. I have added it as Service Reference.

  • I have added it as Service Reference. The example with 2.5 too contains reference to JobSubmitService which is not there in the WSDL. The WSDL link I posted, is it the correct one that I am using?

  • It has to be added as a Web Reference. Right click on Service Reference and the Add Service Reference. In the bottom of the Window click Advanced. In the bottom of next windo click Add Web Reference.

    Do not accept default name, specify JobSubmit in the name.

  • I am able to build the application. The authentication is also working properly, but when I am trying to send a fax (without documents), just text, then in that case it is throwing an error of parsing.

    Any idea as to why it is giving an error. My object currently is to just trigger a fax and then attachment a document and send a fax. Any help is appreciated.

    Following is the output for serialized JS_Request:

    <?xml version="1.0" encoding="UTF-8"?>
    <JobSubmitRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SubmitId xmlns="http://ws.easylink.com/JobSubmit/2011/01">Test</SubmitId>
    <DocumentSet xmlns="http://ws.easylink.com/JobSubmit/2011/01">
    <Document />
    </DocumentSet>
    <Message xmlns="http://ws.easylink.com/JobSubmit/2011/01">
    <MessageId>DEVWINPC/31/2016 10:42:15 AM</MessageId>
    <JobOptions>
    <FaxOptions>
    <FaxCoversheet>
    <UseCoversheet>yes</UseCoversheet>
    <CoversheetTo>Tom</CoversheetTo>
    <CoversheetFrom>EasyLink</CoversheetFrom>
    <CoversheetAttn>Mr. Smith</CoversheetAttn>
    </FaxCoversheet>
    <FaxMode>standard</FaxMode>
    <DeliveryRetryPattern>11</DeliveryRetryPattern>
    </FaxOptions>
    </JobOptions>
    <Destinations>
    <Fax>
    <InsertList>
    <Insert number="1">insert 1</Insert>
    <Insert number="2">insert 2</Insert>
    </InsertList>
    <Phone>1234567890@fax2mail.com</Phone>
    </Fax>
    </Destinations>
    <Contents>
    <Part />
    </Contents>
    </Message>
    </JobSubmitRequest>
  • If there is no document you will always get an error because there is nothing to send.

  • Even if I send a document, I am getting the response as error in parsing. Is there more information that I need to send or the data that I am passing is not proper.

    I have shortened that Base64 string for easier reading. Proper base64 string is being sent.

    <?xml version="1.0" encoding="UTF-8"?>
    <JobSubmitRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SubmitId xmlns="http://ws.easylink.com/JobSubmit/2011/01">Test</SubmitId>
    <DocumentSet xmlns="http://ws.easylink.com/JobSubmit/2011/01">
    <Document ref="testDoc">
    <DocType>PDF</DocType>
    <Filename>C:\Users\karsk\Desktop\test.pdf</Filename>
    <DocData format="base64">JG</DocData>
    </Document>
    </DocumentSet>
    <Message xmlns="http://ws.easylink.com/JobSubmit/2011/01">
    <MessageId>NJTRG1KARS5/31/2016 2:10:42 PM</MessageId>
    <JobOptions>
    <FaxOptions>
    <FaxCoversheet>
    <UseCoversheet>yes</UseCoversheet>
    <CoversheetTo>Tom</CoversheetTo>
    <CoversheetFrom>EasyLink</CoversheetFrom>
    <CoversheetAttn>Mr. Smith</CoversheetAttn>
    </FaxCoversheet>
    <FaxMode>standard</FaxMode>
    <DeliveryRetryPattern>11</DeliveryRetryPattern>
    </FaxOptions>
    </JobOptions>
    <Destinations>
    <Fax>
    <InsertList>
    <Insert number="1">insert 1</Insert>
    <Insert number="2">insert 2</Insert>
    </InsertList>
    <Phone>12484627862</Phone>
    </Fax>
    </Destinations>
    <Contents>
    <Part />
    </Contents>
    </Message>
    </JobSubmitRequest>
  • You added a document, but you did not assign it in Contents.

  • Thanks. I had the code commented. Now the error in parsing issue is removed, but now it is saying that the user could not be authenticated. The url I am using is https://test2messaging.easylink.com/soap/sync (for testing and not production). I am providing the username and password as the one which I use to login into fax2mail.easylink.com. Is there any other credential I need to use to login using the code?

    Below the authentication code portion is the one I am using for authentication:

    	JobSubmit.RequestAuthentication reqAuth = new JobSubmit.RequestAuthentication();
            JobSubmit.XDDSAuthType XDDSAuth = new JobSubmit.XDDSAuthType();
            JobSubmit.UIDType uid = new JobSubmit.UIDType();
            // init Authentication objects
            XDDSAuth.Password = password;
            uid.Value = userId;
            XDDSAuth.RequesterID = uid;
            XDDSAuth.RequesterID.aliasType = "M2F";
            reqAuth.Item = XDDSAuth;
  • The authentication issue is resolved. In the JS_Result, I am getting the JobId.XDN and JobId.MRN, but I am not receiving the fax in the end. Even after I login into the portal https://test2.fax2mail.easylink.com/, I cannot see any fax in the sent or outbox.

  • Your Content.Item name should be the same as your Doc ref.

  • Hello There,
    This discussion help me to resolve an issue, I am stuck at the point where you add DESTINATIONS to MessageType, giving exception about Object Reference. Following is my code, please let me know what I am missing:

    FaxType[] lists = new FaxType[1];
    lists[0] = new FaxType();
    //lists[0].From = new EncodableStringType() { Value = "3214727714" };
    lists[0].Phone = "3056747999";
    lists[0].@ref = "Phone Number Entered";
    //lists[0].To = new EncodableStringType() { Value = "3056747999" };
    //lists[0].InsertList = objIn;
    
    objMsgType[0].Destinations = lists;
    

    I have also opened a discussion at the following link:
    [https://forums.opentext.com/forums/discussion/230425/jobsubmitservice-object-as-service-client-is-not-available#latest]

    Please help as I am late to implement this.

    Thanks