473,792 Members | 2,877 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 4546

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

Similar topics

6
7806
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
1677
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
3953
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
3524
by: sky'ra | last post by:
Can anyone recommend a good J2EE book? Thx!
37
2767
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
9038
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
1532
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
5314
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
1629
by: vermamanishbxr | last post by:
MY questin is What is difference b/w application server and web server?
0
9518
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
10211
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
10000
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
9033
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
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...
1
4111
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
2
3719
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2917
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.