[sip-comm-dev] Server Stored Contact Info


#1

Hey Emil, Damian,

With my SoC project, I'm trying to make that little GUI plug-in for account information. I've been working around the problem I've had of not being able to actually use the OperationSet ServerStoredContactInfo, but it's gotten kind of unavoidable recently and so I'm facing up to the fact that I just can't get it working. I'm not sure if I'm making a Java mistake or if I'm just misunderstanding something else, but some advice would be very much appreciated.

For right now, I'm making a first example with ICQ, so the point where I'm trying this line is at a point where "pps" refers to a ProtocolProviderService that we know is a PPSIcqImpl that has the operation set ServerStoredContactInfoIcqImpl. In order to actually work with it, I'm trying this:

try
{
OperationSetServerStoredContactInfoIcqImpl ssci = (OperationSetServerStoredContactInfoIcqImpl)pps.getOperationSet((Class.forName("OperationSetServerStoredContactInfoIcqImpl")));
} catch (ClassNotFoundException e)
{
//we always end up here
}

but it always has a ClassNotFoundException. Like I said before, I don't know if I'm making a Java mistake or if it's something else. Any sort of help would be really great. Thank you very much.

Adam

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi Adam,

I don't exactly know why you got this error but as you may have seen elsewhere in the project, when this method is called, the call is written like this :

try
{
OperationSetServerStoredContactInfoIcqImpl ssci = (OperationSetServerStoredContactInfoIcqImpl)pps.getOperationSet(OperationSetServerStoredContactInfoIcqImpl.class);

} catch (ClassNotFoundException e)
{
}

I don't know if it can help but you can try this.

Ben

···

Hey Emil, Damian,

With my SoC project, I'm trying to make that little GUI plug-in for account information. I've been working around the problem I've had of not being able to actually use the OperationSet ServerStoredContactInfo, but it's gotten kind of unavoidable recently and so I'm facing up to the fact that I just can't get it working. I'm not sure if I'm making a Java mistake or if I'm just misunderstanding something else, but some advice would be very much appreciated.

For right now, I'm making a first example with ICQ, so the point where I'm trying this line is at a point where "pps" refers to a ProtocolProviderService that we know is a PPSIcqImpl that has the operation set ServerStoredContactInfoIcqImpl. In order to actually work with it, I'm trying this:

try
{
OperationSetServerStoredContactInfoIcqImpl ssci = (OperationSetServerStoredContactInfoIcqImpl)pps.getOperationSet((Class.forName("OperationSetServerStoredContactInfoIcqImpl")));

} catch (ClassNotFoundException e)
{
//we always end up here
}

but it always has a ClassNotFoundException. Like I said before, I don't know if I'm making a Java mistake or if it's something else. Any sort of help would be really great. Thank you very much.

Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi Adam,

Keep in mind that you should never be using classes that are defined in one of the "impl" subpackages, or that end with an Impl suffix. In order to get an instance of the ServerStoredInfo op set you need to use the class defined in the service.protocol package which is called the same as the one you are using but without the IcqImpl suffix. This gives you:

     (OperationSetServerStoredContactInfo)pps
         .getOperationSet(OperationSetServerStoredContactInfo.class);

Don't hesitate to ask again if you have other issues blocking you.

Cheers
Emil

Benoit Pradelle wrote:

···

Hi Adam,

I don't exactly know why you got this error but as you may have seen elsewhere in the project, when this method is called, the call is written like this :

try
{
OperationSetServerStoredContactInfoIcqImpl ssci = (OperationSetServerStoredContactInfoIcqImpl)pps.getOperationSet(OperationSetServerStoredContactInfoIcqImpl.class);

} catch (ClassNotFoundException e)
{
}

I don't know if it can help but you can try this.

Ben

Hey Emil, Damian,

With my SoC project, I'm trying to make that little GUI plug-in for account information. I've been working around the problem I've had of not being able to actually use the OperationSet ServerStoredContactInfo, but it's gotten kind of unavoidable recently and so I'm facing up to the fact that I just can't get it working. I'm not sure if I'm making a Java mistake or if I'm just misunderstanding something else, but some advice would be very much appreciated.

For right now, I'm making a first example with ICQ, so the point where I'm trying this line is at a point where "pps" refers to a ProtocolProviderService that we know is a PPSIcqImpl that has the operation set ServerStoredContactInfoIcqImpl. In order to actually work with it, I'm trying this:

try
{
OperationSetServerStoredContactInfoIcqImpl ssci = (OperationSetServerStoredContactInfoIcqImpl)pps.getOperationSet((Class.forName("OperationSetServerStoredContactInfoIcqImpl")));

} catch (ClassNotFoundException e)
{
//we always end up here
}

but it always has a ClassNotFoundException. Like I said before, I don't know if I'm making a Java mistake or if it's something else. Any sort of help would be really great. Thank you very much.

Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net