Solved

How to invoke activx/DLL that can create HTTPS posting wait reply type of applicaitons

Posted on 2006-06-10
4
279 Views
Last Modified: 2010-05-18
I have need to write an applicaitons that will runs on my 2003 NT servers. that will communicate with another external web site.  that accept https posting a commnad string... (following their format), then it will respond a message (in certain format).

The requirement of my program will

1. run continusously in the OS (no users interfaces).
2. it listen to request from a MSMQ, when there is a request.  it will
    a. format the request into a string.
    b. Open the winsocket with given IP address of remote web site,
       (I hope I use the right terms here)
    c. write the request string/message to that port.
   d.  wait for response from remote web site.
       d-1.  if no response within x seconds (time out),  it will drop the
               socket connect. do something else.
       d-2. get response.  drop the socket connection, return the message to
             requestor to MS-message queue.

    repeat step 2.  until a new request read with "stop".  it will then quiet.

This is very similar to 3 tier applications.  I just wondering

1. What tools, or sample code that you knows that support this type of situations?
2. IS vb6 better or vb.net better to use

I also know this type of things can be done in the ASP, but that require users
presence.   My requiredment does not need User presense.

I am looking for your input and advise.  sample code with example will be very helpful.

regards,

mshox1
0
Comment
Question by:mshox1
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:ronklein
ID: 16882429
Hi there,

If I understand you correctly, the terminology is as follows:
1. Windows service, that runs constantly.
2. The service polls the MSMQ for its messages, and transfers (parses) them into an inner format.
3. After a successful parsing, the service invokes a web request (https protocol), using a timeout wrapping.
4. The response from the web request is parsed into an inner format.
5. The parsed result is sent into the MSMQ.

Implementing all these is very easy using the dot net framework. Therefore, vb.net is by far a better implementation.
Some reasons:
1. Writing a system (Windows) service in VB6 is almost impossible. In vb.net you have a very nice project template for such thing.
2. In the dot net framework (version 2.0), you can easily create a class and parse it from / convert it to XML format (or binary format) using the default, out-of-the-box utilities that come with the framework.
3. There are some classes the deal with networking in the dot net frameworks that simplify the whole process of a web request. Furthermore, you can easily implement a timeout using an asynchronous handles so that the executing code uses a non-blocking thread that simply waits for the response from the web server.

In other words, work with dot net, and save a lot of development time...
0
 

Author Comment

by:mshox1
ID: 16882770
thank you very much for your advise.

do you know any sample codes of vb.net in the way you just described.  it seems the exact things I need.   In other words, I am looking ways to get me a quick start and shortest learning curve on this.   I used to use another platform for this sort of things,
the way you describe the .net framework 2.0 seems familer or me.  

thanks
0
 
LVL 1

Accepted Solution

by:
ronklein earned 500 total points
ID: 16886570
Hi again,

FOA, thanks for the feedback. I'm glad that my reply was useful.
As requested, here are a few links and ideas to get you started.
* 101 vb.net code examples, including: Windows service, MSMQ, Web requests (or services), multi-threading. It is THE jump-start:
http://msdn.microsoft.com/vbasic/downloads/code/101samples/

* Creating a Windows service is quite simple. The Visual Studio 2005 provides a template for such project. If you want to learn more:
http://www.developerfusion.co.uk/show/3441/2/

* Connecting to MSMQ - Try the follownig:
http://www.w3coder.com/vbnet/intromsmq.aspx

* A Web request is done using the object "HttpWebRequest", found in System.Net. You can find an example in the "101 examples" or here:
http://www.w3coder.com/ws/HttpWebRequest.aspx

Cheers,

Ron
0
 

Author Comment

by:mshox1
ID: 16886656
That is excellent.  I will follow up on this.  thank again.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now