473,804 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

> 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(Webse rvice
consumer) and JavaWebserver(W ebservice 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 X509Certificate Store
Dim cert As X509Certificate
Dim lCertName As String
Dim certoken As
Microsoft.Web.S ervices2.Securi ty.Tokens.X509S ecurityToken
Dim objInBW As New WebServiceWSDLL ink.InboundWS
' Open and read the certificate store for
' the local machine account.

Store = X509Certificate Store.CurrentUs erStore
(X509Certificat eStore.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.Certifica tes

If InStr(cert.GetN ame(), "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.ClientC ertificates.Add (cert)

objInBW.UnsafeA uthenticatedCon nectionSharing = True
Dim xcertoken As New X509SecurityTok en(cert)
''create a new Signature object using the
X509SecurityTok en
''as a parameter for the Signature constructor
Dim signature1 As New MessageSignatur e(xcertoken)
''Along with the Tokens collection there is a
SoapContext.Sec urity.Elements
''collection that will allow you to add various WS- Security elements including
''a Signature element.
objInBW.Request SoapContext.Sec urity.Tokens.Ad d
(xcertoken)

objInBW.Request SoapContext.Sec urity.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.process SingleMessage(o bjMsg)

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

Nov 21 '05 #1
0 4547

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

Similar topics

6
7807
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 am rather green with PHP. Any help would be appreciated, Thad Rizzi
0
1678
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 all in the subdirectory coreservlets. Furthermore xyz.jar has the library that some of the coreservlets classes may cay on. I can't run the ShadowedTextFrame class from the current directory with java -classpath .;xyz.jar...
5
3954
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 scratch. I am from India, Can you help me suggesting some websites other than www.java.sun.com to get a start? Also the books needed for a beginner to undertand easily? Anyone can even mail to the above id for their personal suggestions......
1
3525
by: sky'ra | last post by:
Can anyone recommend a good J2EE book? Thx!
37
2769
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 its .Net strategy, which executives such as Chairman and Chief Software Architect Bill Gates said at the time was a "bet-the-company thing." But three years later, reactions are mixed as to whether that strategy, along with the vision that...
2
9039
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 forms before utilizing other web servers CGI, but I have no idea about server side scripting, what's available, or anything about it. Can someone point me in the right direction? Thanks, Ross Levis.
2
1533
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. After some operation that popup will be closed...And that operation should be updated in the Iframe source.(that is what ever operation we carried out in popup) Any code/help would really end my one week sleepless nights. Thanks in advance.
113
5322
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 the Python world, you're fine. But once you do, things go downhill. MySQLdb has version and platform compatibility problems. So does M2Crypto. The built-in SSL support is weak. Even basic sockets don't quite work right; the socket module...
8
1631
by: vermamanishbxr | last post by:
MY questin is What is difference b/w application server and web server?
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10326
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10075
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.