You can make like much easier by simply moving your java code into a proper java project, then invoke it from your java services. In this way the java services just act as a very simply bridge between the service/pipeline world and that of java/objects. The jar for your java project should go into your package's code/jars directory. No need to restart, just reload the package.
You can simply start your IS in debug mode and then connect the eclipse debugger via the port e.g.
Then simply add a breakpoint to where you want to debug from within your java project. Just make sure to add your java project to the source tab (above) so that it will open the appropriate java file when the breakpoint gets hit.
The nice thing about this approach is that you trigger the breakpoint by call any webMethods asset such as a flow service or API, from an external client and then watch your IDE switch to debug mode automatically. No need for remote sessions or any other complexity.
John.
Original Message:
Sent: Tue June 03, 2025 07:31 AM
From: Pedro Dinis Silva
Subject: Debugging java services - reusing server connection
Hello Christoph,
Put in simple terms, my goal is to understand how designer manages and creates connections and sessions so that I can use that information to also make my life easier when I need to debug java programs using test harnesses.
With that said, would appreciate any advice on changes I could make to the code in order to be able to connect securely to an IS, whilst protecting my credentials and avoiding the dreaded login prompt.
I am in a team environment and hard-coding my credentials is not an option. I am still very green on eclipse and Java, sorry if my question is a little vague.
Regards,
Pedro
------------------------------
Pedro Dinis Silva
Integration Engineer
Nokia
Original Message:
Sent: Tue May 27, 2025 09:19 AM
From: Christoph Jahn
Subject: Debugging java services - reusing server connection
Can you be a bit more specific and give an example that is concrete as possible?
It seems your question is not about your goal (e.g. unit testing) but one possible way to achieve this goal (running some Java logic on IS from Designer). Is that impression correct?
------------------------------
All the best,
Christoph
Original Message:
Sent: Tue May 27, 2025 07:24 AM
From: Pedro Dinis Silva
Subject: Debugging java services - reusing server connection
Hi everyone,
On the matter of debugging Java services using a test harness, I am trying to find a way to use the Java API to reuse an existing session in order to avoid having to input the username and password repeatedly.
I am trying to avoid the option of configuring a specific port with a certificate login.
Furthermore, I'm trying to figure out more about how Designer connects to integration servers - how a connection is created, where it's stored at runtime, and what classes and methods I can use to retrieve active connections.
My Java/Eclipse knowledge is, admittedly, quite lacking.
If anyone has any resources that would be helpful in learning how I can navigate through Designer, the libraries used and configurations that they could share, I would be most grateful.
All the best,
Pedro Dinis Silva
------------------------------
Pedro Dinis Silva
Integration Engineer
Nokia
------------------------------