WEB开发网
开发学院软件开发Java 用 WSAS 和 Eclipse 简化 Web 服务的创建 阅读

用 WSAS 和 Eclipse 简化 Web 服务的创建

 2009-12-14 00:00:00 来源:WEB开发网   
核心提示: 测试 Web 服务让我们看看创建的 Web 服务,在 Service 表中,用 WSAS 和 Eclipse 简化 Web 服务的创建(9),我们看到一个 WSDL V2.0 View 链接,单击此链接

测试 Web 服务

让我们看看创建的 Web 服务。在 Service 表中,我们看到一个 WSDL V2.0 View 链接。单击此链接,然后应当会看到如下所示的 WSDL:


清单 5. FactorService WSDL
<wsdl2:description xmlns:wsdl2="http://www.w3.org/ns/wsdl" 
   xmlns:tns="http://services.developerworks.org" 
   xmlns:wsoap="http://www.w3.org/ns/wsdl/soap" 
   xmlns:ns0="http://services.developerworks.org" 
   xmlns:ns1="http://org.apache.axis2/xsd" 
   xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" 
   xmlns:wsdlx="http://www.w3.org/ns/wsdl-extensions" 
   xmlns:xs="http://www.w3.org/2001/XMLSchema" 
   xmlns:whttp="http://www.w3.org/ns/wsdl/http" 
   xmlns="http://www.w3.org/ns/wsdl" 
   targetNamespace="http://services.developerworks.org"> 
   <wsdl2:documentation>FactorService</wsdl2:documentation> 
   <wsdl2:types> 
     <xs:schema xmlns:ns="http://services.developerworks.org" 
        attributeFormDefault="qualified" elementFormDefault="qualified" 
        targetNamespace="http://services.developerworks.org"> 
        <xs:element name="factor"> 
          <xs:complexType> 
             <xs:sequence> 
               <xs:element minOccurs="0" name="num" 
                  type="xs:int" /> 
             </xs:sequence> 
          </xs:complexType> 
        </xs:element> 
        <xs:element name="factorResponse"> 
          <xs:complexType> 
             <xs:sequence> 
               <xs:element maxOccurs="unbounded" minOccurs="0" 
                  name="return" type="xs:int" /> 
             </xs:sequence> 
          </xs:complexType> 
        </xs:element> 
     </xs:schema> 
   </wsdl2:types> 
   <wsdl2:interface name="ServiceInterface"> 
     <wsdl2:operation name="factor" 
        pattern="http://www.w3.org/ns/wsdl/in-out"> 
        <wsdl2:input element="ns0:factor" wsaw:Action="urn:factor" /> 
        <wsdl2:output element="ns0:factorResponse" 
          wsaw:Action="urn:factorResponse" /> 
     </wsdl2:operation> 
   </wsdl2:interface> 
   <wsdl2:binding name="FactorServiceSOAP11Binding" 
     interface="tns:ServiceInterface" type="http://www.w3.org/ns/wsdl/soap" 
     wsoap:version="1.1"> 
     <wsdl2:operation ref="tns:factor" wsoap:action="urn:factor" /> 
   </wsdl2:binding> 
   <wsdl2:binding name="FactorServiceSOAP12Binding" 
     interface="tns:ServiceInterface" type="http://www.w3.org/ns/wsdl/soap" 
     wsoap:version="1.2"> 
     <wsdl2:operation ref="tns:factor" wsoap:action="urn:factor" /> 
   </wsdl2:binding> 
   <wsdl2:binding name="FactorServiceHttpBinding" 
     interface="tns:ServiceInterface" 
     type="http://www.w3.org/ns/wsdl/http"> 
     <wsdl2:operation ref="tns:factor" 
        whttp:location="FactorService/factor" /> 
   </wsdl2:binding> 
   <wsdl2:service name="FactorService" 
     interface="tns:ServiceInterface"> 
     <wsdl2:endpoint name="SecureSOAP11Endpoint" 
        binding="tns:FactorServiceSOAP11Binding" 
        address="https://192.168.0.104:9443/services/FactorService"> 
        <wsdl2:documentation> 
          This endpoint exposes a SOAP 11 binding over a HTTPS 
        </wsdl2:documentation> 
     </wsdl2:endpoint> 
     <wsdl2:endpoint name="SecureSOAP12Endpoint" 
        binding="tns:FactorServiceSOAP12Binding" 
        address="https://192.168.0.104:9443/services/FactorService"> 
        <wsdl2:documentation> 
          This endpoint exposes a SOAP 12 binding over a HTTPS 
        </wsdl2:documentation> 
     </wsdl2:endpoint> 
     <wsdl2:endpoint name="SecureHTTPEndpoint" 
        binding="tns:FactorServiceHttpBinding" 
        address="https://192.168.0.104:9443/services/FactorService"> 
        <wsdl2:documentation> 
          This endpoint exposes a HTTP binding over a HTTPS 
        </wsdl2:documentation> 
     </wsdl2:endpoint> 
     <wsdl2:endpoint name="SOAP11Endpoint" 
        binding="tns:FactorServiceSOAP11Binding" 
        address="http://192.168.0.104:9762/services/FactorService"> 
        <wsdl2:documentation> 
          This endpoint exposes a SOAP 11 binding over a HTTP 
        </wsdl2:documentation> 
     </wsdl2:endpoint> 
     <wsdl2:endpoint name="SOAP12Endpoint" 
        binding="tns:FactorServiceSOAP12Binding" 
        address="http://192.168.0.104:9762/services/FactorService"> 
        <wsdl2:documentation> 
          This endpoint exposes a SOAP 12 binding over a HTTP 
        </wsdl2:documentation> 
     </wsdl2:endpoint> 
     <wsdl2:endpoint name="HTTPEndpoint" 
        binding="tns:FactorServiceHttpBinding" 
        address="http://192.168.0.104:9762/services/FactorService"> 
        <wsdl2:documentation> 
          This endpoint exposes a HTTP binding over a HTTP 
        </wsdl2:documentation> 
     </wsdl2:endpoint> 
   </wsdl2:service> 
</wsdl2:description> 

上一页  4 5 6 7 8 9 10  下一页

Tags:WSAS Eclipse 简化

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接