web services - Using Spring WS without Tomcat -


i have written client (which consumes soap web service)

@bean(name = "foo") public jaxb2marshaller marshallerfoo() {     jaxb2marshaller marshaller = new jaxb2marshaller();     marshaller.setcontextpath("path.to.entity.foo");     return marshaller; }  @bean public fooconnector getfooconnector(@named("foo") jaxb2marshaller marshaller) {     fooconnector client = new fooconnector();     client.setdefaulturi("http://" + host_ip + ":" + host_port + host_path + "/foo");     client.setmarshaller(marshaller);     client.setunmarshaller(marshaller);     return client; } 

fooconnector class extends springs webservicegatewaysupport. far works, deploying application tomcant , have no problems. have new requirement, want able run standalone java applications (cli tools) access web service. don't want rewrite above been definitions. looking way reuse these definitions instantiate simplehttpserverfactorybean automatically used access web service.

according this document possible, using annotation based configuration, not sure how convert xml specification annotations. irritates me example specifies wsdl names should not need since have created java entities wsdl already.

it seems using client-side part of spring-ws, , has no servlet requirements. simplehttpserverfactorybean mentioned server-side. such running on tomcat not required. should able reuse configuration in cli environment without problems.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -