Re: WSDL/SOAP/XML-RPC HELP
From: ChrisO (ceo_at_nospam.on.net)
Date: 08/20/04
- Next message: Eric Schwartz: "Re: split inconsistency- why?"
- Previous message: Ilya Zakharevich: "Re: no re 'eval' not secure enough"
- In reply to: Tomislav Lepusic: "WSDL/SOAP/XML-RPC HELP"
- Next in thread: lepi: "Re: WSDL/SOAP/XML-RPC HELP"
- Reply: lepi: "Re: WSDL/SOAP/XML-RPC HELP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 20 Aug 2004 21:55:19 GMT
Tomislav Lepusic wrote:
> Hello,
>
> I don't know if this is the right group, so if you can help me thanks,
> if not, sorry to bother you.
>
>
> I'm working on my student project and I'm totally lost and don't have
> any idea how to continue, and the deadline is 1.9.2004. Please help,
> 'couse i'm loosing myself in this XML/SOAP/RPC/WSDL things......
>
> A little discription.
> I have to define and make something like virtual driver for serial port
> (RS232), only it isn't really a driver. The server has to be on Linux
> box (physical port(s) is/are there), and the other side (client) is not
> inportant. It is not important what is connected on serial port. Also,
> there is no need to work on any kind of drivers on Windows or something,
> becouse that is not the point. I have to make an universal way to
> send/recive/control serial port on that server computer from anywhere. I
> know how to program for serial port on Linux (in C), and I have made
> some progress there. That low-level programing isn't the problem. The
> problem is how to make it work over the net, so that someone who wants
> to write a program on Windows or Mac can use something universal to
> access it (like XML). I HAVE TO USE XML-RPC or SOAP or WSDL or something
> like that. The problem is that I don't know how to use those
> technologies. I read some tutorials, guides on XML-RPC, SOAP and WSDL,
> and I'm totally lost now.
> BTW, I was planning to use Perl becouse I know something about it. (I
> don't know Java)
>
> So, if you can help me in any way (advice, similar example or
> something), please do. This is very important to me. I forget,
> everything must be secure (SSL or something).
>
Well, at least you are being honest and coming right out and saying this
is for a school project. Good for you. This is a GREAT assignment and
hopefully no one here gives away any answers. We homeschool our
children and it's almost always right to give them better direction, as
long as they aren't being spoon-fed the answers which is a terrible
thing to do (and what most people expect these days). Anyway, here are
some pointers to get you going:
(1) This is the right place to ask questions if you want to do this in
Perl, which it sounds like you do.
(2) If you are going to write the serial "driver" on the Linux side in C
and try to use Perl to do the web services piece then in my estimation,
the hardest part of your project is going to be interfacing your web
service (presumably written in Perl) to your serial "driver" written in
C. I could be wrong about this and maybe someone else can help there.
I know C, but I've not interfaced C and Perl (though I hear it's
somewhat easy to do.)
(3) I hope you understand at least this much, because your assignment is
a good one: Your prof simply wants you to present a public interface via
the web (more specifically via a web service) to your backend serial
"driver". That's it. I assure you it's really simple even though you
feel it's hard right now.
Say you have a "function" in your serial "driver" that sends voltage
"HIGH" on pin 8 for example (I'm not going to dig out a serial reference
to get completely accurate on the RS-232 specification right now, but
there are pins that deal with voltage.) Say that causes a light to turn
"on" on the machine were the serial port is. So, your prof wants a
public web interface to do this via a web services call. It talks to
your serial driver and tells the serial driver "run this routine" and
that routine raises the voltage and turns on the light:
[RPC Client (can be a web browser or some other "client")] -> Calls Web
Service routine "light_on()" -> Calls serial driver routine "light_on()"
-> light comes on. That's what he wants (according to your description).
(4) Your RPC client doesn't have to be a web browser; that's the beauty
of it. It can be a command line client, a routine in a client-side
application (that goes out port 80 or port 8080, etc.), or a command
line utility.
(5) If this project is important to you (which it sounds like it is), do
yourself a HUGE favor: Go to http://safari.oreilly.com and sign up for a
"trial" subscription to O'Reilly's Safari bookshelf. Place the books
called "Web Services with Perl" and "Programming Web Services with
XML-RPC" on your bookshelf. Read them. They are super helpful and will
hopefully get you up to speed quickly. (Remember to cancel your
subscription within 14 days.) If you are going to use Perl and need to
get up to speed quickly, read chapters 3-5 on the first book and chapter
4 in the later book. The last book will also give you exposure to doing
something like this in Java, ASP and PHP which may be helpful.
(6) If you have the time, get an XML-RPC web service going with a few
test routines. XML-RPC is about as easy as it gets and it will drive
home the concepts for you quickly. It's easy to set up. BUT.... It
does *NOT* have the security built in that your prof requires. For
this, you are going to have to use something else. But XML-RPC will
give you a great idea of what can be done in a short amount of time. My
opinion.
(7) *If* your prof has left open the door for XML-RPC, then he must know
that by default it is NOT secure and that might imply that he will be
satisfied if you use XML-RPC and come up with your own
security/authentication scheme. If this is the case, all your work in
XML-RPC could be used and you could add an authentication layer later.
You might want to check on that.
Finally, there are sample routines EVERYWHERE for this if you look.
Don't panic. Plan your attack and then... attack it. Realize that you
are going to have potentially two interfaces: (1) The public web service
interface and (2) the interface between your web service and your serial
"driver." If it were me, I'd try and keep it all in the same realm if I
could (eg. all in Perl, all in blah, etc.)
I think you'll have a lot easier time in Perl than in Java, but that's a
biased opinion.
If you want some simple, easy to understand examples, you can go here:
http://www.technologease.com/employees/chris/portfolio/
There is an XML-RPC server with test routines (which is all you need
initially) and even a callable RPN calculator, a command line client and
an email gateway at that location. The email gateway code would be an
example of interfacing one application to web services, in this case,
interfacing (or gatewaying) email through POP3 to defined web services.
In your case, you need to interface your web services to your serial
"driver."
These examples should get you started. You are still going to have to
work through the "security" issue.
Good luck!
-ceo
- Next message: Eric Schwartz: "Re: split inconsistency- why?"
- Previous message: Ilya Zakharevich: "Re: no re 'eval' not secure enough"
- In reply to: Tomislav Lepusic: "WSDL/SOAP/XML-RPC HELP"
- Next in thread: lepi: "Re: WSDL/SOAP/XML-RPC HELP"
- Reply: lepi: "Re: WSDL/SOAP/XML-RPC HELP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|