How to test a REST API with Arquillian

Testing a REST API on a real application server with Arquillian is easy – if you know what you need to do šŸ˜‰ I have this simple REST service, that authenticates a user: @POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public Response authenticateUser(final UserData userData) { … return Response .status(401) .entity(false) .build(); } Let’s write a test for this … Read more

How to test JBoss EAP 7 with Arquillian

It took me quite some time to get my Arquillian tests running against a remote JBoss EAP 7.0.0.Beta1 application server, so I thought I’d share my configuration. At the time of this writing, there was no Arquillian container adapter for JBoss EAP 7 available. So I had to use the Arquillian Chameleon Container. However, it … Read more

Using Gradle wrapper behind a proxy server with self-signed SSL certificates

Today, I wanted to add a Gradle Wrapper to my Java project but had a few issues. I am behind a proxy and it changes the SSL certificates to be able to scan traffic for viruses. My first attempt to start gradlew build resulted in: Exception in thread “main” java.net.UnknownHostException: services.gradle.org at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) … Read more

How to export all mapped environments from Natural Studio (SPoD)

A colleague of mine wanted to export all the mapped environments from Natural Studio (SPoD). As we have quite a lot of different environments due to our complex staging concept, manually re-creating this list would be cumbersome. Long story short: we didn’t find a way to export the environments from within Natural Studio. However, after … Read more

JsonParseException when calling a REST service with curl on Windows

When I called a REST service (provided by webMethods Integration Server) with curl on my Windows machine, I got the following error: org.codehaus.jackson.JsonParseException:Unexpected character (”’ (code 39)): expected a valid value (number, String, array, object, ‘true’, ‘false’ or ‘null’)\n at [Source: com.wm.net.HttpInputStream@74356f93; line: 1, column: 2] The solution was quite simple: use double quotes instead … Read more

How to import SSL certificates into webMethods Integration Server

In this article I described how you can generate a self-signed SSL certificate to enable HTTPS in webMethods Integration Server: How to create a self-signed SSL certificate for webMethods Integration Server with OpenSSL. Now it’s time to import a real certificate. If you have received the signed certificate from your Certificate Authority, you can follow … Read more

How to create a self-signed SSL certificate for webMethods Integration Server with OpenSSL

Here’s a short step-by-step guide on how to create and install a self-signed SSL certificate for testing purposes in webMethods Integration Server. You can test secure HTTPS connections from clients to Integration Server with this certificate. Create a certificate You can easily create the certificate using OpenSSL on a Linux system. Create a private key. … Read more

How to call a REST service in webMethods Integration Server from Java

After publishing a REST Resource in webMethods Integration Server and giving it a nice logical URL, you may want to call the service from a Java program. Here’s how to do this using the Jersey framework. Automatically testing a REST Resource On top of my unit tests for plain old Flow services (as introduced in … Read more

How to configure a URL Alias for a REST Resource in webMethods Integration Server

After I created my first REST Resource in webMethods Integration Server, I immediately saw potential for improvement regarding the URL under which it was made accessible: http://localhost:5555/rest/ExamplePackage/Resources/Session The default URL always starts with rest followed by the fully qualified name of the REST Resource. What bugs me is the latter: the path exposes the internal … Read more