public Object fromOMElement(OMElement element) throws OMException, AxisFault { OMElement acceptPart = element.getFirstChildWithName( new QName(rmNamespaceValue, Sandesha2Constants.WSRM_COMMON.ACCEPT)); if (acceptPart == null) throw new OMException( SandeshaMessageHelper.getMessage( SandeshaMessageKeys.noAcceptPartInElement, element.toString())); acksTo = new AcksTo(rmNamespaceValue); acksTo.fromOMElement(acceptPart); return this; }
public OMElement toOMElement(OMElement element) throws OMException, AxisFault { OMFactory factory = element.getOMFactory(); if (acksTo == null) throw new OMException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.acceptNullAcksTo)); OMNamespace rmNamespace = factory.createOMNamespace(rmNamespaceValue, Sandesha2Constants.WSRM_COMMON.NS_PREFIX_RM); OMElement acceptElement = factory.createOMElement(Sandesha2Constants.WSRM_COMMON.ACCEPT, rmNamespace); acksTo.toOMElement(acceptElement); element.addChild(acceptElement); return element; }
public String getAddressingNamespaceValue() { if (acksTo != null) return acksTo.getAddressingNamespaceValue(); return null; }