1#!perl -w
2#!d:\perl\bin\perl.exe
3
4# -- UDDI::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko --
5
6use strict;
7use UDDI::Lite
8  import => 'UDDI::Data',
9  import => 'UDDI::Lite',
10  proxy => "https://some.server.com/endpoint_fot_publishing_API",
11  on_fault => sub {}, # do nothing for fault, will check it in the code
12;
13
14print "Authorizing...\n";
15my $auth = get_authToken({userID => 'USERID', cred => 'CRED'})->authInfo;
16
17# NB! order of elements DOES matter (and DOES NOT for attributes)
18
19my $busent = with businessEntity =>
20  name("Contoso Manufacturing"),
21  description("We make components for business"),
22  businessKey(''),
23  businessServices with businessService =>
24    name("Buy components"),
25    description("Bindings for buying our components"),
26    serviceKey(''),
27    bindingTemplates with bindingTemplate =>
28      description("BASDA invoices over HTTP post"),
29      accessPoint('http://www.contoso.com/buy.asp'),
30      bindingKey(''),
31      tModelInstanceDetails with tModelInstanceInfo =>
32        description('some tModel'),
33        tModelKey('UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4')
34;
35
36my $newent = save_business($auth, $busent);
37print $newent->businessEntity->businessKey if ref $newent;
38
39#
40# (almost) the same code from Microsoft UDDI toolkit
41#
42# With be.AddbusinessEntity
43#     .Name = "Contoso Manufacturing"
44#     .Adddescription = "We make components for business"
45#     With .businessServices.AddbusinessService
46#         .Name = "Buy components"
47#         .Adddescription = "Bindings for buying our components"
48#         With .bindingTemplates.AddbindingTemplate
49#             .accessPoint = "http://www.contoso.com/buy.asp"
50#             .addescription = "BASDA invoices over HTTP post"
51#             With .tModelInstanceDetails.AddtModelInstanceInfo
52#                 .tModelKey = GUID_BASDA_INVOICE
53#             End With
54#         End With
55#     End With
56# End With
57#
58