Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 34155 invoked from network); 10 Feb 2010 15:35:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Feb 2010 15:35:55 -0000 Received: (qmail 15658 invoked by uid 500); 10 Feb 2010 15:35:55 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 15636 invoked by uid 500); 10 Feb 2010 15:35:55 -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 15626 invoked by uid 99); 10 Feb 2010 15:35:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Feb 2010 15:35:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Feb 2010 15:35:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 30BF8234C48D for ; Wed, 10 Feb 2010 07:35:28 -0800 (PST) Message-ID: <229373945.181521265816128198.JavaMail.jira@brutus.apache.org> Date: Wed, 10 Feb 2010 15:35:28 +0000 (UTC) From: "Jara Cesnek (JIRA)" To: issues@cxf.apache.org Subject: [jira] Issue Comment Edited: (CXF-2665) "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work. In-Reply-To: <452727930.145561265708128322.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831496#action_12831496 ] Jara Cesnek edited comment on CXF-2665 at 2/10/10 3:35 PM: ----------------------------------------------------------- Additional info : This happens only when result type from any method is List like "List". was (Author: cesnek): Additional info : This happens only when result or parameter type from any method is List like "List". > "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work. > ----------------------------------------------------------------------------------------------- > > Key: CXF-2665 > URL: https://issues.apache.org/jira/browse/CXF-2665 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Affects Versions: 2.2.6 > Reporter: Jara Cesnek > Priority: Critical > > Problem is that "remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work. > Methods from client (remote) interface return null values. > Reason: server leaks namespace from service implementation (not only interface) .. so client can read data and return null > Server code: > {code} > JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean(); > serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); //WSImpl.class > serverFactoryBean.setServiceBean(implementor); //WSImpl.class > serverFactoryBean.setDataBinding(new AegisDatabinding()); > serverFactoryBean.setAddress(url); > serverFactoryBean.setBus(cxfServlet.getBus()); > serverFactoryBean.create(); > {code} > Client code: > {code} > JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); > factory.setServiceClass(resultInterfaceClass); //WS.class > factory.setAddress(asURL); > factory.setDataBinding(new AegisDatabinding()); > Object remoteInterfaceImpl = factory.create(); > {code} > Interface: > {code} > @WebService(name="datove_zdroje", targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz") > public interface WS { > List getCodes(@WebParam(name = "baseCode") String baseCode); > } > {code} > Implementation: > {code} > @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS") > public class WSImpl implements WS { > @Override > public List getCodes(final String baseCode) { > return new ArrayList(); > } > } > {code} > *In this configuration client always receive "NULL" from method call !* > Problem is that server include in WSDL(and XML communication) namespace from service implementation (WSImpl.java) - not only from (client) interface (WS.java). > In this particular case servers "targetNamespace" is empty. So server made it up from class and package name. But client has only information from interface. > Client anticipate that "ServiceNamespace" is equals with "targetNamespace" from interface (WS.java) WebService annotation. > *Working WSImpl.java:* > {code} > @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", > *targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz"* //must be same as WS.java targetNamespace > ) > public class WSImpl implements WS { > {code} > *NON-Working WSImpl.java:* > {code} > @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", > *targetNamespace=""* //empty or other than WS.java targetNamespace > ) > public class WSImpl implements WS { > {code} > We need clarify real meaning of @WebService(targetNamespace="") on service implementation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.