MEGA Search
20.3 Million


Sign Up
From: Jason Southwell  
Subject: Cannot unwrap: More than one strictly out element was found
NewsGroup: borland.public.delphi.webservices.wsdl
Date Posted: 3-Apr-2007 at 17:48:9 PST
When importing a wsdl file in Delphi 2007, I'm getting the following 
error on several methods:

// Cannot unwrap:
//     - More than one strictly out element was found
function  QueryOffers(const request: QueryOffers): QueryOffersResponse; 
stdcall;

The wsdl has a 
From: Jean-Marie Babet  
Subject: Re: Cannot unwrap: More than one strictly out element was fo
NewsGroup: borland.public.delphi.webservices.wsdl
Date Posted: 4-Apr-2007 at 10:9:16 PST
Hello Jason,

I've sent you the latest importer that addresses the scenario with multiple
compositor nodes (sequence, choice, etc).

I forgot to mention that depending on the schema you may run into a little
problem: the importer also supports xsd:any but there's runtime changes
necessary to back that support. So if you run into any properties generated
by the importer with IS_ANY, please comment these out until the runtime
update is available.

Cheers,

Bruneau.



From: Jean-Marie Babet  
Subject: Re: Cannot unwrap: More than one strictly out element was fo
NewsGroup: borland.public.delphi.webservices.wsdl
Date Posted: 3-Apr-2007 at 17:35:27 PST
Hello Jason,

The issue with unwrapping is separate from .

The support for  in shipping D2007 was there if choice was the one
compositor node... as in:


  
      
           
           
           
      
    


However, if you have more than one compositor node, the importer would only
pick elements from the root node. This was related to a problem I has
encountered with the XMLSchema unit. The person who works on that area did
fix the problem with compositor nodes but I did not have the time to adjust
the importer's logic before we shipped.

This has been addressed in a new importer that hopefully will be made
available with an update. I can email you a copy in the meantime.

The unwrapping when there's more than one strictly 'out' element is more
related to being backward compatible with previous runtimes. Earlier
versions of the runtime could not handle multiple root nodes (in the
 node) when handling a request (unless one of the nodes was named
'return' or 'Result'). This was because the runtime could not figure out
which one of the nodes mapped to the function's return value.

The new runtime, however, can handle multiple nodes in the response as long
at the importer registers the return names. You must enable the 'Allow out
parameters' (-Om+ option on command line) option for that to happen.

You should be able to use the service even if it was not unwrapped. However,
it's inconvenient to deal with the wrapper elements and preferable to remove
that extra layer.

If you'd like to try a updated copy of the importer please let me know and
I'll forward it via email. Also let me know if enabling multiple outs does
not fix the issue of unwrapping.

Cheers,

Bruneau.