【发布时间】:2015-06-06 15:53:12
【问题描述】:
在部署SOAP Web Service 时,有人可以澄清WSDl 文件中的默认portname 值是什么吗?我已阅读规范JSR-181,他们声明(第 14 页)它是@WebService.name +”Port”。不过我已经在Glassfish 部署了以下Web Service:
@WebService(name="interfaceName")
public interface SampleWSInterface
{
public int add(int a, int b);
public int multipy(int a, int b);
}
@WebService(endpointInterface="com.xyz.webservicetest.SampleWSInterface")
public class SampleWS
{
public int add(int a, int b){
return a + b;
}
public int multipy(int a, int b){
return a * b;
}
}
WSDL 文件看起来:
<service name="SampleWSService">
<port name="SampleWSPort" binding="tns:SampleWSPortBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
我说得对吗,它只有在 SIB 上定义时才获得名称(当不引用 SEI 时),否则它是 SIB + Port?
【问题讨论】:
标签: java web-services soap wsdl jax-ws