wood burning stoves 2.0*
The moose likes Servlets and the fly likes This is a real Challenge .... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "This is a real Challenge ...." Watch "This is a real Challenge ...." New topic
Author

This is a real Challenge ....

Nitin Dubey
Ranch Hand

Joined: Oct 30, 2000
Posts: 126

Hi folks,
This is a very typical situation wherein one needs to communicate to server thru a vb application. Let me explain it in brief.
The client is having a toolkit built in VB. This VB toolkit generates a XML document whos data is to be sent to the server. However, the server is written completely in JSP's. Now for sending the data to server I need to communicate between the client VB application and the server.
This is possible through ADODB or SOAP. And I was successful in doing it with SOAP. But I don't want to make the database connection available at the client side and I want to make use of such technologies that are approved by w3.
So, my friend please suggest me some method of solving this problem. Any sort of help from yours is welcome...
waiting for replies ....
nitin
Akanimo Udoh
Ranch Hand

Joined: Jun 11, 2001
Posts: 48
Nitin,
Your letter is a bit difficult to follow. Let me see if I understand the question properly:
1. You have a VB client
2. You have a JSP server
3. You want to transfer data from the VB client to the JSP server
4. You want to use a technique that is w3 approved, and not proprietary.
I'm assuming that you can make additions/modifications to the JSP server code. If so you may consider the following:
1. Create an entry point in the JSP server application to receive a post which will contain the xml data to be transferred (hopefully your xml data will be less than 64k?)
2. Your VB client will send a post to this entry point using the MSXML library's XMLHTTPRequest as follows:

(see:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/cutting0400.asp)
This has the added advantage of getting a response from the server on the same connection.
Hope this helps.
Akanimo.
[This message has been edited by Akanimo Udoh (edited July 09, 2001).]
Nitin Dubey
Ranch Hand

Joined: Oct 30, 2000
Posts: 126

thanx Akanimo for your post. Ya, u got the problem exactly. I will try with the sample code you have placed in the post. But, m not sure how do I capture the XML Object server side ?
thanx again,

nitin
Nitin Dubey
Ranch Hand

Joined: Oct 30, 2000
Posts: 126

Hello folks,
Its urgent. I m waiting for replies...

nitin
Nitin Dubey
Ranch Hand

Joined: Oct 30, 2000
Posts: 126

Hello folks,
We tested client application with an ASP. Its working fine. The code is as under
============= My VB Client ================
Set XMLHTTP = CreateObject("Microsoft.XMLHTTP")
XMLHTTP.open "GET", "http://199.199.199.1/hello.asp", False
xmltext = "<magazine>Hello Saradhi</magazine>"
Set xmldom = CreateObject("Microsoft.XMLDOM")
xmldom.loadXML xmltext
XMLHTTP.send xmldom
MsgBox XMLHTTP.responseText
=========== VB Client Ends ==============
Now how do I get the XML Dom object at my JSP ??
waiting for replies...

nitin
Akanimo Udoh
Ranch Hand

Joined: Jun 11, 2001
Posts: 48
Nitin,
Why don't you write a dummy JSP page that will just receive the data and display all the data transferred to it (it basically just a GET or POST operation). Then you'll see exactly what form the data is passed as and you can code accordingly.
I have not tried this out myself but just figured that it would work, so I can't really give a direct answer.
Akanimo.
Nitin Dubey
Ranch Hand

Joined: Oct 30, 2000
Posts: 126

Hi Akanimo,
Thanx for your help. I tried it several times. But I could not get a proper solution for this one. Due to time constraint I have to opt for another solution.
M running a java application now within which M calling VB program that will generate the XML for me.
thanx for your help..

nitin
 
 
subject: This is a real Challenge ....
 
Similar Threads
Java Learning
Automate WS Client Program
Writing a MS Client to access a Java SOAP Service
Problem Whit Special Characters on server side
Applets communicate with Visual Basic