Maybe I'm just too "new" in this realm and it hasn't hit me yet, but here's my potential problem.
In a client, written in Perl, I can create an object using the new method on my class (written in Perl) and stuff variables into that object to my hearts content. The I can call a method within the class, passing the object to the method. That's great. Because, imho, both sides (client and server) are written in Perl.
#!/usr/bin/perl -w
use SOAP::Lite;
my $soap = SOAP::Lite
-> uri('DocPub')
-> proxy('http://10.7.2.33:2738/cgi-bin/soap/docpub.pl');
my $t = $soap
-> call(new => '')
-> result;
$t->{name} = "Thomas";
my $r = $soap->hi($t);
print $r->result;
Or somesuch similar to the above. If a client is written in Java, or (eek)VB, can they handle creating an object with the new method, and doing what I did above in Perl? (I don't program much outside of Perl, SQL and a bit of other random stuff..)
Should I pass parameters to the method via an array?
$r = $soap->hi($param1,$param2,$param3);
Should I datatype the variables first?
my $v = SOAP::Data->type('string')->name(uid => 'Thomas');
my $name = $v->value;
Server stays the same:
sub hi {
my $self = shift;
my $e = shift;
return "Hello $e";
}
Of course, I want to change the method hi() to use it's params by
name and not simply shifting off an array. (Who's to say they are in the right order?)
I guess the "big" question is this: How to I pass variables to a method by name, and be sure the server can handle requests from multiple clients, written in different languages?
I've read up on the various texts out there. (The guide on soaplite.com was a tremendous help..) So I've come to the belief that I'm simply overlooking, or
looking too hard
Thanks so much,
_14k4 -
perlmonks@poorheart.com (
www.poorheart.com)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.