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

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:; line: 1, column: 2] The solution was quite simple: use double quotes instead … 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

SOAP is dead – Lessons Learned from SOA-fying a Monolith

I’ll continue my series of blog posts regarding the lessons we learned while SOA-fying our monolithic Adabas/Natural application with a more technical lesson: SOAP is dead. This may be a harsh statement, taking into account that we started out with Webservices based on SOAP and at the moment our whole infrastructure is based on it. … Read more