M
mahesh
Hi
I am trying to access Portfolio server Webservices(PPSI)
in SDK I find one sample based on this I have created a new .NET Solution
that is working fine.It is populating the Portfolio's List in a Grid.This is
Windows appliaction.
But the same application I need to create a .NET Webservice that will return
a Dataset containing all portfolio's list.
This is not working I have done same as in windows application.
am unable to understand the problem
Rrror is:
System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: Microsoft Office Project
Portfolio Server Error at
Microsoft.Office.Project.PortfolioServer.PPSI.WS.Portfolio..ctor() at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
PortFolioMain.Portfolio.ReadPortfolioListInPortfolio(Nullable`1 portfolioID,
Int32 queryFilterID, Boolean includeSubOrganizationPortfolios,
PortfolioServerResultFilterDataTable resultFilter) in c:\Documents and
Settings\akhila subcon\Local Settings\Temp\Temporary ASP.NET
Files\reports\b3072fc9\522446b6\App_WebReferences.86evnbik.1.cs:line 154 at
Service.GetPortfolio() in c:\Projects\Reports\App_Code\Service.cs:line
--------------------------------------------------------------
My Code
LoginWin.LoginWindows login = new LoginWin.LoginWindows();
System.Net.CookieContainer _cookie = new System.Net.CookieContainer();
PortFolioMain.Portfolio portfoliows = new PortFolioMain.Portfolio();
[WebMethod]
public DataSet GetPortfolio()
{
//Login for Webservice
baseURL = "http://dlhnt030:100/PortfolioServer";
login.Url = baseURL + "/PPSI/WS/LoginWindows.asmx";
login.CookieContainer = _cookie;
login.Credentials = System.Net.CredentialCache.DefaultCredentials;
//Portfolio webservice
portfoliows.Url = baseURL + "/PPSI/WS/Portfolio.asmx";
portfoliows.CookieContainer = _cookie;
portfoliows.Credentials =
System.Net.CredentialCache.DefaultCredentials;
string str;
PortFolioMain.PortfolioServerPortfolioDataSet portfolioResultDS =
new PortFolioMain.PortfolioServerPortfolioDataSet();
if (login.Login("UserName", "password"))
{
str = "Logged In";
try
{
portfolioResultDS =
portfoliows.ReadPortfolioListInPortfolio(null, -1, true, null);
//PortFolioMain.PortfolioServerPortfolioDataSet.PortfolioServerPortfolioDataTable
table =
(PortFolioMain.PortfolioServerPortfolioDataSet.PortfolioServerPortfolioDataTable)portfolioResultDS.PortfolioServerPortfolio.Copy();
// return str + " " + table.Rows.Count.ToString();
return portfolioResultDS;
}
catch (Exception ex)
{
//return str + " " + ex.ToString();
return portfolioResultDS;
}
}
else
{
str = "Not Logged 2";
//return str;
return portfolioResultDS;
}
}
I am trying to access Portfolio server Webservices(PPSI)
in SDK I find one sample based on this I have created a new .NET Solution
that is working fine.It is populating the Portfolio's List in a Grid.This is
Windows appliaction.
But the same application I need to create a .NET Webservice that will return
a Dataset containing all portfolio's list.
This is not working I have done same as in windows application.
am unable to understand the problem
Rrror is:
System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: Microsoft Office Project
Portfolio Server Error at
Microsoft.Office.Project.PortfolioServer.PPSI.WS.Portfolio..ctor() at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
PortFolioMain.Portfolio.ReadPortfolioListInPortfolio(Nullable`1 portfolioID,
Int32 queryFilterID, Boolean includeSubOrganizationPortfolios,
PortfolioServerResultFilterDataTable resultFilter) in c:\Documents and
Settings\akhila subcon\Local Settings\Temp\Temporary ASP.NET
Files\reports\b3072fc9\522446b6\App_WebReferences.86evnbik.1.cs:line 154 at
Service.GetPortfolio() in c:\Projects\Reports\App_Code\Service.cs:line
--------------------------------------------------------------
My Code
LoginWin.LoginWindows login = new LoginWin.LoginWindows();
System.Net.CookieContainer _cookie = new System.Net.CookieContainer();
PortFolioMain.Portfolio portfoliows = new PortFolioMain.Portfolio();
[WebMethod]
public DataSet GetPortfolio()
{
//Login for Webservice
baseURL = "http://dlhnt030:100/PortfolioServer";
login.Url = baseURL + "/PPSI/WS/LoginWindows.asmx";
login.CookieContainer = _cookie;
login.Credentials = System.Net.CredentialCache.DefaultCredentials;
//Portfolio webservice
portfoliows.Url = baseURL + "/PPSI/WS/Portfolio.asmx";
portfoliows.CookieContainer = _cookie;
portfoliows.Credentials =
System.Net.CredentialCache.DefaultCredentials;
string str;
PortFolioMain.PortfolioServerPortfolioDataSet portfolioResultDS =
new PortFolioMain.PortfolioServerPortfolioDataSet();
if (login.Login("UserName", "password"))
{
str = "Logged In";
try
{
portfolioResultDS =
portfoliows.ReadPortfolioListInPortfolio(null, -1, true, null);
//PortFolioMain.PortfolioServerPortfolioDataSet.PortfolioServerPortfolioDataTable
table =
(PortFolioMain.PortfolioServerPortfolioDataSet.PortfolioServerPortfolioDataTable)portfolioResultDS.PortfolioServerPortfolio.Copy();
// return str + " " + table.Rows.Count.ToString();
return portfolioResultDS;
}
catch (Exception ex)
{
//return str + " " + ex.ToString();
return portfolioResultDS;
}
}
else
{
str = "Not Logged 2";
//return str;
return portfolioResultDS;
}
}