Page 1 of 1

SoftPro 2.4 Connect via SelectServer throws error

Posted: Fri Sep 25, 2009 4:34 pm
by roteague
I'm trying to run one of the API samples from 2.4: ProFormApiSample and I'm running into errors.

First, many of the necessary references were missing (sorry, I didn't keep a list of the ones I added).

Once I got all the references sorted out, I tried to connect using the following (based upon the SoftPro supplied code):

Code: Select all

            NetworkCredential credentials = new NetworkCredential("admin", "Passw0rd", global::SoftPro.ClientModel.Constants.ServerDomain);
            SelectServer sps = new SelectServer("http://SoftPro:8080", credentials);
            
            try
            {
                //if we do not force authentication now, it will happen later (in a lzay fashion) - using
                //this method allows us to catch the exception in a controlled manner
                Console.WriteLine("Logging in.");
                sps.EnsureAuthenticated();

                //in order to work with Order Tracking (ie ProForm), you need to obtain the OrderTracking service object
                OrderTracking ot = sps.GetService<OrderTracking>();
The program throws an exception on the line sps.EnsureAuthenticated(); The details are:

Code: Select all

{"Method not found: 'Void SoftPro.Administration.Common.ISecurityDataAccessService.GetAllSecurityInformation(SoftPro.Security.Classes.SecurityTrusteeCollection, SoftPro.Security.Classes.SecurityTrusteeCollection, SoftPro.Security.Classes.SecurityTrusteeCollection, SoftPro.Security.Classes.ProfileCollection, System.Collections.Generic.Dictionary`2<System.Guid,System.Guid>, SoftPro.Security.Classes.RoleCollection, SoftPro.Security.Classes.MyScreenCollection, SoftPro.Security.Classes.SecuredObjectCollection, Boolean)'."}	System.Exception {System.MissingMethodException}
RedGate .NET Reflector shows the interface (ISecurityDataAccessService) is there, although it's marked as internal.

I bring this up, since my own code uses the same process as the sample code.

Thanks,

Re: SoftPro 2.4 Connect via SelectServer throws error

Posted: Thu Oct 01, 2009 5:52 pm
by Hadi Chemaly
Sorry for the delay. I just managed to run the sample after updating references. ISecurityDataAccessService is meant to be internal.
The ISecurityDataAccessService service is defined in the SoftPro.Select.Client.dll assembly, so as long as that assembly is present in the Select installation folder, and the sample project is referencing it, technically there should not be a missing method fault.

Is what you posted the only event log entry related to this?

For the sake of completeness (since you have already done this), to get the sample running, all you should need to do is replace the project file's assembly references with the following:

Code: Select all

  <ItemGroup>
    <Reference Include="SoftPro.OrderTracking.Client, Culture=neutral, PublicKeyToken=3834c39820615aaf, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(ProgramFiles)\SoftPro\Select\SoftPro.OrderTracking.Client.dll</HintPath>
    </Reference>
    <Reference Include="SoftPro.OrderTracking.Common, Culture=neutral, PublicKeyToken=3834c39820615aaf, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(ProgramFiles)\SoftPro\Select\SoftPro.OrderTracking.Common.dll</HintPath>
    </Reference>
    <Reference Include="SoftPro.Select.Client, Culture=neutral, PublicKeyToken=3834c39820615aaf, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(ProgramFiles)\SoftPro\Select\SoftPro.Select.Client.dll</HintPath>
    </Reference>
    <Reference Include="SoftPro.Select.Common, Culture=neutral, PublicKeyToken=3834c39820615aaf, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(ProgramFiles)\SoftPro\Select\SoftPro.Select.Common.dll</HintPath>
    </Reference>
    <Reference Include="SoftPro.ClientModel, Culture=neutral, PublicKeyToken=3834c39820615aaf, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(ProgramFiles)\SoftPro\Select\SoftPro.ClientModel.dll</HintPath>
    </Reference>
    ...
and "SoftPro.Select.Client.Constants.SelectDomain" should become "SoftPro.ClientModel.Constants.ServerDomain" in Program.cs.

Also, I put in a request to update this sample in the next version of the Select SDK. Thanks for pointing that out.

Re: SoftPro 2.4 Connect via SelectServer throws error

Posted: Fri Oct 09, 2009 9:27 pm
by JDavis
Hadi,

Thanks for the reply. We were able to get the sample working and connect to the 2.4 Select Server instance.

However, I do get the error "Could not find the data value requested: \"Loan\" though on line 35: IOrder order = ot.CreateOrder();

Thanks,
Jake

Re: SoftPro 2.4 Connect via SelectServer throws error

Posted: Mon Oct 12, 2009 9:13 am
by Hadi Chemaly
The API error you are seeing is discussed here.