Are there any samples or tutorials for interacting with a web service using Trident activity?

Apr 15, 2011 at 1:20 AM

Hi,

i was wondering whether there is any tutorial or sample code which shows how we can communicate with a web service using trident activity?

Apr 15, 2011 at 1:28 AM

I tried to implement it but i keep getting an exception "could not find default endpoints in service model configuration". but i can see my endpoints configured in apps.config when i compiled my activity.

Apr 15, 2011 at 8:15 AM

Hi,

Thanks for showing interest in Trident.

Please find the responses for your query below:-

<<i was wondering whether there is any tutorial or sample code which shows how we can communicate with a web service using trident activity?>>

Response -> Yes, Trident has a list of supported documents and samples which you can find here.
You can also find a series of user guide in the documentation tab. Please find a developer’s guide regarding Trident Web Service Interface here.

<<I tried to implement it but i keep getting an exception "could not find default endpoints in service model configuration". but i can see my endpoints configured in apps.config when i compiled my activity.>>

Response -> The approach to communicate with a web service in Trident is exactly the same as you do in .NET except you “wrapped” your code in a Trident activity here. Please check you have imported the activity correctly with all its dependencies and the protocol you’re using for the default end point.
You can also verify your configuration setting by writing a demo console application or a demo windows or web application.
If the issue still persists please get back to us.

Regards,
Support Team

Apr 15, 2011 at 2:37 PM

Hi Brian,

I faced a similar issue when using a web service client from within a Trident activity. When the client runs, I believe it tries to load endpoints from Trident's application config file "TridentWorkflowHost.exe.config‎" that can be found within Microsoft Project Trident - A Scientific Workflow Workbench\Executor folder of Trident installation.

To resolve this issue, one can add the endpoint details in the client constructor in the code. For example:

EndpointAddress endpoint = new EndpointAddress(new Uri("http://www.sampleservice.com/"));
BasicHttpBinding binding = new BasicHttpBinding(); //If using basic http binding

MyClient  client = new MyClient(binding, endpoint);

 

Hope this helps.

Thanks,

Kavitha

Apr 16, 2011 at 2:55 AM

Thanks a lot Kavitha and Abhishek for your quick response.

It really helped me.