JAX-WS: Serving Web Services SOAP

Today we will create a SOAP Web Service, based on LebrijoSchool project which we were making in early weeks over Oracle-Weblogic Architechture.

First of all is to add the Web Services facet. Right button > Properties … :

Add WS facet

After, we will create the class from a Spring Service class. Right button > New > WebLogic Web Service for Spring Beans:

Expose Spring as a WS

Choose the Service, and the methods that we want to publish as Web Service.

Finally put it in the logical package: lebrijo.school.webservices. And name it as “SchoolCertificatesWS”.

This is the code:

	@Autowired
	@Qualifier("RegistryService")
	private IRegistryService springServ;
 
	@WebMethod
	public Registry findRegistryById(java.lang.String id) throws Exception {
		return springServ.findRegistryById( id );
	}

We have a Weblogic client to test the WS, we can acces thru the URL http://localhost:7001/wls_utc/.

Leave a Reply

Your email address will not be published. Required fields are marked *