示例#1
0
  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;
  }
示例#2
0
  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;
  }
示例#3
0
 public String getAddressingNamespaceValue() {
   if (acksTo != null) return acksTo.getAddressingNamespaceValue();
   return null;
 }