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
spring-servlet.xml -file will have the following references
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
- create Servicename_Request.java -src/main/java
- Create Servicename_Reponse.java -src/main/java
- create servicename.xsd-src/main/webapp/xsd
- create Servicename_Endpoint.java -src/main/java
- 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
Post a Comment