Click here to Skip to main content
15,885,244 members
Articles / Programming Languages / Delphi
Tip/Trick

.NET SOAP Web Service client and Borland SOAP server

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
3 Jun 2011CPOL 17.4K   2  
If you have a SOAP server created with Borland Delphi and a SOAP client created with .NET, then you can't get it working out of the box.

If you have a SOAP server created with Borland Delphi and a SOAP client created with .NET, then you can't get it working out of the box. You'll get deserialization error on client side. Some changes are required in the SOAP server to make it compatible with the .NET client.



  1. You need to go to the SOAP web module, select the HTTPSoapPascalInvoker, and make sure the option "soRootRefNodesToBody" is true.
  2. If you have DateTime fields in your TRemotable objects, then you need to override the ObjectToSOAP function like this (because if you don't, then the deserializer will just skip the DateTime fields):
  3. C#
    BillInfoType = class(TRemotable)

    ...

    Pascal
    function BillInfoType.ObjectToSOAP(RootNode, ParentNode: IXMLNode; 
             const ObjConverter: IObjConverter; const Name, 
             URI: InvString; ObjConvOpts: TObjectConvertOptions; 
             out RefID: InvString): IXMLNode;
    begin
      ObjConvOpts := ObjConvOpts + [ocoDontPrefixNode];
      result := inherited ObjectToSOAP(RootNode, ParentNode, ObjConverter, Name, URI, ObjConvOpts, RefID);
    end;


Good luck!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --