Board index » delphi » Service from WSDL?

Service from WSDL?


2007-11-16 03:19:51 AM
delphi234
I'm wondering if there is an easy way to build a base server from a wsdl?
The situation is that I have got a 3rd party service I am connecting to. I can
do a lot of testing, but I kind of need to throw responses back to the
client that don't normally occur (plus I don't always have access to the
service). So, I need a "test service" I can control.
Is there some way to do that (with RAD Studio 2007 Enterprise) besides hand
crafting something?
Thanks,
Dan
 
 

Re:Service from WSDL?

Hello Dan,
The Delphi Win32 WSDL Importer does allow you to create a Service from a
WSDL but the new Service won't match the original one. The operation/methods
and parts/parameters will match but some things about the original WSDL
won't be the same in the new Service's WSDL. More on that below. The
WSDLImp.exe command line tool option is -Os+. A similar option is available
in the GUI importer in the IDE.
If you goal is strictly to see how your client handles certain return values
you can use this option. However, your client will have to use a different
binding for your base server vs. the binding representing the 3rd party base
service. The main issue is that we don't roundtrip certain attributes of
the WSDL back to the service implementation (like the style, encoding, SOAP
Action headers, etc).
.NET has a nice feature that is commonly referred to as 'Contract-First
Service Development' or just 'Contract-First'. Basically, you can use the
WSDL importer (wsdl.exe) on a WSDL, specifying the /si switch, and it
guarantees that the Service generated will match the original WSDL (I found
a few cases where it is not really full round-trip but it is very very close).
I use that feature on a regular basis when investigating interop issues with
the Delphi Win32 SOAP runtime.
Cheers,
Bruneau.
 

Re:Service from WSDL?

Thanks Bruneau.
I may give those options a try if not now then on other projects.
Se really need to beat up on clients more than we do now I think, and
creating test services just seems a smart thing to do.
Dan
"Jean-Marie Babet" <XXXX@XXXXX.COM>writes
Quote
Hello Dan,

The Delphi Win32 WSDL Importer does allow you to create a Service from a
WSDL but the new Service won't match the original one. The
operation/methods
and parts/parameters will match but some things about the original WSDL
won't be the same in the new Service's WSDL. More on that below. The
WSDLImp.exe command line tool option is -Os+. A similar option is
available
in the GUI importer in the IDE.

If you goal is strictly to see how your client handles certain return
values
you can use this option. However, your client will have to use a different
binding for your base server vs. the binding representing the 3rd party
base
service. The main issue is that we don't roundtrip certain attributes of
the WSDL back to the service implementation (like the style, encoding,
SOAP
Action headers, etc).

.NET has a nice feature that is commonly referred to as 'Contract-First
Service Development' or just 'Contract-First'. Basically, you can use the
WSDL importer (wsdl.exe) on a WSDL, specifying the /si switch, and it
guarantees that the Service generated will match the original WSDL (I
found
a few cases where it is not really full round-trip but it is very very
close).
I use that feature on a regular basis when investigating interop issues
with
the Delphi Win32 SOAP runtime.

Cheers,

Bruneau.