[ic] HTTP POSTing to another server from IC
Rene Hertell
interchange-users at hertell.com
Fri Aug 22 02:56:24 EDT 2003
> IC still spits out that same error during a restart though. It's:
>
> Calling UI...UserTag 'posttourl' code is not a subroutine reference
> In line 34 of the configuration file
> '/mystore/ic493/code/UserTag/posttourl.tag':
>
> So something must not be right, right?
>
> - Grant
>
> P.S. Here's the tag again:
>
> Usertag posttourl Order url params apicall
> Usertag posttourl Interpolate 1
> Usertag posttourl Routine <<EOR
> sub {
> require HTTP::Request;
> require HTTP::Headers;
> require LWP::UserAgent; # SSL cabable if Crypt::SSLeay installed
> my $url=shift; my $params=shift;
> $ENV{'HTTPS_VERSION'} = '3';
> $ENV{'HTTPS_CERT_FILE'}='xxx.pem';
> $ENV{'HTTPS_KEY_FILE'}='xxx.key';
>
> my $page="";
> my $request=new HTTP::Request 'POST' => $url;
> $request->Content-Type('text/xml');
> $request->Content($params);
> $request->Content-Length(length($params));
> $request->X-API-COMPATIBILITY-LEVEL(305);
> $request->X-API-SESSION-CERTIFICATE('staticinfo');
> $request->X-API-DEV-NAME(staticinfo);
> $request->X-API-APP-NAME(staticinfo);
> $request->X-API-CERT-NAME('staticinfo');
Why are you quoting the static-info in some places, and not in others?
René
ps. I'm not good at this, but this came into my mind when reading your
code..
More information about the interchange-users
mailing list