Search the web
Sign In
New User? Sign Up
delphigames · Discussion of game programming in the Delphi development environment.
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Problems with Delphi trying to talk to a WCF service   Message List  
Reply | Forward Message #7611 of 7611 | Next >
RE: [DelphiGames] Re: Problems with Delphi trying to talk to a WCF service

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]




Tue Jun 23, 2009 9:26 am

ianathome12345
Offline Offline
Send Email Send Email

Forward
Message #7611 of 7611 | Next >
Expand Messages Author Sort by Date

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...
Ian Munro
ianathome12345
Offline Send Email
Jun 22, 2009
3:08 pm

... 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...
rbaprog
Offline Send Email
Jun 22, 2009
10:14 pm

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...
Ian Munro
ianathome12345
Offline Send Email
Jun 23, 2009
9:26 am
< Prev Topic  |  Next Topic >
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help