fix bug related to logger in FHIRToolingClient
This commit is contained in:
parent
cc68880a52
commit
eb750c6bf0
|
@ -516,7 +516,7 @@ public class FHIRToolingClient {
|
|||
return p_out;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
handleException("Error performing operation '"+name+": "+e.getMessage()+"' (parameters = \"" + ps+"\")", e);
|
||||
handleException("Error performing tx2 operation '"+name+": "+e.getMessage()+"' (parameters = \"" + ps+"\")", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -517,7 +517,7 @@ public class FHIRToolingClient {
|
|||
return p_out;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
handleException("Error performing operation '"+name+": "+e.getMessage()+"' (parameters = \"" + ps+"\")", e);
|
||||
handleException("Error performing 2b operation '"+name+": "+e.getMessage()+"' (parameters = \"" + ps+"\")", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -277,11 +277,15 @@ public class FHIRToolingClient {
|
|||
URI url = resourceAddress.resolveOperationURLFromClass(resourceClass, name, ps);
|
||||
if (complex) {
|
||||
byte[] body = ByteUtils.resourceToByteArray(params, false, isJson(getPreferredResourceFormat()));
|
||||
if (client.getLogger() != null) {
|
||||
client.getLogger().logRequest("POST", url.toString(), null, body);
|
||||
}
|
||||
result = client.issuePostRequest(url, body, getPreferredResourceFormat(),
|
||||
"POST " + resourceClass.getName() + "/$" + name, TIMEOUT_OPERATION_LONG);
|
||||
} else {
|
||||
if (client.getLogger() != null) {
|
||||
client.getLogger().logRequest("GET", url.toString(), null, null);
|
||||
}
|
||||
result = client.issueGetResourceRequest(url, getPreferredResourceFormat(), generateHeaders(), "GET " + resourceClass.getName() + "/$" + name, TIMEOUT_OPERATION_LONG);
|
||||
}
|
||||
if (result.isUnsuccessfulRequest()) {
|
||||
|
@ -295,7 +299,7 @@ public class FHIRToolingClient {
|
|||
return p_out;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
handleException("Error performing operation '"+name+": "+e.getMessage()+"' (parameters = \"" + ps+"\")", e);
|
||||
handleException("Error performing tx3 operation '"+name+": "+e.getMessage()+"' (parameters = \"" + ps+"\")", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -274,11 +274,15 @@ public class FHIRToolingClient {
|
|||
URI url = resourceAddress.resolveOperationURLFromClass(resourceClass, name, ps);
|
||||
if (complex) {
|
||||
byte[] body = ByteUtils.resourceToByteArray(params, false, isJson(getPreferredResourceFormat()));
|
||||
if (client.getLogger() != null) {
|
||||
client.getLogger().logRequest("POST", url.toString(), null, body);
|
||||
}
|
||||
result = client.issuePostRequest(url, body, getPreferredResourceFormat(),
|
||||
"POST " + resourceClass.getName() + "/$" + name, TIMEOUT_OPERATION_LONG);
|
||||
} else {
|
||||
if (client.getLogger() != null) {
|
||||
client.getLogger().logRequest("GET", url.toString(), null, null);
|
||||
}
|
||||
result = client.issueGetResourceRequest(url, getPreferredResourceFormat(), generateHeaders(), "GET " + resourceClass.getName() + "/$" + name, TIMEOUT_OPERATION_LONG);
|
||||
}
|
||||
if (result.isUnsuccessfulRequest()) {
|
||||
|
@ -292,7 +296,7 @@ public class FHIRToolingClient {
|
|||
return p_out;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
handleException("Error performing operation '"+name+": "+e.getMessage()+"' (parameters = \"" + ps+"\")", e);
|
||||
handleException("Error performing tx4 operation '"+name+": "+e.getMessage()+"' (parameters = \"" + ps+"\")", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -306,11 +306,15 @@ public class FHIRToolingClient {
|
|||
URI url = resourceAddress.resolveOperationURLFromClass(resourceClass, name, ps);
|
||||
if (complex) {
|
||||
byte[] body = ByteUtils.resourceToByteArray(params, false, isJson(getPreferredResourceFormat()));
|
||||
if (client.getLogger() != null) {
|
||||
client.getLogger().logRequest("POST", url.toString(), null, body);
|
||||
}
|
||||
result = client.issuePostRequest(url, body, getPreferredResourceFormat(),
|
||||
"POST " + resourceClass.getName() + "/$" + name, TIMEOUT_OPERATION_LONG);
|
||||
} else {
|
||||
if (client.getLogger() != null) {
|
||||
client.getLogger().logRequest("GET", url.toString(), null, null);
|
||||
}
|
||||
result = client.issueGetResourceRequest(url, getPreferredResourceFormat(), generateHeaders(), "GET " + resourceClass.getName() + "/$" + name, TIMEOUT_OPERATION_LONG);
|
||||
}
|
||||
if (result.isUnsuccessfulRequest()) {
|
||||
|
@ -324,12 +328,11 @@ public class FHIRToolingClient {
|
|||
return p_out;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
handleException("Error performing operation '"+name+": "+e.getMessage()+"' (parameters = \"" + ps+"\")", e);
|
||||
handleException("Error performing tx5 operation '"+name+": "+e.getMessage()+"' (parameters = \"" + ps+"\")", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public Bundle transaction(Bundle batch) {
|
||||
Bundle transactionResult = null;
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue