[ic] Using Interchange as a SOAP server - order/process
Dr. Michael Streubel
michael.streubel at ibizplanet.com
Thu Apr 14 07:23:18 EDT 2005
Chris Sendall wrote:
>I can successfully log on to the SOAP server provided by Interchange and I am
>now trying to order an item and checkout the shopping cart.
>
>My initial instinct was:
>my $order_opt = {
> code => 'os90001',
> quantity => '2',
> };
>$ok = $Tag->order( $order_opt )->result;
>
>if($ok) {
> print "Successful order.\n";
>}
>else {
> print "FAILED order.\n";
>}
>
>but this returns the html to order the item (missing "session"?) <a
>href="http://milton.internal.admin.cam.ac.uk:81/cgi-bin/foundcscp/ord/basket.htm
>l?mv_action=refresh&mv_order_item=os90001&mv_order_quantity=2&=MErpPqPA">
>
>I suspect I need to call a SOAP_Action but the information on how to do this is
>fairly sketchy, can anyone help please?
>
>Chris
>
>
Example:
In your catalog conf, something like
SOAP_Action soap_time <<EOR
sub {
my $locale = @_;
return $Tag->time($locale);
}
EOR
SOAP_Control Action/soap_time always
Now you can query the SOAP server according to
my $soap_response = SOAP::Lite
-> proxy('http://localhost:7780/yourCat/')
-> uri('http://yourserver/Vend/SOAP')
-> soap_time($locale)
;
But once again: Do the right thing in the global conf! (Whatever that is).
Good luck!
Michael
--
Dr. Michael Streubel
IBP Providers Ltd.
Schlossallee 30
65388 Schlangenbad-Georgenborn
Germany
Tel: 06129/502947
Fax: 06129/502946
Mobil: 0172/8615338
URL: http://www.ibizplanet.com
More information about the interchange-users
mailing list