Authentication problem with C# .net PAPI WS
712118Jul 15 2009 — edited Jul 17 2009Hi,
I'm a new user of BPM, and not a Java programmer :(, so i need some information about how to access the PAPI WS with a C# .net website.
I already have created the web reference, and it's working fine, but when I try to execute any method i get the error below:
Participant could not be authenticated. A wrong username or password might have been specified.
Actually, I don't have any documentation about how to work with papi and c#.
My ws configuration in BPM:
Service Name 'PapiWebService'
Style: Document Literal Wrapped
SSO Enabled: false
WS-Security UsernameToken Profile Authentication Enabled: true
HTTP Basic Authentication Enabled: true
Preset Authentication Enabled: false
MTOM Optimization for attachments Enabled*: false
Example code (WSPAPI is the WebService, of course):
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WSPAPI;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
+//configure authentication+
PapiWebService WSCOC = new WSPAPI.PapiWebService();
+//retrieve instances for all processes available to the authenticated participant+
string[] processIds = WSCOC.processesGetIds(false);
foreach (string processId in processIds)
{
Response.Write("Process: " + processId + "</ br>");
}
}
}
Any information about how to authenticate will be helpfull.
tks
Edited by: AlexandreMF on 17/07/2009 07:45