on 04-15-2013 4:08 PM
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
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();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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!
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.