Can I use WireMock in Ionic Project? - ionic-framework

I want to test my Ionic App and therefore I want to use Wiremock to mock the backend calls. Is this possible or can I use Wiremock only for Java Projects?

You can use WireMock as a standalone process, as described in the documentation.In this setup it can be used in non-java ways as well.

Related

ionic 6 websocket client cordova plugin

I'm using ionic 6 (with Angular). Is there a websocket client plugin?
I want to communicate with a websocket server written in c# but I can't find any plugins to use ionic as websocket client.
You don't need a dedicated ionic plugin if you just want to subscribe to a websocket. Existing angular websocket libraries should work.
I personally prefer using socket-io, which works perfectly fine: https://socket.io/
I suggest you to use the same websocket pattern on backend as the frontend. The socket.io doesn't communicate with others websockets, so it means you need to check first which WS actually you are using on backend to keep using the same on the mobile App.

Does http-kit support SOAP?

I am considering to have a SOAP web service written using Apache Axis2. I can either use the Axis server or pack it as a .war and deploy it to a servlet container. My REST service is running on http-kit. Is it possible to to use http-kit with SOAP or does it support SOAP? Or should I need a separate servlet container like tomcat or Axis2? Thanks.
Update: Apache CXF instead of Axis2. I think I cannot use http-kit.
If I understand you correctly, you want to expose a SOAP-service.
I have a sample project which does that:
https://github.com/slipset/soap-box
It uses javax.ws.rs-api and runs as an uber-jar.

Can two version of resteasy & jetty be loaded in same JVM

I have a very typical problem. I am using in-house developed platform which uses Jetty server and rest easy to provide a wrapper over REST framework. When they did that they made lot of tweaks for some specific scenes.
Now problem is that when I developed a REST based service with raw interfaces of rest easy and embed my jetty server in same JVM. My service can receive the request but response is always 500 server error.
I feel the in-house framework is intercepting the response doing some security validations so my response doesn't reach.
I was wondering if there is a way to use the different rest easy version and run in same JVM. I have tried to embed a jetty server and added a normal Servlet and I can access it but I can't achieve the same with my rest based servlet.
Any Idea how could I load two versions of rest easy on same JVM ?
What you can't have is two applications in the same web application context, since you are supposed to define only one class implementing javax.ws.rs.Application.
But that shouldn't be a problem, as long as classes live in different ClassLoaders. Each web application context must be in isolation of other contexts, each defining its own ClassLoader.
You can perform all kinds of class loading manipulation in Jetty: https://wiki.eclipse.org/Jetty/Reference/Jetty_Classloading
In conclusion, as long as you use different jar files of RESTEasy in each web context, you should be able to run two REST applications using different RESTEasy versions in the same JVM process.

Testing approach for AngularJS Java Spring Project

Sorry for the general question, but what is the best approach/tools for testing an AngularJS project with Spring JPA and Restful services backend, I am using Eclipse.
Do you do the angularJS testing using tools external to Eclipse such as node.js, testacular etc...is there a way to do unit and end to end testing for the front JS end and the backen all inside Eclipse?
Regards
I
Checkout $httpBackend in ngMock. You could set up a dedicated backend for testing, but if you're sure of the correct responses (just grab them via postman or something), $httpBackend is very simple to implement. We've been using it to develop a frontend asynchronously with a jersey backend, but it has testing functionality built in. Then you just need to set up seperate unit tests for your java and you'll be good to go.

How to use Fingale futures to an existing Restful webservice

I have a webservice running on jboss server. I can't change it to netty because i'm using other features of jboss. But i want to use finagles futures from the client. Is there a way ?
The Future class used in Finagle is part of Twitter's util project, which is open source. com.twitter.util.Future is usable on its own within any project that adds util-core as a dependency.
You can always use a finagle client to make calls to an HTTP [or other RPC protocol] webservice. It doesn't matter how the service is implemented as along as it uses the protocol correctly. If you are using Java, this link should give you details on how to build a finagle client for an HTTP service: https://github.com/twitter/finagle#Building%20a%20Client%20in%20Java
Here's some sample code to for a more elaborate finagle HTTP client: https://github.com/twitter/finagle/blob/master/finagle-example/src/main/scala/com/twitter/finagle/example/http/HttpClient.scala