How to generate wsdl using spring-ws application -Part:1

Spring web-service package supports first-contract.
The api generates the wsdl by reading the spring-ws-servlet.xml file.

All the below classes needs to be packaged as .war file.
Its easier to create a maven web-project

src/main/webapp->create a folder "xsd" and add all the xsd files in this.

I have deployed it on jboss5.1

steps for creating a simple spring-ws application

  1. create Servicename_Request.java -src/main/java
  2. Create Servicename_Reponse.java -src/main/java
  3. create servicename.xsd-src/main/webapp/xsd
  4. create Servicename_Endpoint.java -src/main/java
  5. create spring-ws-servlet.xml -src/main/webapp/web-inf/

spring-servlet.xml -file will have the following references
  • Servicename_Request.java--->Pojo
  • Servicename_Response.java->Pojo
  • servicename.xsd-xsd-define the request and response schema
  • Servicename_Endpoint.java---create a method with requestObject as a parameter and responseObject as the retrun type
  • name of the wsdl that should be generated- its is usally servicename.wsdl

Comments

Popular posts from this blog

defining functions clojure

Integrating Struts2 with Spring Security using Custom Login Form