Hello,
Just in case anyone else is going through the pain of Delphi to .net WCF
service then you may be interested in how I fixed my problem. The unit
that is created when you import the WSDL has some lines of code in the
initialization section. One of them may look like this
"InvRegistry.RegisterInvokeOptions(TypeInfo(IUserImageService),
ioDocument);". The cause of my problem was that "ioDocument" was
actually set to "ioLiteral". When it was set to ioLiteral the SOAP
envelope XML wasn't formed in a way that the WCF service was expecting.
Once I changed it to ioDocument the XML was created differently and
matched the XML created by the Visual Studio WCF Test Client. It now
works but this was a very unpleasant experience due to the lack of help
and documentation.
Thanks for your help.
Ian
--- In delphigames@yahoogroups.com
<mailto:delphigames%40yahoogroups.com> , "Ian Munro" <ian.munro@...>
wrote:
>
> Hello,
> Anyone have experience writing a Delphi app that connects to a .net
WCF
> service ? I'm an having no fun with this at all. I've imported the
WSDL
> file but when I call a function on the service I get the following
> message: "error in deserializing body of reply message for operation
> xyz..". I've configured my WCF service to communicate using SOAP 1.1
as
> Delphi 7 only supports this version. Does anyone know of an
application
> that I can use to see what the XML looks like that is coming back from
> the service ?
>
The problem is that SOAP uses a different encapsulation in each version,
there seems to be a difference even in the way Delphi Pro/Enterprise
handles this and it's different between versions too. The best thing you
can do is to handle SOAP requests manually in your application and use
an XML parser to obtain the information and maybe write a function that
handles Open Array Parameters like "Format", to connect to the SOAP
server i used the Indy HTTP Client.
Hope this helps.
Razvan
This email is intended solely for the person to whom it is addressed and may
contain confidential or legally privileged information. If you are not the
intended recipient, be advised that you have received this email in error and
that any use, dissemination, forwarding, printing or copying of this email is
strictly prohibited. Please notify the author by replying to this email and
destroying all copies of the email and attachments. Access to this email by
anyone else is unauthorised.
Email may be susceptible to data corruption, interception, unauthorised
amendment, viruses and delays or the consequences thereof. Any views or opinions
presented are solely those of the author and do not necessarily represent those
of Grosvenor Technology Ltd.
Grosvenor Technology Ltd. (incorp. Newmark Technology Ltd.) is a company
registered in England with company number 2412554.
The Grosvenor Technology Ltd. Registered Office address is Millars Three,
Southmill Road, Bishop's Stortford, Herts, CM23
[Non-text portions of this message have been removed]