spring jws开发 webservice

及其简单:
@WebService(serviceName = "LoginService")
@SOAPBinding(parameterStyle=ParameterStyle.BARE)
public class LoginServiceEndpoint {
	@WebMethod
	public String helloworld(String name) {
		return "hello:" + name;
	}
}
<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
		<property name="baseAddress" value="http://localhost:9999/" />
	</bean>
	<bean id="loginServiceEndpoint" class="com.doze.data.service.LoginServiceEndpoint">
	</bean>	

通过http://localhost:9999/LoginService?wsdl访问webservice部署描述符
还有自动生成的xsd:http://localhost:9999/LoginService?xsd=1

@SOAPBinding(parameterStyle=ParameterStyle.BARE)必须添加,否则会报错。

你可能感兴趣的:(java,spring,Web,webservice,SOAP)