Skip to content

Commit f40e832

Browse files
Quinn-With-Two-Nssteveandroulakis
authored andcommitted
Fix nexus sample TLS settings (temporalio#688)
1 parent cb93bfb commit f40e832

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

core/src/main/java/io/temporal/samples/nexus/README.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ temporal operator nexus endpoint create \
5454
--name my-nexus-endpoint-name \
5555
--target-namespace my-target-namespace \
5656
--target-task-queue my-handler-task-queue \
57-
--description-file ./service/description.md
57+
--description-file ./core/src/main/java/io/temporal/samples/nexus/service/description.md
5858
```
5959

6060
## Getting started with a self-hosted service or Temporal Cloud

core/src/main/java/io/temporal/samples/nexus/options/ClientOptions.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package io.temporal.samples.nexus.options;
2121

22+
import io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts;
2223
import io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder;
2324
import io.grpc.netty.shaded.io.netty.handler.ssl.util.InsecureTrustManagerFactory;
2425
import io.temporal.client.WorkflowClient;
@@ -27,13 +28,11 @@
2728
import io.temporal.serviceclient.WorkflowServiceStubsOptions;
2829
import java.io.FileInputStream;
2930
import java.io.FileNotFoundException;
30-
import java.util.Arrays;
3131
import javax.net.ssl.SSLException;
3232
import org.apache.commons.cli.*;
3333

3434
public class ClientOptions {
3535
public static WorkflowClient getWorkflowClient(String[] args) {
36-
System.out.println(Arrays.toString(args));
3736
Options options = new Options();
3837
Option targetHostOption = new Option("target-host", true, "Host:port for the Temporal service");
3938
targetHostOption.setRequired(false);
@@ -107,7 +106,7 @@ public static WorkflowClient getWorkflowClient(String[] args) {
107106
if (insecureSkipVerify) {
108107
sslContext.trustManager(InsecureTrustManagerFactory.INSTANCE);
109108
}
110-
serviceStubOptionsBuilder.setSslContext(sslContext.build());
109+
serviceStubOptionsBuilder.setSslContext(GrpcSslContexts.configure(sslContext).build());
111110
} catch (SSLException e) {
112111
throw new RuntimeException(e);
113112
} catch (FileNotFoundException e) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Service Name:
2-
my-hello-service
2+
NexusService
33
Operation Names:
44
echo
5-
say-hello
5+
hello
66

77
Input / Output arguments are in the following repository:
88
https://github.com/temporalio/samples-java/core/src/main/java/io/temporal/samples/nexus/service/NexusService.java

0 commit comments

Comments
 (0)