Mock service as a war through maven - maven

i have a xsd conataining the request and response, i am using this xsd to create mock service and deploying as a war through soap ui.
but How i can do the same thing using Maven without using Soap ui (i should not use maven-ant-plugin)??
Is there any plugin to do that ??

Related

Is there any way to create a spring boot jar file and deploy in any application either in Spring or Struts application to trace the request/response?

Team,
I want to develop a spring boot application jar file and that jar file I can deploy in any application as a library and that our custom jar file can use to store user's request and response in the database?

How to bundle war file containing rest code with jax-rs dependencies so that it runs on Tomcat?

I'm using a Gradle based-setup to build a REST web service (with Jax-Rs and glassfish.jersey dependencies). I'm using the Gradle-tomcat plugin (bmuschko-gradle-tomcat-plugin) to deploy it on tomcat during runtime. I'm pretty new to this, and I've read that tomcat doesn't support Jax-Rs features on its own. So how do I make my REST code work on tomcat? Should I bundle Jax-rs/jersey jars along with my war? I won't be able to copy-paste those jars anywhere (few tutorials have the jars pasted under web-inf/libs module), I want it to be automated during the build with Gradle.
PS: I'm using #ApplicationPath (mandated by my company) in my code, which overrides servlet-mapping in the web.xml, so I won't be able to modify that.

Exposing Contract first SOAP Webservice with spring-boot and Weblogic

I am trying to expose Contract First SOAP Webservice with spring-boot and Weblogic. Its a Gradle based setup and i am using following dependencies for generation of JAXB classes.
jaxb 'com.sun.xml.bind:jaxb-core:2.2.11'
jaxb 'com.sun.xml.bind:jaxb-xjc:2.2.11'
jaxb 'com.sun.xml.bind:jaxb-impl:2.2.11'
jaxb 'javax.xml.bind:jaxb-api:2.2.12-b141001.1542'
compile(files(genJaxb.classesDir).builtBy(genJaxb))
I have a static response XML which i am sending as a response. The XML is first unmarshalled and then return. Now the problem here is response XML elements are coming with namespace prefixes which i want to avoid as on the client side it is causing some issue which i am not aware of as i dont have access to that system.
Could you please suggest on how i can control marshalling process used by Spring framework to avoid the prefix generation?
Thanks and Regards,
HG

Using Maven & Jax-RS, where do I put my files?

I created a maven project using a Simple Web App Archetype. Then I went in and created a Jax-RS module. Now I have 2 index.jsp. Should I have created my project without an archetype and then added a Jax-RS module?
I also plan to add some persistence to the project. Maybe hibernate.
You don't need index.jsp for JAX-RS. Every JAX-RS servlet (Jersey, RESTeasy, etc.) provides its own Servlet, that dispatches REST requests into your #Path annotated resources. You configure the servlet in WEB-INF/web.xml.
The rest looks correct in your project layout.

Jersey Test Framework

I have a non maven project. I would like to test my jersey rest services using the Jersey Test Framework. The jersey docs only relate to maven for the jersey test framework. Is it possible to add a jar or library to the project to use this framework?
Using Jersey client instead of Jersey Test Framework have two advantages:
It's well documented and only needs the jersey-client JAR
The written code is standard and can be use by the Java clients of your services
I would suggest you to add Maven to your project for some reasons
ability to use and helpful dependencies
having mechanism to create a build of you application with one command like mvn clean package
If you use Ant scripts you can easily call old Ant scripts from Maven with Apache Maven AntRun Plugin without significant Ant scripts rebuilding.

Resources