File: person.pl

package info (click to toggle)
libsoap-wsdl-perl 3.004-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,600 kB
  • sloc: perl: 8,433; xml: 1,769; java: 19; makefile: 15
file content (84 lines) | stat: -rwxr-xr-x 2,657 bytes parent folder | download | duplicates (6)
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
#!/usr/bin/perl -w
package main;
use strict;
use warnings;
use lib qw(../lib ../../lib);
use MyElements::ListPersonResponse;
use MyServer::TestService::TestPort;
my $server = MyServer::TestService::TestPort->new({
   dispatch_to => 'main',
   transport_class => 'SOAP::WSDL::Server::CGI',   # optional, default
});
$server->handle();

sub ListPerson {
    my ($self, $body, $header) = @_;
    # body is a ??? object - sorry, POD not implemented yet
    # header is a ??? object - sorry, POD not implemented yet
    
    # do something with body and header...

    my %person = (
        PersonID =>         { # MyTypes::PersonID
          ID =>  1, # int
        },
        Salutation => 'Salutation0', # string
        Name =>  'Name0', # string
        GivenName =>  'Martin', # string
        DateOfBirth =>  '1970-01-01', # date
        HomeAddress =>         { # MyTypes::Address
          Street => 'Street 0', # string
          ZIP =>  '00000', # string
          City =>  'City0', # string
          Country =>  'Country0', # string
          PhoneNumber => '++499131123456', # PhoneNumber
          MobilePhoneNumber => '++49150123456', # PhoneNumber
        },
        WorkAddress =>         { # MyTypes::Address
          Street => 'Somestreet 23', # string
          ZIP =>  '12345', # string
          City =>  'SomeCity', # string
          Country =>  'Germany', # string
          PhoneNumber => '++499131123456', # PhoneNumber
          MobilePhoneNumber => '++49150123456', # PhoneNumber
        },
        Contracts =>         { # MyTypes::ArrayOfContract
          Contract => [          
          { # MyTypes::Contract
            ContractID =>  100000, # long
            ContractName =>  'SomeContract0', # string
          },
          { # MyTypes::Contract
            ContractID =>  100001, # long
            ContractName =>  'SomeContract1', # string
          },
          { # MyTypes::Contract
            ContractID =>  100002, # long
            ContractName =>  'SomeContract2', # string
          },
          { # MyTypes::Contract
            ContractID =>  100003, # long
            ContractName =>  'SomeContract3', # string
          },
          ],
        },
    );

    return  MyElements::ListPersonResponse->new(  {
    out => { # MyTypes::ArrayOfPerson
            NewElement => [
                { %person },
                { %person },
                { %person },
                { %person },
                { %person },
                { %person },
                { %person },
                { %person },
                { %person },
                { %person },
            ],
        },
    }
 );
 }