Click here to Skip to main content
13,139,254 members (51,239 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I’m trying to connect to the Soap service of to retrieve the list of the last sent messages using Delphi 7 without any success. I’m able to get the WSDL definition from the server using ‘’ as an address , but when trying to access the service functionalities I get the Error: “Server was unable to process request. --- Value cannot be null. Parameter name: key.
I’m using a component HTTPRIO (SOAPHTTPClient) to get the service, with:
Port: SendSMSSoap

procedure TForm1.Button6Click(Sender: TObject);
  MyService: SendSMSSoap; //declare a service
  OutMsgs: ArrayOfSMSOutgoingMessage;
  i: integer;
  ke: WideString;
  MyService := HTTPRIO1 as SendSMSSoap; //create the service
  MyOutgoingMsg := SMSOutgoingMessage.Create;
  SetLength(OutMsgs, 3);
  for i := 0 to 2 do
    OutMsgs[i] := SMSOutgoingMessage.Create;

  i := 3;
  ke := 'KeySOMETHING'; // Account key
  OutMsgs := MyService.GetSentMessages(vari, i);

The declaration of the function that I get from the interface SendSMSSoap is this:

function  GetSentMessages(const AccountKey: WideString; const MessageCount: Integer): ArrayOfSMSOutgoingMessage; stdcall;

Any Ideas?
Posted 26-Apr-13 7:38am
bawolbri 31-May-13 18:53pm
I don't see where you are declaring 'vari', which you are passing into your GetSentMessages function call.

I'm currently working on a similar problem and was able to use the application "soapUI" to test the SOAP calls to my web service, for some reason my SOAP call is passing all of the params across to my web service however the web service did not "see" the parameters having values when the service was invoked. The problem was that my parameter nodes in my SOAP request did not have a namespace defined, I fixed that by using a String Replace function on my nodes (based on posts I've seen around the 'net) and manually adding the namespace to the parameter nodes... now the SOAP call being generated in my Delphi 7 code works fine when I paste it into soapUI, however it is still not working in my Delphi 7 client.

In summary I guess first you need to pass in the proper variable to your function, then from there debug your HTTPRIO object (I'm using the "BeforeExecute" method to both debug and perform my string-replace functionality to apply namespaces to my SOAP nodes.)

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 26 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100