emmettwa at onebox.com
Sat Oct 19 07:05:18 CEST 2002
> Now from within the GUI IDE, which is a Delphi application, I can do runtime
> access of the SOAP service _provider_ with some calls to a Python script
> that performs the SOAP XML code generation and submission, and then parses
> the resulting XML document returned from the service provider. The sticking
> point occurs here: as far as I know the only way I can parse the XML
> document returned from the SOAP call is via some process or CGI script that
> is run by the web server, right?
I'm a bit hazy on this but here's what I flash on ...
I recommend that you don't build much in terms of CGI scripts on
your own to parse the XML. And I'd recommend that you use readily
available tools to parse the XML.
It sounds to me that you need a parser that can read the stream
and create the Delphi equivalent to a Java JDOM or DOM representation
of the results. Then your tool should chain XSL transformations
as needed to provide data for the gui.
Again, if possible use the fact that everything is in XML and stay with
XSLT solutions as much as possible. Stay away from building a lot
of code from scratch.
> A more concrete example. The user decides to put a search of the SOAP
> provider's product inventory on their web page, and the results are shown in
> a list box on the web page. I let them build and test this functionality
> from within the GUI IDE, by using the python interface script. Now when I
> generate the the web page to actual HTML/XML code, I know I can include the
> needed SOAP call packaged up as an embedded XML fragment in the web page.
> The problem is, and I'd love to be wrong here as far as my current
> understanding of SOAP goes, the web server running the users web page will
> have no idea what to do with the XML document returned by the SOAP call,
I'm puzzled. The user either codes in XHTML, HTML, XSLT, or XML.
But not HTML/XML. Now, XSLT which generates XHTML can be made to look
very XHTML like. You'd hardly recognize the XSLT was XHTML except for
You need to do something which will do a post to the SOAP server,
create a Delphi XML representation (equivalent to JDOM or DOM)
which is then transformed with chained XSLTs to fill in the
HTML/XML. To do that I'd think you'd want the HTML/XML to be XSLT
which looks like XHTML.
> My desire is to make the generated pages to be as portable as possible
> across multiple web servers. But I'm guessing that at least at first, I'll
> have target the biggest web server package, currently Apache, and develop
> some sort of module for it that handles the returned SOAP calls and then
> probably does some HTML template code processing where I fill in variables
> with the SOAP results. I'm already worried about what kind of collisions
> might occur between my module and any other SOAP modules the host site
> manager might have installed. Also, I guess I'll have to then create other
> modules for each platform I wish to support (IIS, etc.), correct?
I'm puzzled about the collisionsl you're worried about.
The SOAP protocol has something in it which lets you identify state
and the equivalent of a http session variable, right?
As to your target. I'm puzzled. Are you writing a Delphi application
or an Apache plug in? Or both? Both I guess. Well, if you go with
Apache you're commiting to building everything in C. My inclination
would be to go with a technology better suited to XML - like tomcat -
and hope that all the servers you want to support can handle Java
servlets. With servlets you can take an http request
object and it into JDOM or DOM and post to a SOAP server -
where the payload is the JDOM element written to the
> If anyone has any great ideas on how to do this simpler please let me know.
> Also, anywhere my knowledge is incorrect, again, please let me know.
> Lastly, if XML-RPC would be any easier or better, please tell me what the
> differences might be. I'm assuming it would have the same incoming XML SOAP
> doc processing problems that SOAP does.
SOAP should have fewer doc processing problems than XML-RPC.
If Delphi doesn't have something like JDOM or DOM, and if you aren't
using Delphi because Borland is paying for it, then consider a Java
By the way you should be able to find some examples where XML is
XML and formats it nicely. If you can't find an example of that
I've got one around if you can't find one.
More information about the Python-list