How to create and deploy the web services in java

Honeyshukla

Honeyshukla

@honeyshukla-4pb322 Oct 8, 2024
I wish to know how to create and deploy the web services in java. I just want to add two numbers using Java.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • sookie

    sookie

    @sookie-T06sFW Jul 19, 2012

    #-Link-Snipped-# There are few open source frameworks available that allow you to create webservices easily [Apache CXFServlet , Apache Axis]

    CXFServlet (Annotations based)
    You need to create a simple Java class(but need to use annotations to declare that as web service or web methods) and define your methods say "addTwoNumbers" in it and then there will be configuration in the servlet XML file.Add the entries like the implementer of your service class and endpoint , address etc.. You can deploy coded web service on a servlet container and start the server your WSDL is available.

    Apache Axis:
    You have to do similar things for this also but way of doing is different. I guess you have to explicitly generate the WSDL using some commands. You can find tutorials on internet or Apache site.

    Let us know if any issues faced.