OneAxisEllipsoid parameter allows the eclipse detector to take into account the flatness of the eclipsing body. This is related to the Z axis of the body frame you specify.
If your eclipsing body is one of the
CelestialBody available in Orekit (say Mars or Jupiter), then you can just call the
body.getBodyOrientedFrame() which will return the official reference frame defined by the IAU/IAG Working Group on Cartographic Coordinates and Rotational Elements of the Planets and Satellites (WGCCRE).
If your eclipsing body is not one of the bodies provided by Orekit, you need to creae its frame by yourself. The important part there will be to have this frame centered at the ellipsoid center and the Z axis aligned with the polar axis of the ellipsoid. The rotation around the Z axis (i.e. the directions of X and Y axes) is not important in this case because the ellipsoid has a rotational symmetry.