| 1 | # ==================================================================== | ||
| 2 | # Copyright (c) 2002,2003 IBM Corporation | ||
| 3 | # All rights reserved. This program and the accompanying materials | ||
| 4 | # are made available under the terms of the Common Public License v1.0 | ||
| 5 | # which accompanies this distribution, and is available at | ||
| 6 | # http://www.opensource.org/licenses/cpl.php | ||
| 7 | # | ||
| 8 | # ===================================================================== | ||
| 9 | package LS::Authority::WSDL::Location; | ||
| 10 | |||
| 11 | use strict; | ||
| 12 | use warnings; | ||
| 13 | |||
| 14 | use vars qw( $METHODS ); | ||
| 15 | |||
| 16 | use LS; | ||
| 17 | |||
| 18 | |||
| 19 | # | ||
| 20 | # BEGIN( ) - | ||
| 21 | # | ||
| 22 | sub BEGIN { | ||
| 23 | |||
| 24 | $METHODS = [ | ||
| 25 | 'protocol', | ||
| 26 | 'url', | ||
| 27 | 'method', | ||
| 28 | 'binding', | ||
| 29 | 'name', | ||
| 30 | 'parentName', | ||
| 31 | ]; | ||
| 32 | |||
| 33 | LS::makeAccessorMethods($METHODS, __PACKAGE__); | ||
| 34 | } | ||
| 35 | |||
| 36 | |||
| 37 | # | ||
| 38 | # new( %options ) - | ||
| 39 | # | ||
| 40 | sub new { | ||
| 41 | |||
| 42 | my $self = shift; | ||
| 43 | my (%params) = @_; | ||
| 44 | |||
| 45 | unless (ref $self) { | ||
| 46 | |||
| 47 | $self = bless { | ||
| 48 | # protocol | ||
| 49 | # url | ||
| 50 | # method (for http protocol) | ||
| 51 | # binding reference | ||
| 52 | # name of the port | ||
| 53 | # name of the parent service | ||
| 54 | }, $self; | ||
| 55 | } | ||
| 56 | |||
| 57 | foreach my $parameter (@{ $METHODS }) { | ||
| 58 | |||
| 59 | $self->$parameter( $params{$parameter}) | ||
| 60 | if(exists($params{$parameter})); | ||
| 61 | } | ||
| 62 | |||
| 63 | # $self->protocol($params{'protocol'}) | ||
| 64 | # if($params{'protocol'}); | ||
| 65 | # | ||
| 66 | # $self->url($params{'url'}) | ||
| 67 | # if($params{'url'}); | ||
| 68 | # | ||
| 69 | # $self->method($params{'method'}) | ||
| 70 | # if($params{'method'}); | ||
| 71 | # | ||
| 72 | # $self->name($params{'name'}) | ||
| 73 | # if($params{'name'}); | ||
| 74 | # | ||
| 75 | # $self->parentName($params{'parentName'}) | ||
| 76 | # if($params{'parentName'}); | ||
| 77 | |||
| 78 | return $self; | ||
| 79 | } | ||
| 80 | |||
| 81 | |||
| 82 | 1; | ||
| 83 | |||
| 84 | __END__ |