📄 callback.esd
字号:
<?xml version="1.0" encoding="UTF-8"?>
<!--
A simple example to show how to use the high level code generator for eSoap.
This particular example shows how to use callbacks, i.e. async notifications
from the server.
The first set of namespaces are the "same" for all projects.
The attributes that you *must* modify for your service are:
+ name: name for your service.
+ targetNamspace namespace for this service.
+ tupeNamspace namespace for the user defined types for this service.
When the service defines no types, make this value empty.
-->
<Service xmlns = "http://esd.esoapcg.com/esd/"
xmlns:typens = "http://schemas.esoap.com/types/"
xmlns:cfg = "http://schemas.esoap.com/config/"
xmlns:esd = "http://esd.esoapcg.com/esd/"
xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
xmlns:wsdl = "http://schemas.xmlsoap.org/wsdl/"
name = "echo"
targetNamespace = "http://tempuri.com/"
typeNamespace = "" >
<!--
The "Interface" element defines the interface of your service.
The attributes that you *must* modify for this interface
+ name: name of the interface.
+ soapAction SOAPAction for all methods of this interface.
+ namspace namespace for the interface. It is recommend to make this
the same as "targetNamespace" attribute of the "Service"
element.
+ location end point of your service. Optional.
-->
<esd:Interface name = "Echo"
soapAction = "http://tempuri.com/"
namespace = "http://tempuri.com/"
location = "http://localhost:8080/rpcrouter">
<!--
The "Method" element defines a method for this interface.
The attributes that you *must* modify for this interface
+ name: name of the method.
DESCRIPTION:
This method register a client with the server. It gives the server the
endpoint that the server must callback. Also, a "rate" value in milli-seconds
is passed in, to provide the rate that the server should notify the client.
Finally, an initial value is given as the seed of the counter to be
incremented by the server everytine a call to the client is performed.
-->
<esd:Method name="registerCallback">
<!--
The "InParam" element defines the list of input parameters.
The attributes that you *must* modify for this interface
+ name: name of the parameter list. Not used directly
by the code generator. It is used when exporting
the WSDL for this interface.
-->
<esd:InParam name="RequestEcho">
<esd:item name="clientUrl" type="xsd:string" builtin="true" array="false" inout="false"/>
<esd:item name="rate" type="xsd:int" builtin="true" array="false" inout="false"/>
<esd:item name="initCount" type="xsd:int" builtin="true" array="false" inout="false"/>
</esd:InParam>
<!--
The "OutParam" element defines the list of output parameters.
The attributes that you *must* modify for this interface
+ name: name of the parameter list. Not used directly
by the code generator. It is used when exporting
the WSDL for this interface.
-->
<esd:OutParam name="ResponseEcho">
<esd:item name="handle" type="xsd:string" builtin="true" array="false" inout="false"/>
</esd:OutParam>
</esd:Method>
<!--
The "Method" element defines a method for this interface.
The attributes that you *must* modify for this interface
+ name: name of the method.
DESCRIPTION:
This method unregister a client with the server.
-->
<esd:Method name="deRegisterCallback">
<!--
The "InParam" element defines the list of input parameters.
The attributes that you *must* modify for this interface
+ name: name of the parameter list. Not used directly
by the code generator. It is used when exporting
the WSDL for this interface.
-->
<esd:InParam name="RequestEcho">
<esd:item name="handle" type="xsd:string" builtin="true" array="false" inout="false"/>
</esd:InParam>
<!--
The "OutParam" element defines the list of output parameters.
The attributes that you *must* modify for this interface
+ name: name of the parameter list. Not used directly
by the code generator. It is used when exporting
the WSDL for this interface.
-->
<esd:OutParam name="ResponseEcho">
<esd:item name="result" type="xsd:boolean" builtin="true" array="false" inout="false"/>
</esd:OutParam>
</esd:Method>
</esd:Interface>
<!--
This is the callback interface that allows clients to tell the server to
notify them about events that the clients might be willing to receive.
-->
<esd:Interface name = "EchoCallback"
soapAction = "http://tempuri.com/"
namespace = "http://tempuri.com/"
location = "http://localhost:9000/rpcrouter">
<!--
The "Method" element defines a method for this interface.
The attributes that you *must* modify for this interface
+ name: name of the method.
-->
<esd:Method name="callback">
<!--
The "InParam" element defines the list of input parameters.
The attributes that you *must* modify for this interface
+ name: name of the parameter list. Not used directly
by the code generator. It is used when exporting
the WSDL for this interface.
-->
<esd:InParam name="RequestEchoCallback">
<esd:item name="count" type="xsd:int" builtin="true" array="false" inout="false"/>
</esd:InParam>
<esd:OutParam name="ResponseEchoCallback">
</esd:OutParam>
</esd:Method>
</esd:Interface>
</Service>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -