Skip to main content
Nintex Community Menu Bar

I have a WCF service method that expects an object as a parameter.  So the method is "UpdateDB(myobj)" and myobj is simply composed of a string name, datetime startdate and int age.  I don't want to change the method to accept three different values.  I have the service configured using a WCF endpoint in the service tester and created a smartobject from that method.  I want to call this method from within a workflow...I assume from the smartobject event.  I have the 3 values available in three process data fields.    Is there a best way to construct the object with the data fields in order to pass the object into the method? I assume the serialize/deserialize methods will come into play but I'm unclear on how to do this.  Thanks.

Man, I guess this was a tough one :)


Hi

 

Did you come right with this ?

 

If you did can you share what you have done to get this working ?

 

Regards

 

 


Heres' how I did it;

1. Create your WCF service instance

2. Create a composite SmartObject. Remove default methods from the smartobject.

3. Add a new method to smartobject.

4. In the newly added method add a Service Object Method and refence the Serialize method from the object you want to pass to the SmartObject

5. Use "Create All" to generate all the properties available in the method. This will also create a property named as "Serialized Item (String)" which you can rename as well.

6. Add another Service Object Method, this time reference the WCF method to which you want to pass the object

7. On Add service method screen in the input property of the WCF method map the "Serialized Item(String)" created in step 5.

8. Map the return properies of the WCF method with existing or new properties.

9. Complete the wizard till end and deploy it on the server.

10. Use SMO Tester to test the method.


Reply