Board index » delphi » SOAP & WSDL

SOAP & WSDL

I haven't done this before.

We have an application for processing fees by ACH.
Now we want to also allow use of credit cards.

Using WSDL Importer, I have imported the WSDL file we will use to
communicate with the credit card service.
I see in the newly created unit the information I will need to send
listed as TRemotable classes with properties:

  WSClientIdentity = class(TRemotable)
  private
    FappId: WideString;
    Fpassword: WideString;
  published
    property appId: WideString read FappId write FappId;
    property password: WideString read Fpassword write Fpassword;
  end;

In the webModule 'actions', what do I do to use the captured information
from the payee ( ..request.contentFields.values[]) to assign these
values to something the WDSL unit will use to transfer the information?

And then how do you say 'GO' to start the SOAP connection?

And then, how do I capture the SOAP response in a way that I can us a
TPageProducer to let payee know the success or failure?

 

Re:SOAP & WSDL


Quote
Ralph Shire wrote:
> In the webModule 'actions', what do I do to use the captured
> information from the payee ( ..request.contentFields.values[]) to
> assign these values to something the WDSL unit will use to transfer
> the information?

You can create an instance of type WSClientIdentity and set the
necessary properties. Like
var
  x : WSClientIdentity;
begin
  x := WSClientIdentity.Create;
  x.appId := '1100039';
  x.password := 'thisisntit';

 ...
end;

Quote
> And then how do you say 'GO' to start the SOAP connection?

You call the imported function (usually it'll be a global function in
the imported unit, something like GetIMyInterface) and call the
function that requires the WSClientIdentity parameter.

Quote

> And then, how do I capture the SOAP response in a way that I can us a
> TPageProducer to let payee know the success or failure?

Depends on the webservice: if there's an exception on failure then you
can trap it. Otherwise the function youcall may have a success/failure
return value.

--
Deepak Shenoy (TeamB)
Agni Software
http://www.agnisoft.com

Re:SOAP & WSDL


Thanks, but I guess this makes a difference: my web module contains two
units:
'CCTestUnit' where the get action method where I am trying to capture end
user input from an HTML document
 and then do something that will pass this information to the 'payments'
unit which was created when I imported the WSDL.
So the following code gives me Undeclaired identifier:  WSClientIndentity
error message.
Quote
"Deepak Shenoy (TeamB)" wrote:
> You can create an instance of type WSClientIdentity and set the
> necessary properties. Like
> var
>   x : WSClientIdentity;
> begin
>   x := WSClientIdentity.Create;
>   x.appId := '1100039';
>   x.password := 'thisisntit';

>  ...
> end;

Re:SOAP & WSDL


Never mind th post about that suggestion not working: all of a sudden it
stopped giving me that error message!
So the answer is: keep compiling until the error message goes away?
Quote
Ralph Shire wrote:
> "Deepak Shenoy (TeamB)" wrote:

> > You can create an instance of type WSClientIdentity and set the
> > necessary properties. Like
> > var
> >   x : WSClientIdentity;
> > begin
> >   x := WSClientIdentity.Create;
> >   x.appId := '1100039';
> >   x.password := 'thisisntit';

> >  ...
> > end;

Other Threads