addReferenceParameter(epr);
//
// create proxy - turn on tracing of SOAP messages
//
WsResourceClient client = new WsResourceClient(epr);
client.setTrace(tracing);
ServiceGroupClient sg = new ServiceGroupClient(epr);
sg.setTrace(tracing);
WsResourceClient[] members = sg.getMembers();
System.out.println("Addresses of each service group entry:\n");
EndpointReference repr = null;
EndpointReference sepr = null;
EndpointReference curr = null;
for (int n = 0; n < members.length; ++n){
System.out.println(members[n].getEndpointReference());
}
for (int n = 0; n < members.length; ++n){
System.out.println(members[n].getEndpointReference().getAddress());
curr = members[n].getEndpointReference();
if(curr.getAddress().toString().endsWith("OSGiBundleResource")){
String id = curr.getParameterString(new QName("http://ws.apache.org/muse/addressing", "ResourceId"));
if(repr == null && id != null && id.startsWith("dummy.bundle")){
repr = curr;
}
}
if(curr.getAddress().toString().endsWith("OSGiServiceResource")){
String id = curr.getParameterString(new QName("http://ws.apache.org/muse/addressing", "ResourceId"));
if(sepr == null && id != null && id.startsWith(("org.apache.muse.util.osgi.ResourceManagementImplementation"))){
sepr = curr;
}
}
}
//Query bundle relationships
epr = new EndpointReference(repr.getAddress());
Element[] parms = repr.getParameters();
for(int i=0;i<parms.length;i++){
epr.addParameter(parms[i]);
}
WsResourceClient resource_client = new WsResourceClient(repr);
resource_client.setTrace(tracing);
resource_client.getResourcePropertyDocument();
RelationshipsClient rc = new RelationshipsClient(epr);
rc.setTrace(tracing);
QName names[] = {
new QName("http://resource.management.osgi/Bundle","Requires","osgi")