So I've been trying to get CXF to deploy to a BEA Weblogic 10.0 application 
server. However, I am running into a number of issues. Most of them have to do 
with the numerous JARs that come with CXF and conflicts with BEA (surprise 
surprise). I've opened up support tickets with BEA anyway to see if they can 
help.

The most successful I have been with deploying CXF is using the following 
options in weblogic-application.xml:

<prefer-application-packages>
  <package-name>javax.jws.*</package-name>
  <package-name>javax.xml.ws.*</package-name>
  <package-name>javax.net.ssl.*</package-name>
</prefer-application-packages>

However, these settings throw a

java.lang.NoClassDefFoundError: javax/net/ssl/HostnameVerifier at
org.apache.cxf.transport.http.AbstractHTTPTransportFactory.getConnectionFactory(AbstractHTTPTransportFactory.java:244).



I've tried these settings as well:

<prefer-application-packages>
  <package-name>javax.jws.*</package-name>
  <package-name>javax.xml.ws.*</package-name>
</prefer-application-packages>

but seem to get:

javax.xml.ws.soap.SOAPFaultException: weblogic.net.http.SOAPHttpsURLConnection
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:168)
        at $Proxy90.process(Unknown Source)
Caused by: java.lang.ClassCastException: 
weblogic.net.http.SOAPHttpsURLConnection at 
org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(HttpsURLConnectionFactory.java:120)

On BEA's community support site there is this tidbit:
http://forums.bea.com/bea/thread.jspa?messageID=600039577&tstart=0

"Hi, I am working with HTTPS SSL Connections and is facing the problem of 
having the url.openConnection() returning type 
weblogic.net.http.SOAPHttpsURLConnection rather than the normal 
HTTPSURLConnection. I have done quite a lot of research to reach this 
conclusion, and found out there is a work around for this:

URL url = new URL(null, "https://www.etrade.com";, new 
com.sun.net.ssl.internal.www.protocol.https.Handler());
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();

I simulated it and it is returning: 
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl
I am not sure to how long I can depend on this work around. If anyone has an 
idea, please do tell me.

Looking at the CXF source code:

import javax.net.ssl.HttpsURLConnection;
public final class HttpsURLConnectionFactory

        HttpsURLConnection connection =
            (HttpsURLConnection) (proxy != null
                                   ? url.openConnection(proxy)
                                   : url.openConnection());

Do you guys think the way this is written is incorrect for cross 
compatibility? Also, I am a bit perplexed as to why when I decide to prefer 
javax.net.ssl.* I get of all things a NoClassDefFoundError. Any help kindly 
accepted. Thank you.


-Jeff 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to