public static String getResourceId(EndpointReferenceType endpointReferenceType)
{
System.out.println("Getting resourceid for epr: " + endpointReferenceType.getAddress().getStringValue());
GetResourcePropertyDocument getResourcePropertyDocument = GetResourcePropertyDocument.Factory.newInstance();
getResourcePropertyDocument.setGetResourceProperty(IdentityCapability.PROP_NAME_RESOURCE_ID);
XmlObject xmlObject = sendRequest(getResourcePropertyDocument, "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl/GetResourceProperty", new XmlBeansEndpointReference(endpointReferenceType));
String resourceID = null;
if (xmlObject instanceof GetResourcePropertyResponseDocument.GetResourcePropertyResponse)
{
GetResourcePropertyResponseDocument.GetResourcePropertyResponse getResourcePropertyResponse = (GetResourcePropertyResponseDocument.GetResourcePropertyResponse) xmlObject;
XmlObject[] childElements = XmlBeanUtils.getChildElements(getResourcePropertyResponse);