cancel
Showing results for 
Search instead for 
Did you mean: 

Problem synchronizing SUP 2.2

Former Member
0 Kudos

Hi!

I've been having a problem synchronizing with SUP 2.2 from the object API.

I have a MBO created from a SOAP web service and I am trying to call it from an Android application.

The MBO has synchronization parameters defined and this is the code I'm using:



TEST_SOAPSynchronizationParameters sp = TEST_SOAP.getSynchronizationParameters();


sp.setSKClave("santi1234");


sp.setSKUsuario("santi");


sp.setSKRol_id("1");


sp.save();


TestSOAPDB.synchronize("default");








TEST_SOAP usr = TEST_SOAP.getUsr();

Using the same code for SUP 2.1.3 it used to work this way.

Any ideas why this could be failling? Some help would be great.

Thanks in advance!

Lucía Cianelli

Accepted Solutions (1)

Accepted Solutions (1)

former_member222208
Discoverer
0 Kudos

Hello Lucia,

The getSynchronizationParameters method has been deprecated.

In SUP2.2 you have to use Subscription api...

below is the step that will help you

1. List all the synchronization parameters.

com.sybase.collections.GenericList<CustomerSubscription> r = Customer.getSubscriptions();

2. Add synchronization parameters.

CustomerSubscription sp = new CustomerSubscription();

sp.setName("example");

Customer.addSubscription(sp);

3. Save your changes by calling the synchronization parameters object's save method:

sp.save();

SUP101DB.synchronize();

Former Member
0 Kudos

Hello Vaibhav,

Thank you for trying to help.

How do I generate the code for the Subscription api?

Are you sure you are talking about sup 2.2 and not sup 2.3?

When I generate the code for the object api I get the Customer and CustomerSynchronizationParameter classes but not CustomerSubscription. Besides that I don't have the method getSubscriptions().

Any other ideas?

Thanks for your help

Lucía

former_member222208
Discoverer
0 Kudos

Hi Lucia,

there is a new patch available i.e. SP02 for SUP 2.2, so do update it. and then generate your code. you will see this new API and also import the new libraries in your code.

Former Member
0 Kudos

Do you have an example code working with sup 2.1.3?

Now it doesn't even work there. When we are trying to create a new customer and we synchronize to set the synchronization parameters for the MBO, it generates a new customer but keeps in cache the values to set. When you a new one, it adds the previous one and the new one and it goes on and on that way.

We are not sure what is happening, this code used to work before. Any ideas? Or a different way to use a web service MBO with parameters?

Any help would be great!

Answers (0)