Authentication Error on Job Submit API Call
I am trying to figure out why I am having an authentication error while attempting to do a Job Submit call. I was able to use the credentials to log into the portal without and issue, but they don't seem to be working with the API call. I got most of the code from the API guide and modified it to what I needed. Right now I'm just trying to get a job to work and have some clean up to do still. Here is the code I'm using. I also attached a screenshot of the error, and a screen shot of the request and response I grabbed in Fiddler. Any help would be greatly appreciated.
JobSubmitService EM = new JobSubmitService();
var reqAuth = new RequestAuthentication
{
Item = new XDDSAuthType
{
RequesterID = new UIDType
{
Value = GetConfigSetting("XDDSUser")
},
Password = GetConfigSetting("XDDSPw")
}
};
var messages = new List<MessageType>();
foreach (var fax in faxes)
{
messages.Add(new MessageType
{
Contents = new ContentsType
{
Part = new ContentPartType[]
{
new ContentPartType
{
Item = new DocumentType
{
Item = new DocDataType
{
format = DocEncodingFormat.base64,
Value = ReadAndEncodedFile(fax.FaxFileName)
},
Filename = EncodableString(fax.FaxFileName),
DocType = "PDF",
ItemElementName = ItemChoiceType.DocData,
@ref = "ATTACH1"
}
}
}
},
JobOptions = new JobOptionsType
{
BillingCode = EncodableString(GetConfigSetting("billingCode")),
Delivery = new DeliveryType
{
Schedule = ScheduleType.express
},
FaxOptions = new FaxOptionsType
{
FaxCoversheet = new FaxCoversheetOptionType
{
CoversheetTo = EncodableString(fax.FaxTo),
CoversheetFrom = EncodableString(GetUser()),
CoversheetAttn = EncodableString(GetConfigSetting("coversheetAttn")),
UseCoversheet = YesNo.yes
},
FaxMode = ShouldUseFine() ? FaxModeType.fine : FaxModeType.standard
},
PriorityBoost = IsHighPriority()
},
Destinations = new FaxType[]
{
new FaxType
{
Phone = fax.FaxNumber,
To = EncodableString(fax.FaxTo),
From = EncodableString(Environment.UserName)
}
}
});
}
var JS_Request = new JobSubmitRequest
{
Message = messages.ToArray(),
SubmitId = "SubmitId"
};
Set_Server_and_Proxy(EM);
EM.RequestValue = new Request
{
ReceiverKey = EM.Url,
Authentication = reqAuth,
RequestID = "RequestID"
};
EM.ResponseValue = new Response();
JobSubmitResult JS_Result = new JobSubmitResult();
try
{
JS_Result = EM.JobSubmit(JS_Request);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.Read();
}
Comments
-
I believe I have done this correctly. You can see the call to ReadAndEncode where the message is being built up. You can also see what I believe is the encoded file in at the very bottom of the screenshot of the request (though I cut off part of it in the screenshot). Does this appear correct to you?
0 -
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 145 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management