public static void main(String[] args) {
try {
System.out.println("Test getMetadata for " + targetEPR.getAddress());
MexClient serviceClient = new MexClient();
Options options = new Options();
serviceClient.setOptions(options);
options.setTo(targetEPR);
options.setAction(DRConstants.SPEC.Actions.GET_METADATA_REQUEST);
System.out.println ("No DataLocator configured! Used AxisDataLocator");
OMElement method = serviceClient.setupGetMetadataRequest(null, null);
OMElement result = serviceClient.sendReceive(method);
System.out.println(result);
StringWriter writer = new StringWriter();
try {
result.serialize(XMLOutputFactory.newInstance()
.createXMLStreamWriter(writer));