Solved

Help! Trying to Build Asynchronous XML Web Service Consumed by .NET CF App...

Posted on 2004-04-02
4
186 Views
Last Modified: 2012-08-14
I'm trying to build an asynchronous XML web service that will allow a Pocket PC application to get an image from a remote server.  I don't want the image to be saved to the device or stored in a SQL CE DB because of memory constraints; I only want the image to be displayed in a mobile application as requested by the user, and wiped from memory after either: resetting the device, or after a period of time has elapsed (a la temp files in Internet Explorer).

Does anyone have any recommendations or ideas? Thanks.

PS  We are developing in C#.
0
Comment
Question by:lyptus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 15

Accepted Solution

by:
Timbo87 earned 250 total points
ID: 10742608
When you make a proxy class for the web service (using wsdl.exe or VS.NET), asynchronous methods are automatically generated. If you have a method named GetNumber in the web service, the proxy class will have three methods: GetNumber, BeginGetNumber, and EndGetNumber. You'll need to write a callback method that gets called when the web service returns the value. Asynchronous calls are exactly the same in web services as they are in regular apps.

There's an excellent article here:
http://builder.com.com/5100-6373-1044325.html
0
 
LVL 37

Assisted Solution

by:gregoryyoung
gregoryyoung earned 250 total points
ID: 10782622
no problem should be very simple ... should look something like the following ...

I can give you full code for parts 1&2 as the Image object does most of the work ...

a webservice which returns an image object (very easy)
a webservice client which consumes an image object (very easy )

a manager object which encapsulates this ....
sounds like it should be a process level (machine level would be better but most likely unnecesary) singleton (i.e. suppor CreateInstance() or something similar) and have a method for GetImage() ;

You said however that you wanted this to be an async webservice ... that should be fine changing to beginmethod() and endmethod() with a delegate if you are familiar with the pattern, if not I can provide a ton of examples on this. I would most likely check to see if I have the local file before issuing the async method as it will return near instantaneously.

As for possibly deleting it with a timeout it would be a fairly simple matter to lock your storage mechanism (hash, list, etc) and remove items which have become stale ... I would personally suggest something similar to the asp.net caching system if you have the time to implement it, where you monitor free resources on the device to determine how aggressive you are with removing items.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question