473,398 Members | 2,212 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,398 software developers and data experts.

2-way SSL VB.NET Client Consuming Webservices(JavaServer)

> Hi folks

This is a challenging and interesting topic. Need HELP on
this, would be good if some tips/techniques can be given
for the topic.

Using VB.NET client to connect to JavaWebserver. Don't
know how to use the 2-way SSL to communicate and make the
SSL handshake process( at Transport level https://)
transparent. Any .NET classes to make all the 2-way SSL
communication transparent between VB.Client(Webservice
consumer) and JavaWebserver(Webservice provider)???

My VB.NET Client is able to access the web service with
HTTP protocol BUT NOT HTTPS protocol(SSL port 443)

Where to add in the clientcert(X509) into the http object
request object ? And how to get the HTTP Response back to
parse in the XML details? Any .NET classes to do all these with ease?

Some advice or technical samples please?

Thanks in advance.!!!

This is the code snippet of what we are trying to do.
Would be great to get advise or technical solutions to
help me out.

-------------- Begin of Code
Dim Store As X509CertificateStore
Dim cert As X509Certificate
Dim lCertName As String
Dim certoken As
Microsoft.Web.Services2.Security.Tokens.X509Securi tyToken
Dim objInBW As New WebServiceWSDLLink.InboundWS
' Open and read the certificate store for
' the local machine account.

Store = X509CertificateStore.CurrentUserStore
(X509CertificateStore.MyStore)
Store.OpenRead()
' Search for all certificates and add all
' matching certificates to the certificate
collection.
Dim x As Integer = 0
For Each cert In Store.Certificates

If InStr(cert.GetName(), "UserA") Then
MsgBox("Issued To= {0}" & cert.GetName())
x = 1
Exit For
End If

Next
If x = 0 Then
MsgBox("Service is not able to encrypt the
response")
End If
objInBW.ClientCertificates.Add(cert)

objInBW.UnsafeAuthenticatedConnectionSharing = True
Dim xcertoken As New X509SecurityToken(cert)
''create a new Signature object using the
X509SecurityToken
''as a parameter for the Signature constructor
Dim signature1 As New MessageSignature(xcertoken)
''Along with the Tokens collection there is a
SoapContext.Security.Elements
''collection that will allow you to add various WS- Security elements including
''a Signature element.
objInBW.RequestSoapContext.Security.Tokens.Add
(xcertoken)

objInBW.RequestSoapContext.Security.Elements.Add
(signature1)
'we pull the certificate from the certificate
store
'and add it to the Tokens collection. We then and add the Signature object
'to the Elements collection.

'Finally we are calling the webservice object like
the 'following :

objretmsg = objInBW.processSingleMessage(objMsg)

------------- end of code------------------------------

Nov 21 '05 #1
0 4500

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

Similar topics

6
by: Thad Rizzi | last post by:
My webserver is an iSeries and I want to run some PHP scripts on it using SQL to access data on the iSeries. Does anyone have any exapmles or resources on the most effective way to do this? I...
0
by: gg | last post by:
I was playing with some free java code but I was miffed. In the current working directory, I have xyz.jar and a subdirectory coresrvlets. The classes of the package coreservlets are naturally...
5
by: Cherrish Vaidiyan | last post by:
Hello Pals, I am very much interested to master java. i know C and C++. I can handle programming to certain level in either language.I beleieve java is the king in OOP. i need to learn it from the...
1
by: sky'ra | last post by:
Can anyone recommend a good J2EE book? Thx!
37
by: asj | last post by:
interesting read from eweek about the dying hope surrounding .net http://www.eweek.com/article2/0,,1184728,00.asp The end of last month marked the third anniversary of Microsoft's launch of...
2
by: Ross Levis | last post by:
I need to write a web page to accept some input and then preferably save it to a unique text file on the hard disk. I'm running the Microsoft IIS web server on WinXP Pro. I've written input data...
2
by: sebastiraj | last post by:
I have one JSP program in which one iframe is defined. And the source of which is an another jsp. Contents of an iframe is in hyperlink. When i click any of the hyperlinks one popup box will come....
113
by: John Nagle | last post by:
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside...
8
by: vermamanishbxr | last post by:
MY questin is What is difference b/w application server and web server?
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.