jibx

Child element namespace overridden by the root element namespace in JIBX


I am getting below exception at runtime while unmarshalling response xml using jibx.

My root level binding has the namespace as 'abc.com/' but the child element tag has different namespace as xyz.com. During unmarshalling root level mapping element namespace is overridden for the child element namespace. below is the definition I added in the binding xml for the element tag.

<value style="element" name="ipName" get-method="getIpName" set-method="setIpName" ns="https://xyz.coms" />

Exception: org.jibx.runtime.JiBXException: Expected "{abc.com/}ipName" start tag, found "{xyz.com/}ipName"


Solution

  • I am bale to resolve this error. Here I got the answer http://marc.info/?l=jibx-users&m=122091431913533&q=raw.

    Just added separate mapping for the child element.