Odd problem with a oneway webservice

K

Keith McDonald

We need to invoke a webservice method that will call an sp that may run
up to 1 hour so we want to start the sp then let the client continue
working. I have read about the OneWay:=true but calling the webservice
it seems to still wait until the service is finished before returning
to the client. Any ideas? - Code below..


In the webservice we define this method:


<SoapDocumentMethod(OneWay:=True), _
WebMethod(EnableSession:=True, Description:="STX processing of
imported invoices.")> _
Public Sub StartProcessingInvoices()

--code to run the sp which works as needed

End Sub

In the codebehind aspx page:

'Final call to webservice to start processing inported data
Dim wsInvoices As New STXProcessInvoices
Dim resultMessage As String

wsInvoices.StartProcessingInvoices()

...continue processing and displaying the aspx results page
to the client
 
K

Keith McDonald

This looks to be solved. We had the webservice in the same project as
the aspx page. Not sure what the difference is but putting it in as a
web reference and calling it that way fixed the problem.
 
M

m.posseth

I guess the difference is the threading mechanism used , in your code you
could have acomplished the same if you used a background worker

regards

Michel Posseth [MCP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top