English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
OCSoap Schema Restrictions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-05-16 (11:53)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] OCSoap Schema Restrictions
On Wed, May 16, 2007 at 11:07:02AM +0200, Florian Hars wrote:
> I found this in the ocsoap  source:
> type Types = <wsdl:types> [
>      Documentation?
>      Schema (* Only allow a single schema here, even though the standard
> 	     * would allow multiple.
> 	     *)
>   ]
> Is there a deeper reason for this restriction? The silly web service I'd
> need to connect to contains 8 schema elements here...

Well, there's not really a deep reason, beyond the facts that (a) WSDL
is a ridiculously complicated standard, and (b) OCSoap understands
just about enough to be able to parse the Google AdWords schemas.

The shallow reason is in wsdltointf.ml:

let main () =
  let wsdl = wsdl_load filename in
  let schema = wsdl_schema wsdl in

You'll probably want to make wsdl_schema return a list of schemas,
then have this code iterate over them.  Doing the right thing with the
functions and types defined in each schema so that their names don't
clash with each other might be a bit harder: you might consider
putting them into separate submodules or just mangling the names.


Richard Jones
Red Hat