473,395 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Webservice conversion status.

Hello,

I've, probably, a simple problem but I'm not able to figure the
solution!!!

I've realized a web service method that reads an Excel sheet and
convert the information in xml. This conversion is time consuming and
I've the idea to spilt the web service in 3 metods:

"Xls2Xml" that converts the files, generate the xml and store it in the
server, returns the id of the operation
"ConversionStatus" that ceck the progress of "Xls2Xml" sending the id
of the operation.
The client could ceck with "ConversionStatus" the progress of the
operation
Last metod "GetXml" to get the converted file sending the id of the
operation.

The client would fire "Xls2Xml", ceck with "ConversionStatus" if the
operation is completed and download the file with "GetXml".

My first idea was to write on the server a text file that contains the
status of the conversion.
The name of the file is the "GUID" of the operation.
With "ConversionStatus" i could read the text file and know the
progress of the operation.

This is a newbe solution obviusly!!!!
I imagine that there is the possibility to read directly with
ConversionStatus a variable generated by Xls2Xml that contains the
progress of the operation.

How I can do this? It involves threading?

Thanks Paolo Mattiollo

How i could

Jul 26 '06 #1
3 1977
Hi Paolo,

The consumer of your service can just call the GetXml method asynchronously so there might not be a need for any extra work on your
part.

If the web service proxy (client reference to your service) is generated in Visual Studio .NET it will contain two extra methods:
BeginGetXml and EndGetXml. Just add a "Web Reference" to your project and the proxy will be created for you.

Call BeginGetXml to invoke the method asynchronously. When the client has finished its local work it can call EndGetXml, which will
block until the server has finished its work. If the server has already sent a response then EndGetXml will immediately return to
the caller with the result of the method. BeginGetXml returns an IAsyncResult object that must be supplied to the EndGetXml method
to end the request. You can supply an AsyncCallback delegate to the BeginGetXml method which will be invoked on a ThreadPool thread
after the request has completed. If you don't want to use a callback just pass in null. The final parameter of BeginGetXml is an
optional state object that will be supplied to the callback by the IAsyncResult.AsyncState property. Assign whatever data you want
to this parameter, if any.

HTH

--
Dave Sexton

"iw3arv" <iw****@inwind.itwrote in message news:11**********************@75g2000cwc.googlegro ups.com...
Hello,

I've, probably, a simple problem but I'm not able to figure the
solution!!!

I've realized a web service method that reads an Excel sheet and
convert the information in xml. This conversion is time consuming and
I've the idea to spilt the web service in 3 metods:

"Xls2Xml" that converts the files, generate the xml and store it in the
server, returns the id of the operation
"ConversionStatus" that ceck the progress of "Xls2Xml" sending the id
of the operation.
The client could ceck with "ConversionStatus" the progress of the
operation
Last metod "GetXml" to get the converted file sending the id of the
operation.

The client would fire "Xls2Xml", ceck with "ConversionStatus" if the
operation is completed and download the file with "GetXml".

My first idea was to write on the server a text file that contains the
status of the conversion.
The name of the file is the "GUID" of the operation.
With "ConversionStatus" i could read the text file and know the
progress of the operation.

This is a newbe solution obviusly!!!!
I imagine that there is the possibility to read directly with
ConversionStatus a variable generated by Xls2Xml that contains the
progress of the operation.

How I can do this? It involves threading?

Thanks Paolo Mattiollo

How i could

Jul 27 '06 #2
Hi Dave Thanks for the response.

Unfortunately the proxy used in the client side is made by PHP and
doesn't have that metods.

Paolo
Dave Sexton ha scritto:
Hi Paolo,

The consumer of your service can just call the GetXml method asynchronously so there might not be a need for any extra work on your
part.

If the web service proxy (client reference to your service) is generated in Visual Studio .NET it will contain two extra methods:
BeginGetXml and EndGetXml. Just add a "Web Reference" to your project and the proxy will be created for you.

Call BeginGetXml to invoke the method asynchronously. When the client has finished its local work it can call EndGetXml, which will
block until the server has finished its work. If the server has already sent a response then EndGetXml will immediately return to
the caller with the result of the method. BeginGetXml returns an IAsyncResult object that must be supplied to the EndGetXml method
to end the request. You can supply an AsyncCallback delegate to the BeginGetXml method which will be invoked on a ThreadPool thread
after the request has completed. If you don't want to use a callback just pass in null. The final parameter of BeginGetXml is an
optional state object that will be supplied to the callback by the IAsyncResult.AsyncState property. Assign whatever data you want
to this parameter, if any.

HTH

--
Dave Sexton

"iw3arv" <iw****@inwind.itwrote in message news:11**********************@75g2000cwc.googlegro ups.com...
Hello,

I've, probably, a simple problem but I'm not able to figure the
solution!!!

I've realized a web service method that reads an Excel sheet and
convert the information in xml. This conversion is time consuming and
I've the idea to spilt the web service in 3 metods:

"Xls2Xml" that converts the files, generate the xml and store it in the
server, returns the id of the operation
"ConversionStatus" that ceck the progress of "Xls2Xml" sending the id
of the operation.
The client could ceck with "ConversionStatus" the progress of the
operation
Last metod "GetXml" to get the converted file sending the id of the
operation.

The client would fire "Xls2Xml", ceck with "ConversionStatus" if the
operation is completed and download the file with "GetXml".

My first idea was to write on the server a text file that contains the
status of the conversion.
The name of the file is the "GUID" of the operation.
With "ConversionStatus" i could read the text file and know the
progress of the operation.

This is a newbe solution obviusly!!!!
I imagine that there is the possibility to read directly with
ConversionStatus a variable generated by Xls2Xml that contains the
progress of the operation.

How I can do this? It involves threading?

Thanks Paolo Mattiollo

How i could
Jul 27 '06 #3
Hi Paolo,

I'm not familiar with PHP. Does it support asynchronous method calls?

It will save you some trouble if it does, otherwise I think your stuck with your original idea except that the PHP client will have
to periodically call a web service method to check on the status of the asynchronous request. I don't think there is any way, via a
web service, to raise an event or send a notification to the client.

--
Dave Sexton

"iw3arv" <iw****@inwind.itwrote in message news:11**********************@b28g2000cwb.googlegr oups.com...
Hi Dave Thanks for the response.

Unfortunately the proxy used in the client side is made by PHP and
doesn't have that metods.

Paolo
Dave Sexton ha scritto:
>Hi Paolo,

The consumer of your service can just call the GetXml method asynchronously so there might not be a need for any extra work on
your
part.

If the web service proxy (client reference to your service) is generated in Visual Studio .NET it will contain two extra methods:
BeginGetXml and EndGetXml. Just add a "Web Reference" to your project and the proxy will be created for you.

Call BeginGetXml to invoke the method asynchronously. When the client has finished its local work it can call EndGetXml, which
will
block until the server has finished its work. If the server has already sent a response then EndGetXml will immediately return
to
the caller with the result of the method. BeginGetXml returns an IAsyncResult object that must be supplied to the EndGetXml
method
to end the request. You can supply an AsyncCallback delegate to the BeginGetXml method which will be invoked on a ThreadPool
thread
after the request has completed. If you don't want to use a callback just pass in null. The final parameter of BeginGetXml is
an
optional state object that will be supplied to the callback by the IAsyncResult.AsyncState property. Assign whatever data you
want
to this parameter, if any.

HTH

--
Dave Sexton

"iw3arv" <iw****@inwind.itwrote in message news:11**********************@75g2000cwc.googlegro ups.com...
Hello,

I've, probably, a simple problem but I'm not able to figure the
solution!!!

I've realized a web service method that reads an Excel sheet and
convert the information in xml. This conversion is time consuming and
I've the idea to spilt the web service in 3 metods:

"Xls2Xml" that converts the files, generate the xml and store it in the
server, returns the id of the operation
"ConversionStatus" that ceck the progress of "Xls2Xml" sending the id
of the operation.
The client could ceck with "ConversionStatus" the progress of the
operation
Last metod "GetXml" to get the converted file sending the id of the
operation.

The client would fire "Xls2Xml", ceck with "ConversionStatus" if the
operation is completed and download the file with "GetXml".

My first idea was to write on the server a text file that contains the
status of the conversion.
The name of the file is the "GUID" of the operation.
With "ConversionStatus" i could read the text file and know the
progress of the operation.

This is a newbe solution obviusly!!!!
I imagine that there is the possibility to read directly with
ConversionStatus a variable generated by Xls2Xml that contains the
progress of the operation.

How I can do this? It involves threading?

Thanks Paolo Mattiollo

How i could

Jul 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Adam Short | last post by:
I am trying to write a routine that will connect a .NET server with a classic ASP server. I know the following code doesn't work! The data is being returned as a dataset, however ASP does not...
1
by: ehilario | last post by:
Hello everyone, I am trying to access a webservice to post some values via MSXML2.ServerXMLHttp The OS used is win2003 on both machines. When I access the local machine (A) which has the same...
1
by: Trisha Schneider | last post by:
I'm trying to convert a database from A97 to A2000. I made a copy of my database and then attempted the conversion. During the conversion, I get this message: "There were compilation errors...
3
by: Daniel Liberman | last post by:
Hi, everyone. That's my environment: - I have a pocket pc (iPAQ h4350) application developed with VSNET2003/C# that has a SQL Server CE Database, running. That's working fine. Obs: the pocket...
2
by: Chris | last post by:
Hi, I seem to be having some problems connecting to webservices. I'm running a C# client connected to a Java webservice using GLUE. The difference between the two request and response pairs...
2
by: Simon Shearn | last post by:
Hello - I'm trying to connect to a secure (HTTPS) webservice from a device running ..NET Compact Framework. I'm using the HttpWebRequest class. In cases where the server is unavailable,...
0
by: Rob C | last post by:
I have several methods implemented in a webservice written in C#. The methods execute SQL against a SQL Server 2005 db and returns a Dataset (as XML). I am utilizing the webservice from a VC++...
4
by: Jonathan | last post by:
I have a SQL stored procedure for adding a new record in a transactions table. It also has two return values: CounterID and IDKey. I want to create a webservice that accepts the 10 input...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.