S
Steven
Hi all
My problem is a little lengthy. But please help me. In my application,
ADO.NET DataSet object is not getting constructed in the Web Service Web
Method called by the Windows Application passing an ADO.NET DataSet Object
as a parameter to the Web Method in Web Service
Debugging using the Soap Extensions, clearly shows that the Serialized
DataSet is passed to the Web Service, but the Web Service Web Method is not
able to construct the ADO.NET DataSet from the Serialized Data.
I am hereby giving a brief overview of what I am doing.
We're developing a WindowsForms based distributed application. All our
WindowsForms clients connect to the business components layers using Web
Service. Therefore, the front-end only talks to the Web Service and Web
Service calls the Business and Data Layer components. Since the Web Service
Layer acts as a gateway between the WindowsForms clients and the business
components, We pass all the data using DataSets.
Here is the code snippet,
private void LoadGroup(string ticker)
{
//We're creating an object of a stronly typed
DataSet
EquityPeerCriteriaSet equityPeerCriteriaSet = new
EquityPeerCriteriaSet();
//We're setting the properties of the strongly typed
DataSet
equityPeerCriteriaSet.CriteriaType ="Ticker";
equityPeerCriteriaSet.CriteriaValue =m_ticker;
//We're creating the Web Service's proxy object
WebReferences.EquityPeerListService.EquityPeerListMgmtService
equityPeerListService= new
WebReferences.EquityPeerListService.EquityPeerListMgmtService();
//We're calling the web method and passing the
DataSet from
Dataset DspeerListsSet =
equityPeerListService.GetPeerList(equityPeerCriteriaSet);
....
....
}
Our Web Method looks like this,
[WebMethod]
[TraceExtension]
public DataSet GetPeerList(DataSet dsEquityPeerCriteriaSet)
{
try
{
//Creating an object type of the Business
Layer
EquityPeerListManager equityPeerListManager
=new EquityPeerListManager();
....
....
return peerListsSet.DataSet;
}
catch(Exception ex)
{
SoapException Se = new SoapException
(ex.Message,SoapException.ClientFaultCode,ex.InnerException);
throw Se;
}
}
The problem is that, the DataSet object comes as undefined when entering the
Web Method. We've also created a SOAP Extension class and debugged the SOAP
message chain. The data is present in both
SoapMessageStage.BeforeDeserialize and SoapMessageStage.AfterDeserialize
stages and we're able to see the data in the log file.
This behavior looks very strange. If you can provide a pointer, that would
help us a lot.
Thanks and appreciate your response.
Thanks again.
My problem is a little lengthy. But please help me. In my application,
ADO.NET DataSet object is not getting constructed in the Web Service Web
Method called by the Windows Application passing an ADO.NET DataSet Object
as a parameter to the Web Method in Web Service
Debugging using the Soap Extensions, clearly shows that the Serialized
DataSet is passed to the Web Service, but the Web Service Web Method is not
able to construct the ADO.NET DataSet from the Serialized Data.
I am hereby giving a brief overview of what I am doing.
We're developing a WindowsForms based distributed application. All our
WindowsForms clients connect to the business components layers using Web
Service. Therefore, the front-end only talks to the Web Service and Web
Service calls the Business and Data Layer components. Since the Web Service
Layer acts as a gateway between the WindowsForms clients and the business
components, We pass all the data using DataSets.
Here is the code snippet,
private void LoadGroup(string ticker)
{
//We're creating an object of a stronly typed
DataSet
EquityPeerCriteriaSet equityPeerCriteriaSet = new
EquityPeerCriteriaSet();
//We're setting the properties of the strongly typed
DataSet
equityPeerCriteriaSet.CriteriaType ="Ticker";
equityPeerCriteriaSet.CriteriaValue =m_ticker;
//We're creating the Web Service's proxy object
WebReferences.EquityPeerListService.EquityPeerListMgmtService
equityPeerListService= new
WebReferences.EquityPeerListService.EquityPeerListMgmtService();
//We're calling the web method and passing the
DataSet from
Dataset DspeerListsSet =
equityPeerListService.GetPeerList(equityPeerCriteriaSet);
....
....
}
Our Web Method looks like this,
[WebMethod]
[TraceExtension]
public DataSet GetPeerList(DataSet dsEquityPeerCriteriaSet)
{
try
{
//Creating an object type of the Business
Layer
EquityPeerListManager equityPeerListManager
=new EquityPeerListManager();
....
....
return peerListsSet.DataSet;
}
catch(Exception ex)
{
SoapException Se = new SoapException
(ex.Message,SoapException.ClientFaultCode,ex.InnerException);
throw Se;
}
}
The problem is that, the DataSet object comes as undefined when entering the
Web Method. We've also created a SOAP Extension class and debugged the SOAP
message chain. The data is present in both
SoapMessageStage.BeforeDeserialize and SoapMessageStage.AfterDeserialize
stages and we're able to see the data in the log file.
This behavior looks very strange. If you can provide a pointer, that would
help us a lot.
Thanks and appreciate your response.
Thanks again.