return new StringRepresentation("Non-XML media type for entity body: "+entity.getMediaType().getName());
}
final DB db = (DB)getRequest().getAttributes().get(App.DB_ATTR);
final String name = getRequest().getAttributes().get("name").toString();
XMLRepresentationParser parser = new XMLRepresentationParser();
Document doc = null;
try {
DocumentDestination dest = new DocumentDestination();
Name [] names = { AdminXML.NM_PULL, AdminXML.NM_PUSH };
parser.parse(entity,AdminApplication.createAdminDocumentDestination(dest,names));
doc = dest.getDocument();
SyncProcess proc = new SyncProcess(db,doc.getDocumentElement());
String lname = proc.getName();
if (!lname.equals(name)) {
getResponse().setStatus(Status.CLIENT_ERROR_EXPECTATION_FAILED);
return new StringRepresentation("Cannot change the name of the target.");
}