Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a windows app which calls webservice functions on my server. If the functions runs successfully, it returns a dataset to my client app. What I want to know is how to get error messages from the webservice in the event the function does not run correctly to display in a msgbox on the client.

 

I have something similar to below:

 

<WebService> Public Function ReturnDataset(ByVal UserName) as Dataset

 

...function logic works

 

ReturnDataset = dataset

 

...function logic fails

 

???

 

End Function

 

 

 

Any thoughts?

Posted

I'm not following.

 

Are you saying that the web service would like something like this:

 

<WebService>Public Function GetClientUpdates() as dataset

 

Try

...logic to generate dataset

 

GetClientUpdates = dataset

 

Catch ex as Exception

Throw New Exception

 

End Try

 

 

Then my client looks like below...

 

 

Public Sub GetClientUpdates()

ws.BeginClientUpdatesToClient(" ", "", "", "10:45:00 07/3/00", AddressOf GetClientUpdatesCompleteInvoke, Nothing)

End Sub

 

Protected Sub GetClientUpdatesCompleteInvoke(ByVal ar As IAsyncResult)

Me.Invoke(New GetClientUpdatesDelegate(AddressOf Me.GetClientUpdatesComplete), New Object() {ar})

End Sub

 

Protected Delegate Sub GetClientUpdatesDelegate(ByVal ar As IAsyncResult)

Protected Sub GetClientUpdatesComplete(ByVal ar As IAsyncResult)

Try

Dim dsTemp As New Mohawk.MohawkWebServices.dsItems

dsTemp = ws.EndClientUpdatesToClient(ar)

 

dsI.Merge(dsTemp)

UpdateComplete = dsTemp.Items.Count

 

Catch ex As Exception

UpdateComplete = 0

End Try

 

End Sub

 

This is not working for me....

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...