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 moreHow to test a REST API with Arquillian

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 moreJsonParseException when calling a REST service with curl on Windows

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 moreHow to call a REST service in webMethods Integration Server from Java

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 moreHow to configure a URL Alias for a REST Resource in webMethods Integration Server

How to create a REST service in webMethods Integration Server

A while ago I created my first REST service in webMethods Integration Server. It’s quite easy to do and works correctly out of the box. Software AG managed to implement the standards quite well and I didn’t have to go through hours of configuring (like I had to with SOAP webservices). How to create a … Read moreHow to create a REST service in webMethods Integration Server

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 moreSOAP is dead – Lessons Learned from SOA-fying a Monolith