Discussion:
CXF : setting maxChildElements on endpoint
Duchaine, David
2018-10-02 14:26:44 UTC
Permalink
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
b***@provinzial.de
2018-10-04 12:12:02 UTC
Permalink
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" <***@hydro.qc.ca>
An: "***@camel.apache.org" <***@camel.apache.org>
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.
Duchaine, David
2018-10-05 10:33:48 UTC
Permalink
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 : ***@provinzial.de [mailto:***@provinzial.de]
Envoyé : 4 octobre 2018 08:13
À : ***@camel.apache.org
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" <***@hydro.qc.ca>
An: "***@camel.apache.org" <***@camel.apache.org>
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 for
b***@provinzial.de
2018-10-05 12:40:40 UTC
Permalink
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" <***@hydro.qc.ca>
An: "***@camel.apache.org" <***@camel.apache.org>
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.
Loading...