8,906
社区成员
发帖
与我相关
我的任务
分享
@WebService(targetNamespace="http://www.hehe.shabi.com",name="hehe",serviceName="heheService")
public interface ITestService {
@WebResult(name = "RESULT")
String syaHello(@WebParam(name="name") String name);
}
public class TestService implements ITestService {
public String syaHello(String name) {
return name + ",你好";
}
}
<bean id="test" class="TestService"></bean>
<jaxws:endpoint implementor="#test" address="/test">
</jaxws:endpoint>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:hehe="http://www.hehe.shabi.com">
<soapenv:Header/>
<soapenv:Body>
<hehe:syaHello>
<name>34</name>
</hehe:syaHello>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:syaHelloResponse xmlns:ns2="http://www.hehe.shabi.com">
<RESULT>34,你好</RESULT>
</ns2:syaHelloResponse>
</soap:Body>
</soap:Envelope>
<jaxws:endpoint implementor="#test" address="/test">
<jaxws:properties>
<entry key="soap.env.ns.map">
<map>
<entry value="http://www.hehe.shabi.net" key="hehe"></entry>
</map>
</entry>
</jaxws:properties>
</jaxws:endpoint>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:hehe="http://www.hehe.shabi.net">
<soap:Body>
<ns2:syaHelloResponse xmlns:ns2="http://www.hehe.shabi.com">
<RESULT>34,你好</RESULT>
</ns2:syaHelloResponse>
</soap:Body>
</soap:Envelope>