HI,
I am trying to do sign on prodess, i provided config file pah and privita cert.
getting folloewing error, please help
here is java code:
package Gen_CMISDP.java;
import com.wm.data.*;
import com.wm.util.Values;
import com.wm.app.b2b.server.Service;
import com.wm.app.b2b.server.ServiceException;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import com.google.common.net.UrlEscapers;
import com.oracle.bmc.http.signing.RequestSigningFilter;
public final class signIN_OCI_SVC
{
/**
* The primary method for the Java service
*
* @param pipeline
* The IData pipeline
* @throws ServiceException
*/
public static final void signIN_OCI(IData pipeline) throws ServiceException {
IDataCursor pipelineCursor = pipeline.getCursor();
String configurationFilePath = IDataUtil.getString( pipelineCursor,
"configurationFilePath" );
String profile = "DEFAULT";
String instanceId = null;
String error=null;
try {
RequestSigningFilter requestSigningFilter =
RequestSigningFilter.fromConfigFile(configurationFilePath, profile);
Client client =
ClientBuilder.newBuilder().build().register(requestSigningFilter);
WebTarget target =
client.target("https://iaas.us-phoenix-1.oraclecloud.com")
.path("20160918")
.path("instances")
.path(UrlEscapers.urlPathSegmentEscaper().escape(instanceId));
Invocation.Builder ib = target.request();
ib.accept(MediaType.APPLICATION_JSON);
Response response = ib.get();
// MultivaluedMap <String, Object> responseHeaders = response.getHeaders();
//System.out.println(responseHeaders);
InputStream responseBody = (InputStream) response.getEntity();
try (final BufferedReader reader =
new BufferedReader(new InputStreamReader(responseBody,
StandardCharsets.UTF_8))) {
StringBuilder jsonBody = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
jsonBody.append(line);
}
IDataUtil.put( pipelineCursor, "jsonBody", jsonBody.toString() );
pipelineCursor.destroy();
}
} catch (Exception e) {
// TODO Auto-generated catch block
error=e.getLocalizedMessage();
IDataUtil.put( pipelineCursor, "error", error );
pipelineCursor.destroy();
}
}
// --- <<IS-BEGIN-SHARED-SOURCE-AREA>> ---
// --- <<IS-END-SHARED-SOURCE-AREA>> ---
/**
* The service implementations given below are read-only and show only the
* method definitions and not the complete implementation.
*/
public static final void signIn_javaService(IData pipeline) throws ServiceException {
}
final static signIN_OCI_SVC _instance = new signIN_OCI_SVC();
static signIN_OCI_SVC _newInstance() { return new signIN_OCI_SVC(); }
static signIN_OCI_SVC _cast(Object o) { return (signIN_OCI_SVC)o; }
}
Launch started: 2021-05-18 16:08:30.883
Configuration name: signIN
Configuration location: C:/Users//.metadata/.plugins/org.eclipse.debug.core/.launches/sigI.launch
Could not run ‘signIN_OCI’
java.lang.reflect.InvocationTargetException: id_hmacWithSHA3_224
java.lang.reflect.InvocationTargetException:id_hmacWithSHA3_224
Launch completed: 2021-05-18 16:08:32.747