You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Michael <mi...@destatis.de> on 2018/06/21 08:06:02 UTC

Cannot get outDropElements to work

Hi,we're using CXF 2.7.8, Java First approach, in Tomcat 8.5 under Java 8,
and Eclipse 4.3.I'm trying to remove elements from a SOAP response using the
TransformationFeature and outDropElements.First I created cxf.xml with a
bean definition and put it into into the source folder, from where it is
correctly copied on startup into WEB-INF/classes. In
WEB-INF/META-INF/CXF/beans.xml (linked by context-param
contextConfigLocation in web.xml) I added the feature using  However, I get
NoSuchBeanDefinitionException so it seems the definition is not honoured.
The same occurs if I use -Dcxf.config.file.url to point to the cxf.xml
elsewhere.I then replaced the reference in beans.xml with the bean
definition, which then seems to be honoured. To test this, I manipulated the
class name of the bean class to be incorrect and a corresponding
ClassDEfNotFoundError was thrown. So I continued using only beans.xml.The
service in question is called ManagementService and the method is
getPublishedNetworkServices. The class/type is NetworkServiceDTO, from which
I try to remove the *TimeStamp fields for compatibility reasons. I get no
errors but the fields are not removed from the response. I've been digging
through the CXF web site and StackOverflow a lot to get this together and
I'm not sure if I'm still doing something wrong or if it is not working for
another reason. I also tried the deep-drop approch using
outTransformElements, but to no avail. As we are approaching a release, I'd
prefer to avoid an upgrade to another CXF version.TIA for any of your highly
appreciatred help,Michael beans.xml
<http://cxf.547215.n5.nabble.com/file/t46107/beans.xml>  
managementservice.wsdl
<http://cxf.547215.n5.nabble.com/file/t46107/managementservice.wsdl>  
NetworkServiceDTO.java
<http://cxf.547215.n5.nabble.com/file/t46107/NetworkServiceDTO.java>  
web.xml <http://cxf.547215.n5.nabble.com/file/t46107/web.xml>  



--
Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html

Re: Cannot get outDropElements to work

Posted by Michael <mi...@destatis.de>.
I created a JIRA (https://issues.apache.org/jira/browse/CXF-7805) as it made
me feel better considering that it is company policy not to make any code
(unnecessarily) available to the public.

TIA & have a nice weekend,

Michael



--
Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html

Re: Cannot get outDropElements to work

Posted by Colm O hEigeartaigh <co...@apache.org>.
The easiest way it to put the project up on github somewhere. Failing that,
create a JIRA and attach the project to it.

Colm.

On Fri, Jul 20, 2018 at 1:36 PM, Michael <mi...@destatis.de>
wrote:

> Sorry for the long wait, we finally took the plunge of migrating to current
> versions of CXF and other third-party stuff, recreating the project from
> scratch and also migrating to Maven. However, the problem persists. I've
> put
> a test case together, it's basically the server stripped down to the one
> service and method in question. I tested with SOAPUI.
>
> How would you like me to make this available to you? An Eclipse project
> wold
> be fine?
>
> TIA,
>
> Michael
>
>
>
> --
> Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: Cannot get outDropElements to work

Posted by Michael <mi...@destatis.de>.
Sorry for the long wait, we finally took the plunge of migrating to current
versions of CXF and other third-party stuff, recreating the project from
scratch and also migrating to Maven. However, the problem persists. I've put
a test case together, it's basically the server stripped down to the one
service and method in question. I tested with SOAPUI.

How would you like me to make this available to you? An Eclipse project wold
be fine?

TIA,

Michael



--
Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html

Re: Cannot get outDropElements to work

Posted by Michael <mi...@destatis.de>.
I'll try to do that, will be back sometime next week.



--
Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html

Re: Cannot get outDropElements to work

Posted by Colm O hEigeartaigh <co...@apache.org>.
Can you put together a test-case to reproduce the problem?

Colm.

On Thu, Jun 21, 2018 at 9:06 AM, Michael <mi...@destatis.de>
wrote:

> Hi,we're using CXF 2.7.8, Java First approach, in Tomcat 8.5 under Java 8,
> and Eclipse 4.3.I'm trying to remove elements from a SOAP response using
> the
> TransformationFeature and outDropElements.First I created cxf.xml with a
> bean definition and put it into into the source folder, from where it is
> correctly copied on startup into WEB-INF/classes. In
> WEB-INF/META-INF/CXF/beans.xml (linked by context-param
> contextConfigLocation in web.xml) I added the feature using  However, I get
> NoSuchBeanDefinitionException so it seems the definition is not honoured.
> The same occurs if I use -Dcxf.config.file.url to point to the cxf.xml
> elsewhere.I then replaced the reference in beans.xml with the bean
> definition, which then seems to be honoured. To test this, I manipulated
> the
> class name of the bean class to be incorrect and a corresponding
> ClassDEfNotFoundError was thrown. So I continued using only beans.xml.The
> service in question is called ManagementService and the method is
> getPublishedNetworkServices. The class/type is NetworkServiceDTO, from
> which
> I try to remove the *TimeStamp fields for compatibility reasons. I get no
> errors but the fields are not removed from the response. I've been digging
> through the CXF web site and StackOverflow a lot to get this together and
> I'm not sure if I'm still doing something wrong or if it is not working for
> another reason. I also tried the deep-drop approch using
> outTransformElements, but to no avail. As we are approaching a release, I'd
> prefer to avoid an upgrade to another CXF version.TIA for any of your
> highly
> appreciatred help,Michael beans.xml
> <http://cxf.547215.n5.nabble.com/file/t46107/beans.xml>
> managementservice.wsdl
> <http://cxf.547215.n5.nabble.com/file/t46107/managementservice.wsdl>
> NetworkServiceDTO.java
> <http://cxf.547215.n5.nabble.com/file/t46107/NetworkServiceDTO.java>
> web.xml <http://cxf.547215.n5.nabble.com/file/t46107/web.xml>
>
>
>
> --
> Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com