From: Paul K. <pau...@ya...> - 2004-04-16 00:53:54
|
Mark, I've just commited the update that fixes a known bug with not handling attributes. See if it works for you. > 1. How can I pass an element and attribute? Example: > > $list = find_business(name => 'D%') > > I need to include attribute lang="en" in the "name" element. This should work: find_business(name({lang => 'en'}, '%D')); as well as find_business(name('%D')->attr({lang => 'en'})); and find_business(UDDI::Data->name(name => '%D')->attr({lang => 'en'})); I've added tests to make sure it's not my imagination ;) > 2. How do I specify multiple "name" elements and "lang" attribues? > (UDDI v2 has "lang" on "name"). I know I can get multiple elements > this way: > > $list = find_business(name('D%', 'X%')) First syntax should work even though I haven't tested it yet: find_business(name({lang => 'en'}, 'D%', 'X%')); > 3. I thought the answer might involve UDDI::Data. But, when I try > an example from the POD, it fails > > $list = find_business(UDDI::Data->name( name => 'D%' )) I get a different error, but I believe the reason is the same. As I said, current version doesn't handle attributes; the updated one does. You can get it from the project CVS repository. > I'm accustomed to. But, I can do a lot with examples and > documentation (as I understand more about how the features work). That would be great! I haven't updated the documentation yet, but added tests to make sure that different sintaxes work. I'll do other changes to enable different UDDI versions later today (fix bugs first ;)). Thanks! Best wishes, Paul. --- "Mark A. Fuller" <mar...@ea...> wrote: > Paul, I need to understand something. If I can get this under my > belt, I want to create an example script showing how to call and > process each UDDI web service. I can update the POD too if I see > anything that could have been clearer as a newbie. > > 1. How can I pass an element and attribute? Example: > > $list = find_business(name => 'D%') > > I need to include attribute lang="en" in the "name" element. > > 2. How do I specify multiple "name" elements and "lang" attribues? > (UDDI v2 has "lang" on "name"). I know I can get multiple elements > this way: > > $list = find_business(name('D%', 'X%')) > > How can I get attribute "lang" with each "name"? > > 3. I thought the answer might involve UDDI::Data. But, when I try > an example from the POD, it fails > > $list = find_business(UDDI::Data->name( name => 'D%' )) > > Use of uninitialized value in exists at > C:/Perl/site/lib/UDDI/Lite.pm line 103. > Use of uninitialized value in exists at > C:/Perl/site/lib/UDDI/Lite.pm line 112. > Use of uninitialized value in concatenation (.) or string at > C:/Perl/site/lib/UDDI/Lite.pm line 119. > > This was using the unmodified UDDI::Lite script. I am using Perl > 5.8.2 on Win XP Professional. > > I'm accustomed to. But, I can do a lot with examples and > documentation (as I understand more about how the features work). > > Thanks! > Mark > |