Author Topic: COnfServiceFactory.createconfService(Protocol) error  (Read 4290 times)

Offline nikhiltrivedi84

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
COnfServiceFactory.createconfService(Protocol) error
« on: February 19, 2016, 05:27:30 PM »
I am new to using genesys apis. I am trying to use ConfService APIs to access transactions. The issue I am facing is while creating confservice, I am getting a compile error on the ConfServiceFactory.createConfService(protocol) line.

Endpoint cfgServerEndpoint =
            new Endpoint(cfgsrvEndpointName, cfgsrvHost, cfgsrvPort);

    ConfServerProtocol protocol = new ConfServerProtocol(cfgServerEndpoint);
    protocol.setClientName(clientName);
    protocol.setClientApplicationType(clientType.ordinal());
    protocol.setUserName(username);
    protocol.setUserPassword(password);

[i] IConfService service = ConfServiceFactory.createConfService(protocol)[/i]

I am using Genesys Platform SDK 8.0.

Regards

Nikhs

Offline nikhiltrivedi84

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: COnfServiceFactory.createconfService(Protocol) error
« Reply #1 on: February 19, 2016, 05:41:28 PM »
These are the imports.

import com.genesyslab.platform.applicationblocks.com.IConfService;
import com.genesyslab.platform.applicationblocks.com.ConfServiceFactory;
import com.genesyslab.platform.applicationblocks.com.ConfigException;

import com.genesyslab.platform.configuration.protocol.types.CfgAppType;
import com.genesyslab.platform.configuration.protocol.ConfServerProtocol;

import com.genesyslab.platform.commons.protocol.ChannelState;
import com.genesyslab.platform.commons.protocol.Endpoint;
import com.genesyslab.platform.commons.protocol.ProtocolException;

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: COnfServiceFactory.createconfService(Protocol) error
« Reply #2 on: February 19, 2016, 06:20:55 PM »
Try something like this:

protocol = new ConfServerProtocol(cfgServerEndpoint);
protocol.setClientApplicationType(CfgAppType.CFGSCE.asInteger());
protocol.setClientName("default");
protocol.setUserName(username);
protocol.setUserPassword(password);

[i]ConfService confservice = (ConfService) ConfServiceFactory.createConfService(protocol);[/i]

Offline nikhiltrivedi84

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: COnfServiceFactory.createconfService(Protocol) error
« Reply #3 on: February 19, 2016, 07:22:10 PM »
It gives me same compilation error. It says "Add argument .......". I think it requires SubScriptionService<message>. What should that do? The confservice sample does not have that.

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: COnfServiceFactory.createconfService(Protocol) error
« Reply #4 on: February 19, 2016, 07:28:18 PM »
that's strange... It compiles fine here with this.

My imports are:
import com.genesyslab.platform.applicationblocks.com.*;
import com.genesyslab.platform.configuration.protocol.*;
import com.genesyslab.platform.configuration.protocol.types.*;
import com.genesyslab.platform.commons.protocol.*;

Offline jamesmurphyau

  • Full Member
  • ***
  • Posts: 123
  • Karma: 2
Re: COnfServiceFactory.createconfService(Protocol) error
« Reply #5 on: February 19, 2016, 07:46:34 PM »
You're using an old version of the Platform SDK that requires EventBrokerService (EventBrokerService is a subclass of SubscriptionService).. 8.1 has it, 8.5 doesn't

Offline nikhiltrivedi84

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: COnfServiceFactory.createconfService(Protocol) error
« Reply #6 on: February 19, 2016, 08:23:29 PM »
James, Do you know how to accomplish this in 8.1 version? The code snippet is shown in below. Let me know what is wrong with it. Appreciate your help.