diff options
Diffstat (limited to 'plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java')
-rw-r--r-- | plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java index d05e927ffd3..bd41d4dd545 100644 --- a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java +++ b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java @@ -2,11 +2,12 @@ package org.eclipse.osee.ote.master.rest.client.internal; import java.net.URI; import java.util.concurrent.Callable; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import org.eclipse.osee.jaxrs.client.JaxRsClient; import org.eclipse.osee.ote.master.rest.client.OTEMasterServerResult; import org.eclipse.osee.ote.master.rest.model.OTEServer; -import com.sun.jersey.api.client.WebResource; public class AddServer implements Callable<OTEMasterServerResult> { @@ -24,10 +25,9 @@ public class AddServer implements Callable<OTEMasterServerResult> { public OTEMasterServerResult call() throws Exception { OTEMasterServerResult result = new OTEMasterServerResult(); try { - WebResource resource = webClientProvider.createResource(uri); - resource.path(OTEMasterServerImpl.CONTEXT_NAME).path(OTEMasterServerImpl.CONTEXT_SERVERS).accept( - MediaType.APPLICATION_XML).post(server); - + WebTarget resource = webClientProvider.target(uri); + resource.path(OTEMasterServerImpl.CONTEXT_NAME).path(OTEMasterServerImpl.CONTEXT_SERVERS).request( + MediaType.APPLICATION_JSON).post(Entity.json(server)); } catch (Throwable th) { result.setSuccess(false); result.setThrowable(th); |