Using SSL from EJB to non-WLS web server
I have a need for an EJB that I am writing (for WLS 6.0) to communicate with
another web server via SSL. The other web server requires that I pass a Client
Certificate to authenticate myself. The remote web server is NOT a WebLogic
server. I see no references in the Bea documentation to how to achieve this.
I have tried to create a new URL with "https://...". I call openConnection() on
the URL instance, and my EJB gets back an instance of
weblogic.net.http.HttpsURLConnection. This class doesn't appear to be
documented. Does anybody have any ideas how I can use this class to pass my
Client key and Cert chain?
When I tried to use the URLConnection class returned, it threw an exception when
I tried to open a stream. The stack trace shows lots of classes that lead me to
believe that support exists for this functionality. Here is a snippet from the
stack dump:
java.net.SocketException: Connection aborted by peer: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:72)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:130)
at weblogic.security.SSL.SSLSocket.sendRecord(SSLSocket.java:964)
at
weblogic.security.SSL.SSLSocket.sendChangeCipherSpec(SSLSocket.java:926)
at weblogic.security.SSL.SSLSocket.clientInit(SSLSocket.java:477)
at weblogic.security.SSL.SSLSocket.initialize(SSLSocket.java:245)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:194)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:45)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:156)
at weblogic.net.http.HttpClient.<init>(HttpClient.java:85)
at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:34)
at weblogic.net.http.HttpClient.New(HttpClient.java:119)
at
weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:99)
at
weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:146)
The only documentation I have found is under the 5.1 docs, referencing how you
can use the JNDI Environment to establish a connection to a remote WLS JNDI
tree. If URLs are a resource that can be pooled by WLS, I would like to take
advantage of that functionality. Otherwise, I will have to fall back to the
primitives and roll my own SSLSocket classes. I would expect that there is
support buried somewhere in the product, it is just a question of figuring out
how to use it.
Thanks for any and all suggestions!
Joe
Joe,
Apparently weblogic.net.http.HttpsURLConnection isn't documented although 6.0SP2 has a new example called examples/security/sslclient that shows how to use it.
Paul
On Fri, 27 Jul 2001 00:47:17 GMT, [email protected] (Joe Rider) wrote:
I have a need for an EJB that I am writing (for WLS 6.0) to communicate with
another web server via SSL. The other web server requires that I pass a Client
Certificate to authenticate myself. The remote web server is NOT a WebLogic
server. I see no references in the Bea documentation to how to achieve this.
I have tried to create a new URL with "https://...". I call openConnection() on
the URL instance, and my EJB gets back an instance of
weblogic.net.http.HttpsURLConnection. This class doesn't appear to be
documented. Does anybody have any ideas how I can use this class to pass my
Client key and Cert chain?
When I tried to use the URLConnection class returned, it threw an exception when
I tried to open a stream. The stack trace shows lots of classes that lead me to
believe that support exists for this functionality. Here is a snippet from the
stack dump:
java.net.SocketException: Connection aborted by peer: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:72)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:130)
at weblogic.security.SSL.SSLSocket.sendRecord(SSLSocket.java:964)
at
weblogic.security.SSL.SSLSocket.sendChangeCipherSpec(SSLSocket.java:926)
at weblogic.security.SSL.SSLSocket.clientInit(SSLSocket.java:477)
at weblogic.security.SSL.SSLSocket.initialize(SSLSocket.java:245)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:194)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:45)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:156)
at weblogic.net.http.HttpClient.<init>(HttpClient.java:85)
at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:34)
at weblogic.net.http.HttpClient.New(HttpClient.java:119)
at
weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:99)
at
weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:146)
The only documentation I have found is under the 5.1 docs, referencing how you
can use the JNDI Environment to establish a connection to a remote WLS JNDI
tree. If URLs are a resource that can be pooled by WLS, I would like to take
advantage of that functionality. Otherwise, I will have to fall back to the
primitives and roll my own SSLSocket classes. I would expect that there is
support buried somewhere in the product, it is just a question of figuring out
how to use it.
Thanks for any and all suggestions!
Joe
Similar Messages
-
SSL from EJB using Verisign API
I'm trying to make a call from a session bean in WL6.1 SP1 to Verisign's PFProAPI
class.
I have successfully used the API in other setups (in servlets, etc.), but cannot
seem to get it to work from within an EJB.
The verisign test server just keeps returning "-8 SSL Connection Failed". Is there
someting WL is doing to prevent the connection?
Thanks
jawHi,
Can you post your code and exception?
Regards,
Richard Wallace
Senior Developer Relations Engineer
BEA Support.
"jaw" <[email protected]> wrote:
>
I'm trying to make a call from a session bean in WL6.1 SP1 to Verisign's
PFProAPI
class.
I have successfully used the API in other setups (in servlets, etc.),
but cannot
seem to get it to work from within an EJB.
The verisign test server just keeps returning "-8 SSL Connection Failed".
Is there
someting WL is doing to prevent the connection?
Thanks
jaw -
We are evaluating WebLogic server 6.1 (trial version). We have a servlet which uses SSL to set up secure connections with mainframes. We do not use WebLogic's securtiy APIs, but instead use the SSLava Toolkit and RSA Data's RSA libraries which we include as jars in our servlet's WEB-INF/lib directory.
When we run the servlet and attempt an SSL connection to a host we get the following exception:
java.lang.InternalError: COM.rsa.jsafe.i: A JSAFE_SymmetricCipher object of RC4 is not available on any of the devices. (Java)
At the top of exception's stack trace, there is an SSLava call which is failing.
We do not get this exception when running on other app servers (e.g. IBM WebSphere).
Any help would greatly be appreciated.
thank you,
EliHi Wenny,
Did you figure out how to convert .txt to .der format within openssl?
If yes, can you please share the answer, I am having the same problem.
Thanks much,
Hong -
EPS Fonts using PrintToPrinter and export to PDF on web server
Post Author: leighlmorgan
CA Forum: .NET
I'm trying to print a Crystal10 report from a web server using PrintToPrinter and exporting it to PDF at the same time for audit purposes. My problem is that the report uses Rotis EPS font which doesn't print correctly (substituted by Arial it appears) or export correctly to PDF. But it does print OK from the web client and exports to RTF, Excel and Word OK.
If I logon to the server as the identity account that the web server is running under (in order to have access to installed printers) then it can print Rotis perfectly happily.
I have tried another EPS font and that also fails to print, so I'm guessing EPS fonts are the root of the problem.
What do I need to do to make EPS fonts work?In a "word"; you can not. Not with the Crystal Reports SDK anyhow. There are ADOBE provided APIs that will allow merging pf PDF files and possibly other 3rd party tools, but no CR SDK will do that for you.
Ludek -
Using static include directove problem in ONE web server 6.1
Hi,
I am using sun ONE web server 6.1 to serve jsp pages with custom tags.
All the jsp includes used are static (@include).
I have card.jsp that includes common.jsp and specific_page.jsp.
specific_page.jsp includes generic_page_header.jsp.
common.jsp has the taglib directive.
specific_page.jsp and generic_page_header.jsp use custom tags defined in the taglib directive.
It appears that the custom tags in specific_page.jsp are parsed without a problem, but the custom tags in generic_page_header.jsp generate the following exception: WEB4105: End of content reached while more parsing required: tag nesting error?
When I manually pasted the code from generic_page_header.jsp into specific_page.jsp the page was parsed successfully.
Can anyone help with this problem?
Thanks,
OdedHi,
I am using sun ONE web server 6.1 to serve jsp pages with custom tags.
All the jsp includes used are static (@include).
I have card.jsp that includes common.jsp and specific_page.jsp.
specific_page.jsp includes generic_page_header.jsp.
common.jsp has the taglib directive.
specific_page.jsp and generic_page_header.jsp use custom tags defined in the taglib directive.
It appears that the custom tags in specific_page.jsp are parsed without a problem, but the custom tags in generic_page_header.jsp generate the following exception: WEB4105: End of content reached while more parsing required: tag nesting error?
When I manually pasted the code from generic_page_header.jsp into specific_page.jsp the page was parsed successfully.
Can anyone help with this problem?
Thanks,
Oded -
Using private key installed on Sun One web server in java code.
Hi,
I am digitally signing an XML string. I have been able to successfully do this using the .keystore and the JSSE API.
I need to run this code in the SUN ONE Web server, hence I have installed a self signed cert in the web server, using the web console.
I need to load the .keystore that is being maintained by the Sun One Web Server in my Java program as a �KeyStore� object
Presently I am using the following JSSE calls:
KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());
// Load the keystore contents
FileInputStream in = new FileInputStream(keystoreFile);
keystore.load(in, keystorePassword);
in.close();
Now how do I access the keystore and the certs that I have added in the web server? Is there any SUN API for this?
Any help will be appreciated!
Regards,
Nandan
Message was edited by:
NANDANThe global zone should offer no services to the network except services required to administer the system. SSH from known IPs. Put everything in zones for the security of the system. Zones have no performance penalty so there is no advantage to running on the host system in the global zone.
Sun's Java Enterprise server software webserver, directory server, etc required a full zone due to Solaris Package issues or conflicts; writing stuff in /usr; or both. A whole root for this software should not be a big deal. I create zones 9 at a time numbered in sequence. Zone 8 and 9 are whole root zones for requirements such as this.
I'll leave to others to alert us if the whole root zone requirement changes for Sun's Java Enterprise Server software.
Message was edited by:
jgmarce -
How to save image using an image object in servlet on web server
I'll be very thankful to anyone who helps me in this matter.
i developed an applet which draws on a buffered image.
now i want to save this buffered image as a jpg image on the web server.
i know i have to use servlets or jsp for this.
but i want to use servlet for specific reasons.
can anyone plz provide me the code for taking an image object from an applet and saving it thru servlet.
i need this solution as soon as possible.
thanks in advance.Take a look around for URLConnection, and Applet to Servlet communication (also check the [url http://forum.java.sun.com/forum.jsp?forum=33]Servlet forum).
Basic concepts will be to open a URLConnection to the URL mapped on your server for the servlet, then send the image, byte by byte, to the servlet, then ask for a reply from the servlet.
Once asked for a reply the servlet will need to take the image sent to it (hopefully via an HTTP post) and copy it to a location on disk. (You could have a parameter to the request that tells you want to name the file...)
As for the converting buffered image to JPEG, I haven't done this before, but I know others have. You can look around (more likely to find it in the [url http://forum.java.sun.com/forum.jsp?forum=31]Java Programing[ul] forum) for the code needed. -
Can send to SMTP using SSL from everywhere but home!
Hi all,
This is a very very peculiar problem and god knows I have had my share of strange problems with computers but I think this one tops them all. The situation is the following:
I would like to be able to send email using my work SMTP server which requires a secured SSL connection. I have the correct configuration in Mail. When I am at work, I am able to send emails with no problems. When I am anywhere else (free wifi at mcDonalds, friend's home,..) I can send no problem....But I CAN'T SEND FROM HOME!!
I get an error message telling me to try another server. I have tried pinging the server from home and there is no problem there. I have also tried Outlook Express running on Parallels on the same machine and from home and there is also no problem: the emails go through!
If anyone has any suggestions, I would really appreciate it as I am about to go crazy!
Thanks!K.,
Try a test by creating a New User Account, and as that New User launch Mail and try setting up this work related account, and then test sending. See the following if not familiar with adding a new user account:
http://docs.info.apple.com/article.html?path=Mac/10.5/en/8235.html
The reason for doing this is to test the Mail app itself, and not to permanently switch to a new user account. If this account is a POP account, be sure to select for it to leave messages on the server after download. That would not be an issue with type IMAP.
Ernie -
Hello,
In fact I have 2 questions.
1). Can I use JMS inside my EJBeans (I mean, obtain connections, create sessions, create producers/consumers, send/receive messages)? If I can not, please explain in a couple of words, why?
2). Can I use static variables inside entity beans?
Any suggestions will be highly appreciated.
Thank you,
densimf.1. yah i think there is no issue in this
2. entity bean object represent a single row in a database. so doesnt understand the significance of having a static field in this. generally it is not used i feel. -
Use Airport Extreme Disk as a local web server
Hello!
I have an Airport Extreme (802.11n) with a hard disk connected and shared using Airport Disk. I'd like to install Apache HTTP server on the connected drive so that I can host a local (available to intranet users only) web site. I am running into an error compiling Apache 2.2.9, but I'm thinking it might be a limitation of what is possible on an airport disk. Does anyone have any suggestions? I'd really appreciate it! Thanks.
Best,
JayDuane:
Thank you for your response. Maybe Apple file share can help me accomplish what I want but I think FTP is the easiest means for my needs. Ill have to do more research. Ultimately, I want other people to be able to send my digital files ( up to 2-3 GB at a time) . Now I , have a converted Windows machine going through a linksys router. That was relativly easy to set up as a server able to receive FTP. I was hoping I could reduce all that machine and energy down to a single HD but it looks like that is not possible. -
Can I use ISAPI plug-in with MS Personal web server
I have NT Workstation and PWS (which is to be similar to IIS 4.0 in
functionality), may I use ISAPI plug-in to WLS 5.1?
Thanks
ArgynSee this: <br />
http://docs.services.mozilla.com/howtos/run-sync.html -
Can I use forms Central forms on my own web server.
Or does it have to be business catalyst?
FormsCentral is a cloud service and the forms are hosted on our web servers. However, you can embed our forms on your website using the embed code we provide.
Also, FormsCentral is not related to Business Catalyst.
Randy -
Use values from other Excel template on BPC server in BPC report
Hi Guru's,
I'm struggling with the following.
In a BPC report I want to make the rowkeyrange dynamic and centrally adjustable with help of another static excel template placed on the BPC server.
I've tried the following formula in the rowkeyrange cells:
=EVSVR()&"/"&EVAST()&"/"&EVAPP()&"/eExcel/"&[ROWKEYRANGE.xlt]Sheet1!A1
but it keeps reffering to my local file...
Anyone with ideas how to solve this?
Regards,
Vincent BeumerI believe that to reference the dynamic template file you can use a relative path from the location of the report file in the user's BPC folder. So something like ./wizard/tempate_file.xlt
I agree that it would be nice to be able to reference a file that is actually stored on the BPC server, so that it is pulled down to the client only when needed. Maybe we can convince SAP to deliver a function like this
Ethan -
How can i make sure ejb container starts before web server
When starting the application server which one starts first?
Our system requires ejb container to start first.
Currently when i test it, the web container starts before ejb sometimes.
Is there any way to force the ejb container to start up before the web container starts?What exactly is the dependency you have in your application? The Java EE spec does not
impose any requirements on the order in which the different modules within an .ear are
instantiated.
--ken -
Newbie, How Do you transfer a site from Remote Host to Local Web Server
already exists to my local IIS server. I cannot figure it
out. I keep going in circles with Manage Sites, creating the folder
in the Inetpub/wwwroot folder and I need some help to get the whole
site locally so I can work on it. I use to use Frontpage but my
developers cannot stand the extra code it puts in and it's not
google friendly. So I decided to use Dreamweaver to create and
manage my sites.
Thanks for all the help in advance.In the file panel, view the remote site and select the top
level folder. Then right click and select get.
Maybe you are looking for
-
As I said, It's now frozen and I cannot use my iphone basically. WHen I turn it back on, it goes to the facebook screen. It doesnt go the the lock screen first. I've tried to shut it off but thats kinda hard because my lock button is broken. Please H
-
Hi all, My iWeb 08 publishes to my web space within my mobile me package. After the change to me from .mac, I stopped using my @mac e-mail address and have started using @me instead. Further following a few issues when updating web galleries I decide
-
Rich Client (Ajax) JSF in jdev 10
hi, Could i use ADF Faces Components 11-ji3 tag lib on jdeveloper 10?
-
System variable for find the method BOR / workflow
Hi, I am working with one workflow . I am displaying tcode FB60 in edit mode( FV60) for the approver( method FIPP.Change ). I wanted to differentiate technically the tcodes that are executing through manually and thorough BOR method. Is there any sy
-
I am current obtaining my OCP (Developer) in about 3 weeks. 1 test to go. I was wondering. the certification is based on the 6i release, now that forms 9i is out, should this be a concern to me, as in should I start to learn forms 9i, or stick with 6