public OMElement toOM()

in src/org/apache/kandula/context/impl/SimpleCoordinationContext.java [99:129]


	public OMElement toOM() {
		if (contextElement != null) {
			return contextElement;
		} else {
			SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
			OMNamespace wsCoor = factory.createOMNamespace(Constants.WS_COOR,
					"wscoor");
			OMElement contextElement = factory.createOMElement(
					"CoordinationContext", wsCoor);
			if (this.expires != 0) {
				OMElement expiresElement = factory.createOMElement("Expires",
						wsCoor);
				expiresElement.setText(Long.toString(this.expires));
				contextElement.addChild(expiresElement);
			}
			OMElement identifierElement = factory.createOMElement("Identifier",
					wsCoor);
			identifierElement.setText(this.activityID);
			contextElement.addChild(identifierElement);
			OMElement coorTypeElement = factory.createOMElement(
					"CoordinationType", wsCoor);
			coorTypeElement.setText(this.coordinationType);
			contextElement.addChild(coorTypeElement);
			OMElement registrationServiceElement = factory.createOMElement(
					"RegistrationService", wsCoor);
			EndpointReferenceFactory.endpointToOM(registrationServiceEpr,
					registrationServiceElement, factory);
			contextElement.addChild(registrationServiceElement);
			return contextElement;
		}
	}