THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Wiki Markup |
---|
{snippet:id=service|lang=java|url=cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/src/main/java/demo/spring/service/HelloWorld.java?revision=HEAD} |
Our implementation will then look like this:
Wiki Markup |
---|
{snippet:id=service|lang=java|url=cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/src/main/java/demo/spring/service/HelloWorldImpl.java?revision=HEAD} |
The @WebService
annotation on the implementation class lets CXF know which interface to use when creating WSDL. In this case its simply our HelloWorld interface.
...
Wiki Markup |
---|
{snippet:id=beans|lang=java|url=cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/src/main/webapp/WEB-INF/cxf-servlet.xml?revision=HEAD} |
If you want to reference a spring managed-bean, you can write like this:
...
Wiki Markup |
---|
{snippet:id=beans|lang=xml|url=cxf/trunk/distribution/src/main/release/samples/java_first_spring_support/src/main/resources/client-beans.xml?revision=HEAD} |
If you were going to access your client you could now simply pull it out of the Spring context (or better yet, inject it into your application using Spring!):
...