Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8417921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:10:36+00:00 2026-06-10T02:10:36+00:00

I am at a situation where I need to be able to create and

  • 0

I am at a situation where I need to be able to create and expose a webservice at run time. (i.e. no “javac”-compilation step).

Is there a JVM-based scripting language that has good support for JAX-WS so I can write a central engine in Java, and then just let the scripting language create the snippets containing the web service methods (with either @WebService or @WebMethod annotations) which can then be passed to

http://docs.oracle.com/javase/6/docs/api/javax/xml/ws/Endpoint.html#publish(java.lang.String, java.lang.Object)

If at all possible, please provide an example of how to do it correctly.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:10:37+00:00Added an answer on June 10, 2026 at 2:10 am

    Many do, the one that is most Java-like and supports what you want would probably be groovy.

    Update to add an example:

    There are lots of them available via a google search. The best one I know about is here as this should walk you through an example that works. This link is to another question/answer site focused on groovy. They walk you through this simple example:

    If you try this site and find that it is not instructive, please provide that feedback here. Likewise, if you do search and find one that you find better/easier to understand, please add that here. I can’t come at from that same perspective, thus you would have more to contribute in this vein that I.

    Geom.groovy
    -------------------
    package webservices
    
    import javax.jws.WebService
    import javax.jws.soap.SOAPBinding.Style
    import javax.jws.soap.SOAPBinding
    
    @WebService
    @SOAPBinding(style=Style.RPC)
    interface Geom {
        double getArea(double val)
    }
    
    Circle.groovy
    -------------------
    package webservices
    
    import javax.jws.WebService
    
    @WebService(endpointInterface='webservices.Geom')
    class Circle implements Geom {
            double getArea(double r) { Math.PI*r*r }
    }
    
    publish.groovy
    --------------------
    package webservices
    
    import javax.xml.ws.Endpoint
    
    Endpoint.publish('http://localhost:5555/circle',new Circle())
    println 'ready to receive requests...'
    

    The link I provided may eventually break or be removed. However (IMO), this would most likely occur if (when?) the technology moves forward to something newer/better. While I have duplicated the code from there above, the reference has other very useful information and pointers (such as the use of SoapUI).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is a situation where I need to have a suspend kind of behavior
I'm in a situation where I think I need to create my own custom
I have a situation where i need to create a left panel. My manager
I've recently encountered a situation where I need to create a generic method to
I need to be able to create a WAV file using the mic in
Hey I usually run into a situation where I will create a class that
I have a form based on a model. I create a modelformset and need
Situation: I need to make an imap client (using java mail api) that if,
Following situation: I need a container for data with a rowindex. Currently we use
this is the situation: I need horizontal scrolling, and table views inside every page.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.