简体   繁体   English

SOAP Web服务中的默认端口名值

[英]Default portname value in SOAP Web Service

Could someone clarify what is the default portname value in the WSDl file when deploying a SOAP Web Service ? 可能有人澄清什么是默认的portname在价值WSDl部署时,文件SOAP Web Service I have read the specs JSR-181 and they state (page 14) that it is @WebService.name +”Port” . 我已阅读规格JSR-181并且他们声明(第14页)它是@WebService.name +”Port” However I have deployed in Glassfish the following Web Service: 但是,我已经在Glassfish部署了以下Web服务:

@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;
    }

}

and the WSDL file looks: WSDL文件如下所示:

 <service name="SampleWSService">
    <port name="SampleWSPort" binding="tns:SampleWSPortBinding">
      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
    </port>
  </service>

Am I right, that it gets the name only when defined on the SIB (when not refering to a SEI ) and othewise it is SIB + Port ? 我是对的,它只有在SIB上定义时才获得名称(当不引用SEI ),否则它是SIB + Port

@WebService()
public class SampleWS
{}

port name= SampleWSPort (default) 端口名称= SampleWSPort(默认)

@WebService(portName="myPortName")
    public class SampleWS
    {}

port name = myPortName (customized) 端口名称= myPortName(自定义)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM