/*
(non-Javadoc)

@see com.emc.ecs.nfsclient.nfs.NfsRequestBase#marshalling(com.emc.ecs.
nfsclient.rpc.Xdr)
347912
public void marshalling(Xdr xdr) {
        super.marshalling(xdr);
        xdr.putLong(_offsetToCommit);
        xdr.putUnsignedInt(_dataSizeToCommit);
    }
392521
public Vector<Object> marshallize()
    {
        Vector<Object> parameters = new Vector<Object>();        
        parameters.add(REFERENCE_REQUIREMENT_IDX, requirement.marshallize());
        parameters.add(REFERENCE_SPECIFICATION_IDX, specification.marshallize());
        parameters.add(REFERENCE_SUT_IDX, systemUnderTest.marshallize());
        parameters.add(REFERENCE_SECTIONS_IDX, StringUtils.defaultString(sections));
        
        parameters.add(REFERENCE_LAST_EXECUTION_IDX, lastExecution != null ? lastExecution.marshallize() : Execution.none().marshallize());
        return parameters;
    }
653300
public function marshall()
    {
        $toMarshall = $this->getToMarshall();

        try {
            if ($toMarshall instanceof QtiCoords) {
                $this->marshallCoords();

                return;
            } elseif ($toMarshall instanceof QtiPair) {
                $this->marshallPair();

                return;
            } elseif ($toMarshall instanceof QtiDuration) {
                $this->marshallDuration();

                return;
            } elseif ($toMarshall instanceof QtiPoint) {
                $this->marshallPoint();

                return;
            } else if ($toMarshall instanceof QtiIdentifier) {
                $this->marshallIdentifier();
                
                return;
            }
        } catch (PhpMarshallingException $e) {
            $msg = "An error occured while marshalling a QtiDatatype object.";
            throw new PhpMarshallingException($msg, PhpMarshallingException::RUNTIME, $e);
        }

        $className = get_class($toMarshall);
        $msg = "Cannot deal with QtiDatatype '${className}'.";
        throw new PhpMarshallingException($msg, PhpMarshallingException::RUNTIME);
    }
621134
public T payload(Object payload, Marshaller marshaller) {
        StringResult result = new StringResult();

        try {
            marshaller.marshal(payload, result);
        } catch (XmlMappingException e) {
            throw new CitrusRuntimeException("Failed to marshal object graph for message payload", e);
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to marshal object graph for message payload", e);
        }

        setPayload(result.toString());

        return self;
    }
1338175
public void unmarshalling(Xdr xdr) throws RpcException {
        super.unmarshalling(xdr);
        _fromDirectoryWccData = new NfsWccData(xdr);
        _toDirectoryWccData = new NfsWccData(xdr);
    }
452899
@SuppressWarnings("unchecked")
	public void marshal(Object obj, HierarchicalStreamWriter writer,
			MarshallingContext context) {
		XAttributeMap map = (XAttributeMap) obj;
		String lazy = "false";
		String buffered = "false";
		// register, whether lazy attribute map has been used,
		// and whether the implementation is buffered.
		if (map instanceof XAttributeMapLazyImpl) {
			lazy = "true";
			if (((XAttributeMapLazyImpl) map).getBackingStoreClass().equals(
					XAttributeMapBufferedImpl.class)) {
				buffered = "true";
			}
		} else if (map instanceof XAttributeMapBufferedImpl) {
			buffered = "true";
		}
		writer.addAttribute("lazy", lazy);
		writer.addAttribute("buffered", buffered);
		Collection<XAttribute> childAttributes = map.values();
		XAttribute parent = (XAttribute) context.get(XAttributeConverter.PARENT);
		if (parent instanceof XAttributeCollection) {
			childAttributes = ((XAttributeCollection) parent).getCollection();
		}
		for (XAttribute attribute : childAttributes) {
			writer.startNode("XAttribute");
			context.convertAnother(attribute,
					XesXStreamPersistency.attributeConverter);
			writer.endNode();
		}
	}
770000
@Override
    public void marshal(final Object object, final HierarchicalStreamWriter writer, final MarshallingContext context) {
        final CallDetailRecordList list = (CallDetailRecordList) object;

        writer.startNode("Calls");
        writer.addAttribute("page", String.valueOf(page));
        writer.addAttribute("numpages", String.valueOf(getTotalPages()));
        writer.addAttribute("pagesize", String.valueOf(pageSize));
        writer.addAttribute("total", String.valueOf(getTotalPages()));
        writer.addAttribute("start", getFirstIndex());
        writer.addAttribute("end", getLastIndex(list));
        writer.addAttribute("uri", pathUri);
        writer.addAttribute("firstpageuri", getFirstPageUri());
        writer.addAttribute("previouspageuri", getPreviousPageUri());
        writer.addAttribute("nextpageuri", getNextPageUri(list));
        writer.addAttribute("lastpageuri", getLastPageUri());

        for (final CallDetailRecord cdr : list.getCallDetailRecords()) {
            context.convertAnother(cdr);
        }
        writer.endNode();
    }
450838
public void marshalling(Xdr xdr) {
        super.marshalling(xdr);
        _attributes.marshalling(xdr);
        if (_guardTime == null) {
            xdr.putBoolean(false);
        } else {
            xdr.putBoolean(true);
            _guardTime.marshalling(xdr);
        }
    }
397444
public Vector<Object> marshallize()
    {
        Vector<Object> parameters = new Vector<Object>();
        parameters.add(REPOSITORY_NAME_IDX, StringUtils.defaultString(name));
        parameters.add(REPOSITORY_UID_IDX, StringUtils.defaultString(uid));
        parameters.add(REPOSITORY_PROJECT_IDX, project != null ? project.marshallize() : Project.newInstance("").marshallize());
        parameters.add(REPOSITORY_TYPE_IDX, type != null ? type.marshallize() : RepositoryType.newInstance("").marshallize());
        parameters.add(REPOSITORY_CONTENTTYPE_IDX, contentType.toString());
        parameters.add(REPOSITORY_BASE_URL_IDX, StringUtils.defaultString(getBaseUrl()));
        parameters.add(REPOSITORY_BASEREPO_URL_IDX, StringUtils.defaultString(getBaseRepositoryUrl()));
        parameters.add(REPOSITORY_BASETEST_URL_IDX, StringUtils.defaultString(getBaseTestUrl()));
        parameters.add(REPOSITORY_USERNAME_IDX, StringUtils.defaultString(username));
        parameters.add(REPOSITORY_PASSWORD_IDX, StringUtils.defaultString(password));
        parameters.add(REPOSITORY_MAX_USERS_IDX, maxUsers);
        return parameters;
    }
107812
protected Element marshallMessage(XMLObject message) throws MessageEncodingException {
        log.debug("Marshalling message");

        try {
            return XMLObjectSupport.marshall(message);
        } catch (MarshallingException e) {
            throw new MessageEncodingException("Error marshalling message", e);
        }
    }
286930
@Nonnull
  @OverrideOnDemand
  protected Marshaller createMarshaller () throws JAXBException
  {
    final JAXBContext aJAXBContext = getJAXBContext ();

    // create a Marshaller
    final Marshaller aMarshaller = aJAXBContext.createMarshaller ();

    // Validating (if possible)
    final Schema aSchema = getSchema ();
    if (aSchema != null)
      aMarshaller.setSchema (aSchema);

    return aMarshaller;
  }
1069199
public Nfs3RmdirRequest makeRmdirRequest(byte[] parentDirectoryFileHandle, String name) throws FileNotFoundException {
        return new Nfs3RmdirRequest(parentDirectoryFileHandle, name, _credential);
    }
17003
public static void marshallByteArray(byte[] array, ObjectOutput out) throws IOException {
      final int size = array == null ? NULL_VALUE : array.length;
      marshallSize(out, size);
      if (size <= 0) {
         return;
      }
      out.write(array);
   }
1327566
public void unmarshalling(Xdr xdr) throws RpcException {
        super.unmarshalling(xdr);
        unmarshallingAttributes(xdr);
        if (stateIsOk()) {
            _fsInfo = new NfsFsInfo(xdr);
        }
    }
305929
public Nfs3RmdirResponse wrapped_sendRmdir(NfsRmdirRequest request) throws IOException {
        RpcResponseHandler<Nfs3RmdirResponse> responseHandler = new NfsResponseHandler<Nfs3RmdirResponse>() {

            /* (non-Javadoc)
             * @see com.emc.ecs.nfsclient.rpc.RpcResponseHandler#makeNewResponse()
             */
            protected Nfs3RmdirResponse makeNewResponse() {
                return new Nfs3RmdirResponse();
            }

        };
        _rpcWrapper.callRpcWrapped(request, responseHandler);
        return responseHandler.getResponse();
    }
569696
public static XContentBuilder marshall(ApiDefinitionBean bean) throws StorageException {
        try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
            preMarshall(bean);
            builder
                .startObject()
                    .field("data", bean.getData())
                .endObject();
            postMarshall(bean);
            return builder;
        } catch (IOException e) {
            throw new StorageException(e);
        }
    }
921264
private static NfsGetAttributes makeAttributes(Xdr xdr) {
        NfsGetAttributes attributes = null;
        if (xdr != null) {
            attributes = NfsResponseBase.makeNfsGetAttributes(xdr);
        }
        return attributes;
    }