Skip to main content
Nintex Community Menu Bar

Webservice Call From Blackpearl

  • January 30, 2008
  • 4 replies
  • 17 views

Forum|alt.badge.img+1

Hello,

 I have added a web service URL to the Workflow web service(s). How can i call the web service from code (default server event)?

 
Actually i was looking for some documentation on blackpearl but could not find any.. There are some labs on the portal to download, but there is nothing about coding..

could you please give me some directions?
 

4 replies

Forum|alt.badge.img+11
  • January 30, 2008

In a server code event you call the web service just like you would from any .NET code.  Declare an instance of the service, set it's credentials and url (if needed), then invoke methods on it.


 InvoiceService.Service1 Serv = new InvoiceService.Service1();
 Serv.Credentials = System.Net.CredentialCache.DefaultCredentials;  //if needed


 //Serv.url =  ...set url if needed
 int ID = (int) K2.ProcessInstance.DataFields["id"].Value;


 bool bl = Serv.DealProfessionalRequired(ID);


Forum|alt.badge.img+1
  • Author
  • January 31, 2008
Thank you, but where can I add the web service reference, so the proxy class (in this case InvoiceService.Service1) can be generated?

Forum|alt.badge.img+8
  • January 31, 2008

Hi,


Just click on the "Project References" icon


 referenceex5.png


In the window, click "Add", then go to the "Web" tab.


Forum|alt.badge.img+1
  • Author
  • January 31, 2008
Thank you guys, you've helped me a lot