Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The client tries to connect to 127.0.0.1:8080 regardless of what is given in configs #26

Closed
farhangamary opened this issue Jul 8, 2022 · 6 comments
Assignees

Comments

@farhangamary
Copy link
Contributor

In application.yml, I have:

camunda.bpm.client:
  base-url: http://localhost:8081/engine-rest

The ApiClient takes no argument for constructor and I found no method to set a host/port for it.

dependency:

		<dependency>
			<groupId>org.camunda.community</groupId>
			<artifactId>camunda-engine-rest-client-openapi-java</artifactId>
			<version>7.17.0</version>
		</dependency>

Port 8080 is not in use by any other service/apput and I always get following exception :

org.camunda.community.rest.client.invoker.ApiException: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8080
	at org.camunda.community.rest.client.invoker.ApiClient.execute(ApiClient.java:913)
	at org.camunda.community.rest.client.api.MessageApi.deliverMessageWithHttpInfo(MessageApi.java:148)
	at org.camunda.community.rest.client.api.MessageApi.deliverMessage(MessageApi.java:127)

in

new MessageApi(client).deliverMessage(new CorrelationMessageDto().messageName("paymentRquestMessage")

Any Idea!!???

@berndruecker
Copy link
Collaborator

@berndruecker berndruecker self-assigned this Jul 11, 2022
@farhangamary
Copy link
Contributor Author

@berndruecker , Yes that worked. I had to set the basePath.
Thank you.

@berndruecker
Copy link
Collaborator

@farhangamary Should we update the readme?

@farhangamary
Copy link
Contributor Author

Yes, I think it is better to update the README and mention the default path of ApiClient and how to set it properly. - I could fork and do it but I wasn't sure if it would be acceptable or not :).

@berndruecker
Copy link
Collaborator

Yeah - great - then you can send a Pull Request maybe?

@farhangamary
Copy link
Contributor Author

Sure - I will - by the end of the day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants