I have WSDL file and for local testing I need to generate mock web service.
Please do not recommend SoapUI.
Can anybody please help how to generate mock web service in Java using WSDL?
One option is to create a Web Services project using an IDE. This will allow you to create a mock service and also implement your business logic.
As an example, using Eclipse:
Before starting, ensure that:
Now, start Eclipse:
Select:
Web Service type: "Top down Java bean Web Service"
Service definition: browser your WSDL file
Select "Start Service"
Select "Java Proxy / Start Client"
Select both option at the bottom of the form (publish/monitor)
Click next to complete process
At the end, your server should be started and WS deployed - check that your WSDL is available.
Now, you can:
Hope this help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With