Re: Starting with SOAP



xhoster@xxxxxxxxx wrote:
Amer Neely <perl4hire@xxxxxxxxxxxxxx> wrote:
xhoster@xxxxxxxxx wrote:
Amer Neely <perl4hire@xxxxxxxxxxxxxx> wrote:
I need to update a script on one server with data from a form on
another server. It has been suggested that SOAP would work for this.
I've never used SOAP, and am overwhelmed with the number of 'SOAP*'
modules on CPAN. I've read that perhaps I should use a language with
better support for SOAP (PHP ?) but the existing script is in Perl and
I'd prefer to stick with that if possible.
It sounds like the tail is wagging the dog. For one thing, you
probably shouldn't update scripts based on form submissions. Why not
update some database that the script accesses? That would probably
solve the problem right there. But if you want Perl script-to-Perl
script communication, pick a protocol that Perl is good at, rather than
picking a random protocol and then figure out to implement in Perl.

Xho

Sounds like good advice. However the 'other script' is not in my
control, and I'm not even sure it is Perl - likely PHP. The owner is the
one looking for a SOAP solution. They are asking for an XML document of
the form data.

I'm still not sure I follow. You own one part and not the other part, and
you want your part to be in Perl. But would your part be the SOAP client
or the SOAP server? And what is this "form" data, is it a CGI form? And
is that coming from the other party, or is their a third party submitting
the form, which you are supposed to do convert into SOAP and pass it along?

You have it pretty much right. I built a form for a client, who now wants to take that data and pass it to another server so it can be used to update a page there. I don't own the receiving code (the SOAP server?) but the owner suggested SOAP as a means to do this. Hence my immersion into SOAP. A quick scan on CPAN revealed some 300 SOAP modules, so I'm really sinking here.


At present the form data is not being saved in a database, so that is
not an immediate solution, although I could present that to my client
and the 3rd party.

If the form isn't in soapy XML, and that is what they want it in, then
just saving the form as is in a database isn't going to help. But anyway,
I think there was miscommunication. You don't want to update a script
(i.e. change the source code of a script) on another server, you just
want to interact with a script on another server, right?

Yes, I just need to pass the form data (marked up as XML).

If so, then
you might want to ask "What changes would your script make to the database
if my script called your script the way you want it to? Why not just
let me make those changes myself?" Unfortunately, many people think
that the "right" way to do things is to treat the database just as some
opaque bit-bucket and the "real" data lives in some XML-object model and
therefore can't be assessed directly in the database. These people are
almost always wrong, but sometimes they are the ones signing the
paycheck.

I think you are under the impression there is a database already - there isn't. I don't see why a database should be needed if SOAP works the way it's presented (and if I understand it correctly).


<snip errors>

I think the module finding problems have already been addressed, but
just a word of caution. Just because you can make a client and a
server, both from Perl using SOAP::Lite, that will work with each other
doesn't mean much. It doesn't mean the client will work with another
language's server, or the server will work with another language's client.

Xho

Well, I'm still stuck at this module finding stage, so it may have been addressed but certainly not resolved. As you mention, both a client and server can be built from SOAP::Lite. I'm trying to get something working (a client and server) before I tackle passing the form data to a third-party script.

--
Amer Neely
w: www.webmechanic.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"Others make web sites. We make web sites work!"
.



Relevant Pages

  • Re: Banana Republic (was Re: OpenVMS Book Wins award)
    ... overtaken by the more prosaic aspects of supporting WASD. ... for example), that it is better economy, if a client breaks the ... to allow a script to run to completion rather than try and ... The server just throws away ...
    (comp.os.vms)
  • Re: Regarding a selection for mobile code/scripting language
    ... Client Side scripting, so the server can send script commands to the client. ... I decided they should be scripted and mobile code. ...
    (Vuln-Dev)
  • Re: HTTPSConnection script fails, but only on some servers (long)
    ... (HTTP/CONNECT + switch to HTTPS) ... wget and my python script. ... >>The python script works with server A, ... the problem seems to depend on both the client ...
    (comp.lang.python)
  • Re: secure transfers and authentication
    ... Thanks james that looks to be a really handy guide on the whole thing. ... On a side note does anyone know why i have problems posting to the list using the reply function in my mail client? ... From the server ssh to your clients and save the rsa keys ... You could create a script like this: ...
    (Security-Basics)
  • Re: How do we get there from here?
    ... >> executing on the server as a pre-processor. ... If there are client side versions of PHP, ... > name implies a static text file, is it different from a PHP script? ...
    (comp.databases.pick)