starhu
asked on
Delphi Soap example
Hello,
I have an application written in Delphi 2010 and I need to communicate with a webshop using Soap.
I have never used Soap yet. I have some documentation how to connect to the webshop but all the examples are in Php.
I need help in this:
- I'll quote some parts of the documentation and I would like examples how to accomplish this.
I need both call examples and processing the returned xml data examples.
Nomal authentication array:
special authentication array:
Get all orders:
set order:
Thank you very much
I have an application written in Delphi 2010 and I need to communicate with a webshop using Soap.
I have never used Soap yet. I have some documentation how to connect to the webshop but all the examples are in Php.
I need help in this:
- I'll quote some parts of the documentation and I would like examples how to accomplish this.
I need both call examples and processing the returned xml data examples.
Nomal authentication array:
$auth=array(
Username=>'username',
PasswordCrypt=>'01234567890123456789012345678901',
ShopId=>1000,
AuthCode=>'abcdefghij'
);
special authentication array:
$auth=array(
Username=>'username',
PasswordCrypt=>'01234567890123456789012345678901',
ShopId=>1000,
AuthCode=>'abcdefghij',
SpecialFormat=>'egy-szamlazo-program'
SpecialCode=>'0123456789'
);
Get all orders:
public XmlDocument getOrder (array auth, array params);
Query:
$params=array(
InvoiceStatus=>1,
DateStart=>"2012.01.01",
DateEnd=>"2012.12.31"
);
set order:
public XmlDocument setOrder (array auth, array params);
call:
$params=array(
Key=>"1000-100000",
InvoiceStatus=>2,
InvoiceNumber=>"UO-100000/2012"
);
returns:
<?xml version="1.0" encoding="UTF-8" ?>
<Orders> <!--Orders -->
<Order> <!-- First order -->
<Key>1000-100000</Key> <!-- unique key -->
<Action>modify</Action> <!-- task completed -->
<Status>ok</Status> <!-- status (ok, error) -->
</Order>
</Orders>
Thank you very much
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thommy: this is not an English webshop and the doc is not public. I can send it in private though if you want.
This might help you
http://users.atw.hu/delphicikk/listaz.php?id=33&oldal=1
http://users.atw.hu/delphicikk/listaz.php?id=33&oldal=1
ASKER
I will try them and let you know about the result, thank you
ASKER
I tested for days but none of the links helped me to complete the task (they gave me directions though).
Now I know how to create an Xml document what the server wants.
So the question is:
If I create an Xml format as
then how can I make some Soap component send it?
Thank you
Now I know how to create an Xml document what the server wants.
So the question is:
If I create an Xml format as
result.WriteString('<?xml version="1.0" encoding="UTF-8"?>' + sLineBreak);
result.WriteString('<SOAP-ENV:Envelope' + sLineBreak);
result.WriteString(' xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"' + sLineBreak);
...
then how can I make some Soap component send it?
Thank you
Chapter 23: Web Services and SOAP
Chapter 22: Using XML Technologies
Can you tell me which webshop it is and provide the complete documentation?