Results 1 to 5 of 5

Thread: Delphi and .net WCF service problem

  1. #1

    Delphi and .net WCF service problem

    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 ?

    Ian

  2. #2
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,246
    Blog Entries
    2

    Re: Delphi and .net WCF service problem

    The only thing I can think of doing would be to write a simply 'proxy' using say Indy (it's http based protocol no?).

    Use a TIDHTTPServer (I think) to capture the request, drop it into a memo so you can see it and then forward it to the real server with TIDHTTP (I think) and then grab the response and dump that into a memo.

    Thats what I'd do, or have a nose around the web for debugging proxies... I've encountered some in the past when I've been looking to debug http requests, but off the top I can't think of any specific places to look other than google.

    Hope this helps.
    :: AthenaOfDelphi :: My Blog :: My Software ::

  3. #3

    Re: Delphi and .net WCF service problem

    use your webbrowser to visit the webservice url there you should be able to see a list of its functions together with a testing form. What kind of (data)types are you using? Only the basic ones work out of the box so you might also want to take a look at the generated source you use to connect to the webservice. Hope this is of some help.

    E.g. have a look at the babelcode webservice: http://lingua.embarcadero.com/babelcode/converter.asmx
    http://3das.noeska.com - create adventure games without programming

  4. #4

    Re: Delphi and .net WCF service problem

    I managed to capture the output from my Delphi client and the way it's formed isn't correct or at least it's not the same as the output from the .net WCF Test Client. I'm not sure if this is a soap 1.1 / soap 1.2 issue. I'm using the basic http binding in the service which "should" be soap 1.1 complient. I can use IE to view the service and wsdl details and the service works fine from a .net client but Delphi is not playing ball Time for a bit more googling of binging.

  5. #5

    Re: Delphi and .net WCF service problem

    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(IUse rImageService), 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 all your help

    Ian

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •