Use EndpointReference builder instead of XML
diff --git a/src/com/google/enterprise/adaptor/sharepoint/SharePointAdaptor.java b/src/com/google/enterprise/adaptor/sharepoint/SharePointAdaptor.java
index fe92316..9e17469 100644
--- a/src/com/google/enterprise/adaptor/sharepoint/SharePointAdaptor.java
+++ b/src/com/google/enterprise/adaptor/sharepoint/SharePointAdaptor.java
@@ -1916,13 +1916,8 @@
@Override
public UserGroupSoap newUserGroup(String endpoint) {
- String endpointString
- = "<wsa:EndpointReference"
- + " xmlns:wsa='http://www.w3.org/2005/08/addressing'>"
- + "<wsa:Address>" + endpoint + "</wsa:Address>"
- + "</wsa:EndpointReference>";
- EndpointReference endpointRef = EndpointReference.readFrom(
- new StreamSource(new StringReader(endpointString)));
+ EndpointReference endpointRef = new W3CEndpointReferenceBuilder()
+ .address(endpoint).build();
return userGroupService.getPort(endpointRef, UserGroupSoap.class);
}
}