File: iSimonReg.rb

package info (click to toggle)
ruby-soap4r 2.0.5-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,032 kB
  • sloc: ruby: 52,729; xml: 266; sh: 42; javascript: 20; makefile: 13; perl: 10
file content (112 lines) | stat: -rw-r--r-- 2,710 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
require 'soap/soap'
require 'soap/rpcUtils'

module SimonReg
  TypeNS = 'http://soap.pocketsoap.com/registration/types'

  module Services

    InterfaceNS = 'http://soap.pocketsoap.com/registration/services'

    class Service
      include SOAP::Marshallable
      @typeName = 'Service'
      @typeNamespace = SimonReg::TypeNS

      attr_accessor :id, :name, :description, :wsdlURL, :websiteURL

      def initialize( id = nil, name = nil, description = nil, wsdlURL = nil, websiteURL = nil )

	@id = id
	@name = name
	@description = description
	@wsdlURL = wsdlURL
	@websiteURL = websiteURL
      end
    end

    Methods = {
      'ServiceList' => [ 'services' ],
      'Servers' => [ 'Servers', 'serviceID' ],
      'Clients' => [ 'Clients', 'serviceID' ],
    }
  end

  module Clients

    InterfaceNS = 'http://soap.pocketsoap.com/registration/clients'

    class ClientInfo
      include SOAP::Marshallable
      @typeName = 'clientInfo'
      @typeNamespace = SimonReg::TypeNS

      attr_accessor :name, :version, :resultsURL

      def initialize( name = nil, version = nil, resultsURL = nil )

	@name = name
	@version = version
	@resultsURL = resultsURL
      end
    end

    Methods = {
      'RegisterClient' => [ 'clientID', 'serviceID', 'clientInfo' ],
      'UpdateClient' => [ 'void', 'clientID', 'clientInfo' ],
      'RemoveClient' => [ 'void', 'clientID' ],
    }
  end

  module Servers

    InterfaceNS = 'http://soap.pocketsoap.com/registration/servers'

    class ServerInfo
      include SOAP::Marshallable
      @typeName = 'serverInfo'
      @typeNamespace = SimonReg::TypeNS

      attr_accessor :name, :version, :endpointURL, :wsdlURL

      def initialize( name = nil, version = nil, endpointURL = nil, wsdlURL = nil )

	@name = name
	@version = version
	@endpointURL = endpointURL
	@wsdlURL = wsdlURL
      end
    end

    Methods = {
      'RegisterServer' => [ 'serverID', 'serviceID', 'serverInfo' ],
      'UpdateServer' => [ 'void', 'serverID', 'serverInfo' ],
      'RemoveServer' => [ 'void', 'serverID' ],
    }
  end

  module Subscriber

    InterfaceNS = 'http://soap.pocketsoap.com/registration/subscriber'

    class SubscriberInfo
      include SOAP::Marshallable
      @typeName = 'subscriberInfo'
      @typeNamespace = SimonReg::TypeNS

      attr_accessor :notificationID, :expires

      def initialize( notificationID = nil, expires = nil )

	@notificationID = notificationID
	@expires = expires
      end
    end

    Methods = {
      'Subscribe' => [ 'subscriberInfo', 'serviceID', 'ServerChanges', 'ClientChanges', 'NotificationURL' ],
      'Renew' => [ 'expires', 'notificationID' ],
      'Cancel' => [ 'void', 'notificationID' ],
    }
  end
end