Java – embeddable web server with native @ WebService support as endpoint Alternative to publish
I spent some time investigating endpoint What publish can do and can't do, it seems that you soon entered the undocumented field
If you build a simple stand-alone application, it uses endpoint Publish exposes one or more @ WebService annotation classes, and then you encounter that you can no longer use endpoint In the case of publish (for any reason), what is the simplest migration path?
I know you can use sun jaxws XML and optional Metro jar to create a war, which can then be deployed to an embedded web server (such as jetty or Winstone), but I like to simply "take this class and expose it on this URL" endpoint The API of publish () does not have any XML or complete container
Is there a good way to do this?
resolvent
Solution
It's been said, you can sun. net. httpserver. HTTP behavior of custom endpoints in an instance of httpserver Use com.com with caution The sun API is always a good idea, but depending on your situation, it may be appropriate For example, there is a subclass of httpsserver that can be used to provide SSL
The process seems to be:
>Use httpserver Create (New inetsocketaddress (listenportnumber), waitqueuedepth) to create a server instance. > Using server Createcontext ("/ path") creates a context that will host the endpoint. > Use endpoint Create (New rpclitendpoint()) creates an endpoint At present, it is unclear whether the definition location of rpclitendpoint or strict requirements; It may be part of Metro jax-ws. > Call endpoint Publish (context) to associate the endpoint with an httpserver (or httpsserver) instance
When finished, use endpoint Stop and server Stop closes
There is also a blog entry on blogs oracle. Com describes the creation of a custom network transport It doesn't have enough details for me to get a good understanding from the quick scan, but maybe you can get more from it
The above is the Java collected by programming house for you - an embeddable web server with native @ WebService support as an endpoint I hope this article can help you solve Java, an embeddable web server with native @ WebService support, as an endpoint Program development problems encountered by the alternative to publish.
If you think the content of the programming home website is good, you are welcome to recommend the programming home website to programmers and friends.