1. Pilot Spring Package
2. First configure the Spring.xml monitoring Web. XML configuration.
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:Spring-Context.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
3. Configuring the Spring.xml File
Scanned package (that is, the package name of the Class)
<context:component-scan base-package= "Infis"/>
<bean class= "Org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter" >
The interface to expose
<property name= "baseaddress" value= "http://192.168.10.183:8800/services/"/>
</bean>
4. is the entity class
@Component
@WebService (servicename= "Lmtservice", targetnamespace= "Lmtcore")
public class Lmtlist {
@WebMethod
public string Getlmtlist (@WebParam (name= "LMT", targetnamespace= "Lmtlist") string lmtxml) {
System.out.println (Lmtxml);
return "YES";
}
}
5. When accessing the interface, add the servicename of the entity class such as the above access address: Http://192.168.10.183:8800/services/lmtService (copy the above code to run)
Java Write interface