Hi,
I've tried using the sample C# docs along with the new 2.5 API, and the JobService class doesn't instantiate, so in an effort to get this working, I downgraded to 2.4, and I still can't get anything to work.
If you use 2.5, how do you actually submit the request? If I connect to the service and specify in Visual Studio 2010 to use the older web reference platform, I can get to the JobListService class, but it returns a SOAP mismatch error.
I've changed this code 100 times, so I apologize for it being messy, but with the following code I get "WCF error: The underlying connection was closed: The connection was closed unexpectedly."
Here is my code. As you can see by the commented out code, I've tried 2.5 to no avail and I've tried the older version and now I get the "unexpected closed" error.
//http://test2messaging.easylink.com/soap/sync
//CSharp_Authenticate.EMsgAPI_Authenticate201101.XOA xoa = new CSharp_Authenticate.EMsgAPI_Authenticate201101.XOA();
//CSharp_Authenticate.EMsgAPI_Authenticate201101.Response response = new CSharp_Authenticate.EMsgAPI_Authenticate201101.Response();
DPJobs.joblist.XOA xoa = new DPJobs.joblist.XOA();
DPJobs.joblist.Request request = new DPJobs.joblist.Request();
DPJobs.joblist.Response response = new DPJobs.joblist.Response();
DPJobs.joblist.Authentication auth = new DPJobs.joblist.Authentication();
DPJobs.joblist.XDDSAuthType xdauth = new DPJobs.joblist.XDDSAuthType();
//DPJobs.joblist. uid = new DPJobs.joblist.UIDType();
//DPJobs.service.JobListPortTypeClient jc = new DPJobs.service.JobListPortTypeClient();
//authorization
//uid.Value = m_userName;
xdauth.RequesterID = m_userName;
xdauth.Password = m_password;
auth.XDDSAuth = xdauth;
DPJobs.joblist.JobListRequest jobrequest = new DPJobs.joblist.JobListRequest();
//DPJobs.joblist.JobListResponse jobresponse = new DPJobs.joblist.JobListResponse();
DPJobs.joblist.JobListResult jobresult = new DPJobs.joblist.JobListResult();
DPJobs.joblist.JobListRequestFilterType[] jobfilter = new DPJobs.joblist.JobListRequestFilterType[1];
jobfilter[0] = new DPJobs.joblist.JobListRequestFilterType();
DPJobs.joblist.JobIdType[] jobtype = new DPJobs.joblist.JobIdType[1];
jobtype[0] = new DPJobs.joblist.JobIdType();
//DPJobs.joblist.JobListPortTypeClient c = new DPJobs.joblist.JobListPortTypeClient();
//DPJobs.joblist.JobListService jobservice = new DPJobs.joblist.JobListService();
//request.Authentication = auth;
//request.ReceiverKey = "http://ws.easylink.com/JobList/2011/01";
request.ReceiverKey = "http://test2messaging.easylink.com/soap/sync";
//request.
jobtype[0].MRN = lastJobNumberPolled;
jobfilter[0].StartJobId = jobtype;
jobrequest.Items = jobfilter;
//xoa.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Default;
xoa.RequestValue = request;
xoa.ResponseValue = response;
try
{
//jc.JobList(request, jobrequest, out jobresult);
//jobservice.JobList(jobrequest);
jobresult = xoa.JobList(jobrequest);
}
catch (System.Exception ex)
{
System.Console.WriteLine(ex.Message);
}