CXF : setting maxChildElements on endpoint

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CXF : setting maxChildElements on endpoint

Duchaine, David
Hello everyone,

Camel version 2.21.2

We have configured a CXF Endpoint and getting the following exception while returning the response to the client:

Maximum Number of Child Elements limit (50000) Exceeded

While setting the

org.apache.cxf.stax.maxChildElements

as a system property on the JVM works, we'd prefer to have the property applied on a specific endpoint only.

As specified in the CXF Component doc, we tried setting the property on the URI as follows
but it doesn't work because we still hit the default limit:

properties.org.apache.cxf.stax.maxChildElements=100000

We've tried adding the following property but still no avail:

properties.org.apache.cxf.interceptor.OneWayProcessorInterceptor.USE_ORIGINAL_THREAD=true

Are we missing something here?

thanks,

David




Reply | Threaded
Open this post in threaded view
|

Antwort: CXF : setting maxChildElements on endpoint

bjoern.ohm
Hi,

perhaps you can use a configuration file (cxf.xml) like in
http://cxf.apache.org/docs/bus-configuration.html. The entry:

<cxf:bus>            
<cxf:properties>            
<entry key="org.apache.cxf.stax.maxChildElements" value="60000"/>          
 
</cxf:properties>    
</cxf:bus>

should work...

Best regards
Björn
 



Von:    "Duchaine, David" <[hidden email]>
An:     "[hidden email]" <[hidden email]>
Datum:  02.10.2018 16:27
Betreff:        CXF : setting maxChildElements on endpoint



Hello everyone,

Camel version 2.21.2

We have configured a CXF Endpoint and getting the following exception
while returning the response to the client:

Maximum Number of Child Elements limit (50000) Exceeded

While setting the

org.apache.cxf.stax.maxChildElements

as a system property on the JVM works, we'd prefer to have the property
applied on a specific endpoint only.

As specified in the CXF Component doc, we tried setting the property on
the URI as follows
but it doesn't work because we still hit the default limit:

properties.org.apache.cxf.stax.maxChildElements=100000

We've tried adding the following property but still no avail:

properties.org.apache.cxf.interceptor.OneWayProcessorInterceptor.USE_ORIGINAL_THREAD=true

Are we missing something here?

thanks,

David







 
Diese E-Mail könnte vertrauliche und / oder rechtlich geschützte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

This e-mail may contain confidential and / or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Reply | Threaded
Open this post in threaded view
|

RE: Antwort: CXF : setting maxChildElements on endpoint

Duchaine, David
Hi,

Won't setting the property on the bus be effective for all endpoints in the Camel context?

Reading the doc you reference, it says: Contextual properties which will be applied to all endpoints and clients using this bus

 Actually, I don't know how Camel manages all the CXF endpoints that are configured in the context.

 Is there a shared bus for all routes using the CXF component. A bus per route?

Thanks,

David

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]]
Envoyé : 4 octobre 2018 08:13
À : [hidden email]
Objet : Antwort: CXF : setting maxChildElements on endpoint

Courriel provenant de l’externe
ATTENTION, avant d’accéder à une pièce jointe ou à un lien de ce courriel, assurez-vous que celui-ci provient d’un tiers de confiance.

Hi,

perhaps you can use a configuration file (cxf.xml) like in
http://cxf.apache.org/docs/bus-configuration.html. The entry:

<cxf:bus>
<cxf:properties>
<entry key="org.apache.cxf.stax.maxChildElements" value="60000"/>

</cxf:properties>
</cxf:bus>

should work...

Best regards
Björn




Von:    "Duchaine, David" <[hidden email]>
An:     "[hidden email]" <[hidden email]>
Datum:  02.10.2018 16:27
Betreff:        CXF : setting maxChildElements on endpoint



Hello everyone,

Camel version 2.21.2

We have configured a CXF Endpoint and getting the following exception
while returning the response to the client:

Maximum Number of Child Elements limit (50000) Exceeded

While setting the

org.apache.cxf.stax.maxChildElements

as a system property on the JVM works, we'd prefer to have the property
applied on a specific endpoint only.

As specified in the CXF Component doc, we tried setting the property on
the URI as follows
but it doesn't work because we still hit the default limit:

properties.org.apache.cxf.stax.maxChildElements=100000

We've tried adding the following property but still no avail:

properties.org.apache.cxf.interceptor.OneWayProcessorInterceptor.USE_ORIGINAL_THREAD=true

Are we missing something here?

thanks,

David








Diese E-Mail könnte vertrauliche und / oder rechtlich geschützte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

This e-mail may contain confidential and / or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Reply | Threaded
Open this post in threaded view
|

Antwort: RE: Antwort: CXF : setting maxChildElements on endpoint

bjoern.ohm
Hi,

I think you are right.
But perhaps you can use your own (second) bus for some CXF-Enpoints, with
its own configuration file (http://camel.apache.org/cxf.html --> bus,
http://cxf.apache.org/docs/configuration-of-the-bus.html). But I have no
practical knowledge.

Wish you success, perhaps someone else can give you some helpful
advices...
Björn
 



Von:    "Duchaine, David" <[hidden email]>
An:     "[hidden email]" <[hidden email]>
Datum:  05.10.2018 12:34
Betreff:        RE: Antwort: CXF : setting maxChildElements on endpoint



Hi,

Won't setting the property on the bus be effective for all endpoints in
the Camel context?

Reading the doc you reference, it says: Contextual properties which will
be applied to all endpoints and clients using this bus

 Actually, I don't know how Camel manages all the CXF endpoints that are
configured in the context.

 Is there a shared bus for all routes using the CXF component. A bus per
route?

Thanks,

David

 
Diese E-Mail könnte vertrauliche und / oder rechtlich geschützte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

This e-mail may contain confidential and / or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.