Solved

Delphi Soap example

Posted on 2013-01-18
6
4,107 Views
Last Modified: 2016-02-10
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:
$auth=array(
Username=>'username',
PasswordCrypt=>'01234567890123456789012345678901',
ShopId=>1000,
AuthCode=>'abcdefghij'
);

Open in new window


special authentication array:
$auth=array(
Username=>'username',
PasswordCrypt=>'01234567890123456789012345678901',
ShopId=>1000,
AuthCode=>'abcdefghij',
SpecialFormat=>'egy-szamlazo-program'
SpecialCode=>'0123456789'
);

Open in new window


Get all orders:
public XmlDocument getOrder (array auth, array params);

Query:
$params=array(
InvoiceStatus=>1,
DateStart=>"2012.01.01",
DateEnd=>"2012.12.31"
);

Open in new window


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>

Open in new window


Thank you very much
0
Comment
Question by:starhu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 27

Accepted Solution

by:
Sinisa Vuk earned 500 total points
ID: 38793081
0
 
LVL 19

Expert Comment

by:Thommy
ID: 38793163
Chapter 22 and 23 are good start for using XML and SOAP web services in Delphi...
Chapter 23: Web Services and SOAP
Chapter 22: Using XML Technologies

Can you tell me which webshop it is and provide the complete documentation?
0
 

Author Comment

by:starhu
ID: 38794099
Thommy: this is not an English webshop and the doc is not public. I can send it in private though if you want.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:rinfo
ID: 38796008
0
 

Author Comment

by:starhu
ID: 38815820
I will try them and let you know about the result, thank you
0
 

Author Comment

by:starhu
ID: 39187241
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
   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);
...

Open in new window


then how can I make some Soap component send it?

Thank you
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month3 days, 19 hours left to enroll

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question