Skip to content

How to configure apache CXF property org.apache.cxf.stax.maxChildElements in quarkus #1325

Answered by ppalaga
hikemachado asked this question in Q&A
Discussion options

You must be logged in to vote

As of Quarkus CXF 3.9.0, there is no way to do it via application.properties.

Around here the CXF docs says it can be done per Bus or Endpoint. If Bus is fine for you, an Init bean like this should work:

import jakarta.enterprise.event.Observes;

import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;

import io.quarkus.runtime.StartupEvent;

public class Init {

    void onStart(@Observes StartupEvent ev) {
        final Bus bus = BusFactory.getDefaultBus();
        bus.setProperty("org.apache.cxf.stax.maxChildElements", "1024");

    }
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ppalaga
Comment options

@hikemachado
Comment options

Answer selected by hikemachado
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants