Can not update typed dataset with WerbServices?  
Author Message
dinh xuan dung





PostPosted: ASMX Web Services and XML Serialization, Can not update typed dataset with WerbServices? Top

hi all,

My Application was written by ASP.Net 2.0, It is separated into 3 layer, and used typed dataset as a business object, I can reture this object completed from WebClient through WebService, but I can not update this object through the webservice. You can see my code is below:

this code is to create a proxy for the webservice.

/// <summary>

/// Update client objects by User Id

/// </summary>

/// <param name="clientDataSet">ClientDataSet object</param>

/// <param name="userId">User identitifer</param>

public static WebServices.ClientDataSet UpdateClient(WebServices.ClientDataSet clientDataSet, int userId)

{

if (clientDataSet.HasChanges())

{

WebServices.Service controller = new WebServices.Service();

controller.UpdateClient(clientDataSet, userId);

}

return clientDataSet;

}

- The problem is that my application can not step into this function of the WebService while I can step into the following function:

/// <summary>

/// Get five data tables by passing a client Id

/// </summary>

/// <param name="Id">Client identifier</param>

/// <returns>ClientDataSet object</returns>

public static WebServices.ClientDataSet GetClient(int clientId)

{

WebServices.Service controller = new WebServices.Service();

return controller.GetClient(clientId);

}

- Please help me if you know a way to solve it.

thanks all

Dung




.NET Development21  
 
 
lwmorris067





PostPosted: ASMX Web Services and XML Serialization, Can not update typed dataset with WerbServices? Top

The error message would help.

To troubleshoot, you'll need to do a couple of things.

1. Enable Debugging for the webservice. Do this by right-clicking on the solution, and look for a multiple project startup. You'll want to select the client project and webservice project. Make sure the start with debugging.

This will allow you to set breakpoint in the webservice and actually have the code break!

2. You can setup VS to stop on any exceptions. You can find this under Debug/Exception. Have it break on all errors. I would do this just before you make your call to the webservice. This will break the code on the line causing the error.

3. Try placing a try/catch around your update code and place a break in the catch. This will let you see the error message.

Hope this helps.