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

  • SEARCH
  • Home
  • 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 7173951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:55:55+00:00 2026-05-28T15:55:55+00:00

I am trying to implement a SOAP client to handle electronic reporting of California

  • 0

I am trying to implement a SOAP client to handle electronic reporting of California payroll taxes for the web service described by the WSDL file at this location: FSET Service. In this WSDL file, there are references to several schemas including one at http://schemas.xmlsoap.org/ws/2004/08/addressing that seems to be stopping my program before it even gets to the OnBeforeExecute event.

To get off the ground with this project, I am trying to access the Ping function declared in the WSDL file.

I am just now getting some experience with SOAP client creation in Delphi. I am using Delphi 2010. Here is what I did to get to this point. I used the WSDL importer to import the file at the above address. It created a unit called fsetservice for me. Then, I added a form to my project, to which I added an HTTPRIO component. I set the component’s WSDLLocation to a local copy of the WSDL file, put a couple of TMemos on the form to capture the request and response headers and added code to do that. Then I set up a button and in its OnClick event, I wrote this code:

procedure TForm1.Button1Click(Sender: TObject);
var sResponse: String;
begin
  sResponse := GetFsetServiceSoap.Ping;
end;

When I click the button, I get this message before my breakpoint in the HTTPRIO OnBeforeExecute event is reached:

Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for
ultimate recipient is required but not present in the message

I know we should only ask one question per posting, but sometimes you don’t know enough to ask just one good question:

EDIT: To save time for anyone else with the same questions, I am putting the answers I have found under these questions.

It looks like the HTTPRIO component may be checking the XML imported from the WSDL file for completeness against the schemas referenced in the WSDL. That would seem pretty cool but is it true?

*ANSWER: Not true, at least according to the note at the bottom of the page at http://www.tutorialspoint.com/wsdl/wsdl_definition.htm. According to the note, it is not necessary for the schema to actually exist at that location, it just has to uniquely identify the schema used in the WSDL.*

In the automatically created (and unmodified) GetFsetService function, I can step all the way to the end and the error happens on return with no seemingly no possibility to step into the actual process where the error gets invoked. Is there a way to do it that I am missing?

ANSWER: I am still not sure on this but it seems that the answer is no. Anyway, although it will be more tedious to write this from scratch, that is a better solution than waiting for a miracle from the WSDL wizard.

Did I miss something that says I need to implement the FsetService interface that was automatically created for me?

ANSWER: Apparently not.

I saw in Marco Cantu’s book Mastering Delphi 2005 that there is an application supplied by Borland (WebAppDbg.exe)that allows you to look at the HTTP you send on a particular port. I tried it but got no result. Would this be helpful and if so, what port should I use?

ANSWER: Use the Fiddler2 tool. Nice find.

How do I get past this error?

ANSWER: Do it by hand.

  • 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-28T15:55:56+00:00Added an answer on May 28, 2026 at 3:55 pm

    First of all I would start with adding Fiddler2 and SoapUI to your arsenal of tools when dealing with soap and web services.

    Sounds like the envelope header is incomplete. In my experience with D2007 and a WCF web service, Delphi would not build the envelope header correctly, so I had to intercept the call and add the items like this:

    procedure TMainForm.MyMessageEnvelopeComplete(Sender: TROSOAPMessage);
    begin
      Sender.EnvelopeNode.AddAttribute('xmlns:a', 'http://www.w3.org/2005/08/addressing', False);
      Sender.HeaderNode.Add('a:Action').Value := 'http://Testservice.Connect/IConnect/Ping';
      Sender.HeaderNode.Add('a:To').Value := 'http://testservice-pc:2021/WSConnect';
    end;
    

    EDIT:

    If you want to build the soap envelope and the post command by hand, I have done it using the following code…

    procedure TMainForm.Button5Click(Sender: TObject);
      procedure HandleError(const errorCode: integer);
      var
        errorMessage: AnsiString;
      begin
        SetLength(errorMessage, 256);
        FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_FROM_HMODULE,
                       Pointer(GetModuleHandle('wininet.dll')),
                       errorCode, 0, PChar(errorMessage), Length(errorMessage), nil);
        SetLength(errorMessage, StrLen(PChar(errorMessage)));
        raise Exception.Create(errorMessage);
      end;
    
      function BuildHeader: TStringStream;
      begin
        result := TStringStream.Create('');
        try
          result.WriteString('Content-Type: application/soap+xml;charset=UTF-8;action="http://Thermo.Connect/IHCSConnect/Ping"' + sLineBreak);
        except
          result.Free;
          raise;
        end;
      end;
    
      function BuildBody: TStringStream;
      begin
        result := TStringStream.Create('');
        with result do
          try
            WriteString('<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">' + sLineBreak);
            WriteString('<s:Header>' + sLineBreak);
            WriteString('<a:Action>http://Thermo.Connect/IHCSConnect/Ping</a:Action>' + sLineBreak);
            WriteString('<a:To>http://thermo-pc:2021/WSHCSConnect</a:To>' + sLineBreak);
            WriteString('</s:Header>' + sLineBreak);
            WriteString('<s:Body>' + sLineBreak);
            WriteString('<Ping xmlns="http://Thermo.Connect">' + sLineBreak);
            WriteString('</Ping>' + sLineBreak);
            WriteString('</s:Body>' + sLineBreak);
            WriteString('</s:Envelope>' + sLineBreak);
          except;
            result.Free;
            raise;
          end;
      end;
    
    var
      InetRoot: HINTERNET;
      InetConnect: HINTERNET;
      Request: HINTERNET;
    begin
      InetRoot := InternetOpen('GabeCode', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
      try
        InetConnect := InternetConnect( InetRoot, 'thermo-pc:2021', 0, '',
                                        '', INTERNET_SERVICE_HTTP, 0, Cardinal(Self));
        try
          Request := HttpOpenRequest( InetConnect, 'POST', 'WSHCSConnect', 'HTTP/1.1', nil, nil,
                                      INTERNET_FLAG_KEEP_CONNECTION or INTERNET_FLAG_NO_CACHE_WRITE,
                                      0);
          try
            // build add header items to the post request
            with BuildHeader do
            try
              HttpAddRequestHeaders(Request, PChar(DataString), Length(DataString), HTTP_ADDREQ_FLAG_ADD);
            finally
              Free;
            end;
    
            // build the body of data being posted and send the post
            with BuildBody do
            try
              if not HttpSendRequest(Request, nil, 0, PChar(DataString), Length(DataString)) then
                HandleError(GetLastError);
            finally
              Free;
            end;
    
          finally
            InternetCloseHandle(Request);
          end;
        finally
          InternetCloseHandle(InetConnect);
        end;
      finally
        InternetCloseHandle(InetRoot);
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement an HTML Parsing web service as described in Chapter 23
I am trying to implement a web service that accepts SOAP 1.2 over HTTP
Am pretty new to web services and have been trying to implement Soap Faults.
I'm trying to implement a HMAC authorization solution with my SOAP WCF service. I
I'm extremely new to SOAP and I'm trying to implement a quick test client
I’m trying to implement a SOAP webservice in Python 2.6 using the suds library.
Trying to implement google C2DM service. registrationIntent.putExtra(app, PendingIntent.getBroadcast(context,0,new Intent(), 0)); registrationIntent.putExtra(sender,example@gmail.com); context.startService(registrationIntent); Almost every
This is the sample code for web services which am trying to implement .
A web service client (WCF) is compiled as a DLL, then comes the dll
i'm trying understand what are consequences of enabling compression for web service response. Web

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.