Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7025991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:03:29+00:00 2026-05-28T00:03:29+00:00

I have a simple SOAP apllication: Middle Tier: TSOAPDataModule including TDatasetProvider linked to TADOQuery.

  • 0

I have a simple SOAP apllication:
Middle Tier: TSOAPDataModule including TDatasetProvider linked to TADOQuery. TADOQuery has defined a few Parameters (different datatypes)
Client: TClientDataSet linked to TSOAPConnection and provider set to DatasetProvider in MiddleTier.

In design time i can succesfully Fetch Params and Fields for the ClientDataSet from Server. In runtime I programaticaly set parameters for the ClientDataSet and call Open. But I get an SQL error (comming from SQL Server, through ADOQuery in Middle Tier, passed by SOAP to the client) about incorrect values in parameters. After detail debugging I found that the parameters are correctly passed from client to the SOAP server. The Provider.Params lists all the parameters correctly. Unfortunatelly before the ADOQuery opens (after the ADOQuery.Parameters are assigned from the DataSetProvider) the DataType of all the parameters are changed. ie.: original ADOQuery Parameter DataType was ftDateTime but after assignment from DataSetProvider it becomes ftWideString.

This happens for any Parameter DataType that is not null from the Client – all of them become ftWideString.

I have found that this change happens in TParam.Assign where TParameter(Destination).Value is assigned before TParameter(Destination).DataType. After the Value is assigned the DataType is automatically guessed from the varType of the Value. As the Value comes from OleVariant it is always considered to be String.

I tried to alter the TParam.Assign procedure = Assign DataType before Value. But in this way I get ADO Error of Value type being incompatible with DataType.

I think that the problem is in the way tha parameters are being encoded into SOAP XML request. Their values are simply ‘{value}’ without any type information.

I’ve googled a lot for this problem, but didn’t find even a note of simmillar behaviour.

Do I do something wrong, or is this a bug in SOAP in Delphi?

PS: I run Delphi 2009

EDIT:
I just found a sample SOAP request that has the params marshaled in the following structure:

<NS1:V NS2:VarArrayType="8204">
<V xsi:type="xsd:string">param1</V>
<V xsi:type="xsd:string">Frank</V>
<V xsi:type="xsd:byte">1</V>
<V xsi:type="xsd:byte">1</V>
</NS1:V>

The same in my case looks this way:

<NS1:V NS2:VarArrayType="8204">
<V>param1</V>
<V>Frank</V>
<V>1</V>
<V>1</V>
</NS1:V>

I think this is the root of my troubles but do not know how to make my client to add xsi:type attribuge to the SOAP request.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:03:30+00:00Added an answer on May 28, 2026 at 12:03 am

    I found it. I have registered my SOAPDataModule with

    InvRegistry.RegisterInterface(TypeInfo(IMyIntf), MyNamespace, 'UTF-8');
    InvRegistry.RegisterInvokeOptions(TypeInfo(IMyIntf), [ioDocument, ioHasNamespace, ioIsAppServerSOAP]);
    

    Including ioDocument in RegisterInvokeOptions made the xsi:type attribute not to be included in Variant type data. This made unmarshaling the param values to olestring types. So the solution for my problem is:

    InvRegistry.RegisterInvokeOptions(TypeInfo(IMyIntf), [ioHasNamespace, ioIsAppServerSOAP]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a RPC encoded PHP webservice that returns a simple soap envelope with
I have simple win service, that executes few tasks periodically. How should I pass
I have a simple WCF service suing SOAP . I have a very simple
I have a simple web service operation like so: @WebService(endpointInterface = soap.service.sei.HelloWorldSei) public class
I have a relatively simple java service that fetches information from various SOAP webservices
I have simple table in Sybase -- Creating table 'SimpleText' CREATE TABLE [dbo].[SimpleText] (
I have simple class with width and height member fields which define number of
I have simple php validation form that is halfway working. If you leave the
I have simple JavaScript snippet: var obrazek = [{nazwa: "Sniadanie", wiek: 100, autor: "Alicja"},{nazwa:
I have simple script with EventMachine, Fibers and faye require faye require em-synchrony require

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.