Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 02F5D9BFE for ; Tue, 3 Apr 2012 07:13:12 +0000 (UTC) Received: (qmail 95449 invoked by uid 500); 3 Apr 2012 07:13:10 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 94771 invoked by uid 500); 3 Apr 2012 07:13:00 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 94741 invoked by uid 99); 3 Apr 2012 07:12:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 07:12:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 07:12:58 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A3EC9355986 for ; Tue, 3 Apr 2012 07:12:37 +0000 (UTC) Date: Tue, 3 Apr 2012 07:12:37 +0000 (UTC) From: "Dilip MD (Updated) (JIRA)" To: issues@cxf.apache.org Message-ID: <1447248956.5076.1333437157672.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <124495425.4895.1333432110622.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CXF-4222) ClientPolicy fails to get resolve in Websphere AS 7.00.21 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-4222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dilip MD updated CXF-4222: -------------------------- Description: Hi, I am trying to run a CXF client from embedded OSGi webapp in Websphere AS 7.0.0.21. The client using ClientPolicy class throws class cast exception when gets invoked. I need ClientPolicy class to set HTTP headers like proxy setting and also for HTTPS. I have seen in some forum where jaxwsproxyfactorybean usage has been recommended but don't know if that can be used for setting HTTP headers without ClientPolicy class. below is the sample code: ... Client client = ClientProxy.getClient(port); HTTPConduit http = (HTTPConduit) client.getConduit(); HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setConnectionTimeout(config.getConnectionTimeout()); httpClientPolicy.setProxyServer(config.getProxyHost()); httpClientPolicy.setProxyServerPort(config.getProxyPort()); .... With default axis2 engine provided by WAS, the exception is: java.lang.ClassCastException: org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler incompatible with org.apache.cxf.frontend.ClientProxy With axis2 engine disabling the exception is : java.lang.ClassCastException: com.sun.xml.internal.ws.client.sei.SEIStub incompatible with org.apache.cxf.frontend.ClientProxy I'm using below 2 CXF dependencies in pom.xml org.apache.cxf cxf-rt-frontend-jaxws 2.1.2 org.apache.cxf cxf-rt-transports-http 2.1.2 The same code works fine in Tomcat, JBoss and Weblogic app servers. Only problem appears in Websphere. was: Hi, I am trying to run a CXF client from embedded OSGi webapp in Websphere AS 7.0.0.21. The client using ClientPolicy class throws class cast exception when gets invoked. I need ClientPolicy class to set HTTP headers like proxy setting and also for HTTPS. I have seen in some forum where jaxwsproxyfactorybean usage has been recommended but don't know if that can be used for setting HTTP headers without ClientPolicy class. below is the sample code: ... Client client = ClientProxy.getClient(port); HTTPConduit http = (HTTPConduit) client.getConduit(); HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setConnectionTimeout(config.getConnectionTimeout()); httpClientPolicy.setProxyServer(config.getProxyHost()); httpClientPolicy.setProxyServerPort(config.getProxyPort()); .... With default axis2 engine provided by WAS, the exception is: Exception data: java.lang.ClassCastException: org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler incompatible with org.apache.cxf.frontend.ClientProxy at org.apache.cxf.frontend.ClientProxy.getClient(ClientProxy.java:93) With axis2 engine disabling the exception is java.lang.ClassCastException: com.sun.xml.internal.ws.client.sei.SEIStub incompatible with org.apache.cxf.frontend.ClientProxy I'm using below 2 CXF dependencies in pom.xml org.apache.cxf cxf-rt-frontend-jaxws 2.1.2 org.apache.cxf cxf-rt-transports-http 2.1.2 The same code works fine in Tomcat, JBoss and Weblogic app servers. Only problem appears in Websphere. > ClientPolicy fails to get resolve in Websphere AS 7.00.21 > --------------------------------------------------------- > > Key: CXF-4222 > URL: https://issues.apache.org/jira/browse/CXF-4222 > Project: CXF > Issue Type: Bug > Components: OSGi > Affects Versions: 2.1 > Environment: Websphere AS7.0.0.21in Windows XP and OSGI enabled web application > Reporter: Dilip MD > Labels: ClientPolicy, Websphere, > > Hi, > I am trying to run a CXF client from embedded OSGi webapp in Websphere AS 7.0.0.21. The client using ClientPolicy class throws class cast exception when gets invoked. I need ClientPolicy class to set HTTP headers like proxy setting and also for HTTPS. I have seen in some forum where jaxwsproxyfactorybean usage has been recommended but don't know if that can be used for setting HTTP headers without ClientPolicy class. > below is the sample code: > ... > Client client = ClientProxy.getClient(port); > HTTPConduit http = (HTTPConduit) client.getConduit(); > HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); > httpClientPolicy.setConnectionTimeout(config.getConnectionTimeout()); > httpClientPolicy.setProxyServer(config.getProxyHost()); > httpClientPolicy.setProxyServerPort(config.getProxyPort()); > .... > With default axis2 engine provided by WAS, the exception is: > java.lang.ClassCastException: org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler incompatible with org.apache.cxf.frontend.ClientProxy > With axis2 engine disabling the exception is : > java.lang.ClassCastException: com.sun.xml.internal.ws.client.sei.SEIStub incompatible with org.apache.cxf.frontend.ClientProxy > I'm using below 2 CXF dependencies in pom.xml > org.apache.cxf > cxf-rt-frontend-jaxws > 2.1.2 > org.apache.cxf > cxf-rt-transports-http > 2.1.2 > The same code works fine in Tomcat, JBoss and Weblogic app servers. Only problem appears in Websphere. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira