您的位置:首页 > 其它

.NET SOAP Web Service client and Borland SOAP server

2014-04-15 22:24 411 查看

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.

You need to go to the SOAP web module, select the
HTTPSoapPascalInvoker
, and make sure the option "
soRootRefNodesToBody
"
is
true
.

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):

BillInfoType = class(TRemotable)


...

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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: