We study composite solitons, consisting of domain walls and vortex lines attaching to the walls in two-component Bose-Einstein condensates. When the total density of two components is homogeneous, the system can be mapped to the O(3) nonlinear sigma model for the pseudospin representing the two-component order parameter and the analytical solutions of the composite solitons can be obtained. Based on the analytical solutions, we discuss the detailed structure of the composite solitons in two-component condensates by employing the generalized nonlinear sigma model, where all degrees of freedom of the original Gross-Pitaevskii theory are active. The density inhomogeneity results in reduction of the domain wall tension from that in the sigma model limit. We find that the domain wall pulled by a vortex is logarithmically bent as a membrane pulled by a pin, and it bends more flexibly than not only the domain wall in the sigma model but also the expectation from the reduced tension. Finally, we study the composite soliton structure for actual experimental situations with trapped immiscible condensates under rotation through numerical simulations of the coupled Gross-Pitaevskii equations.