一、工具

        myEclipse

        tomcat  6.0 以上版本

        axis-bin-1_4.zip

二、即时发布

       1、解压 axis-bin-1_4.zip

       2、axis-bin-1_4.zip\axis-1_4\webapps\axis     把axis发布到tomcat服务器下,及拷贝到webapps目录下

           axis 为列子项目

       3、启动tomcat,访问如下即发布sucess

      Webservice学习之——即时发布与定制发布

   List 就是发布的接口位置。

 

     5、编写java 代码,,提供方法。如下

       把HelloWs.java 文件,.java 改为.jws  即 HelloWs.jws   拷贝到tomcat 项目axis下,重启服务器。

public class HelloWs {
   public String Welcome(String name){
      String result= "Welcome to learning WebSerice"+name;
      return result;
   }
}

    6、访问 HelloWs.jws 如下,即SUCESS

Webservice学习之——即时发布与定制发布

 

<?xml version="1.0" encoding="UTF-8"?>

-<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:intf="http://localhost:8080/axis/HelloWs.jws" xmlns:impl="http://localhost:8080/axis/HelloWs.jws" xmlns:apachesoap="http://xml.apache.org/xml-soap" targetNamespace="http://localhost:8080/axis/HelloWs.jws">

<!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)-->



-<wsdl:message name="WelcomeRequest">

<wsdl:part name="name" type="xsd:string"/>

</wsdl:message>


-<wsdl:message name="WelcomeResponse">

<wsdl:part name="WelcomeReturn" type="xsd:string"/>

</wsdl:message>


-<wsdl:portType name="HelloWs">


-<wsdl:operation name="Welcome" parameterOrder="name">

<wsdl:input name="WelcomeRequest" message="impl:WelcomeRequest"/>

<wsdl:output name="WelcomeResponse" message="impl:WelcomeResponse"/>

</wsdl:operation>

</wsdl:portType>


-<wsdl:binding name="HelloWsSoapBinding" type="impl:HelloWs">

<wsdlsoap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>


-<wsdl:operation name="Welcome">

<wsdlsoap:operation soapAction=""/>


-<wsdl:input name="WelcomeRequest">

<wsdlsoap:body use="encoded" namespace="http://DefaultNamespace" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

</wsdl:input>


-<wsdl:output name="WelcomeResponse">

<wsdlsoap:body use="encoded" namespace="http://localhost:8080/axis/HelloWs.jws" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>


-<wsdl:service name="HelloWsService">


-<wsdl:port name="HelloWs" binding="impl:HelloWsSoapBinding">

<wsdlsoap:address location="http://localhost:8080/axis/HelloWs.jws"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>
wsdl文件代码

相关文章:

  • 2022-12-23
  • 2021-06-22
  • 2021-08-22
  • 2022-01-20
  • 2021-11-23
  • 2022-02-02
  • 2021-08-06
  • 2021-09-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-10
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2021-06-29
相关资源
相似解决方案