Hi,
I am trying to interface to the Oracle Calendar Web Services Server using SOAP through Perl. My problem is not, however, specific to Oracle. It involves errors encountered in posting a raw SOAP request. The Perl code is in A. The SOAP msg payload is in B. The error response is in C.
A.
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
use HTTP::Request;
my $ua = LWP::UserAgent->new(env_proxy => 1, keep_alive => 1, timeout => 30, );
my $data_to_send;#-- And build a string of it
open(SOAPREQ,"soap_req.soap");
while(<SOAPREQ>) {
$data_to_send = "$data_to_send$_";
}
print "Sending :\n$data_to_send\n";
#-- Create the Request Object and send the data
my $response =
$ua->request(HTTP::Request->new('POST', '
http://development-10.cc.uic.edu/ocws-bin/ocas.fcgi',
HTTP::Headers->new('Content-Type' => 'text/xml', 'SOAPAction' => '
http://www.oracle.com/WebServices/Calen\
daring/1.0/'), $data_to_send));
#
#-- Print the response
print $response->as_string;
Note that I have my SOAP payload in the soap_req.soap file. This is a simple Ping command. Here is the listing:
B.
<?xml version='1.0' encoding='UTF-8'?>
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<cwsl:Ping xmlns:cwsl=
"
http://www.oracle.com/WebServices/Calendaring/1.0/">
</cwsl:Ping>
</soap:Body>
</soap:Envelope>
But, this doesn't seem to work. (I realise that I have not set the Content-Length SOAP header in the Perl code. If this could be the source of the problem, would someone please tell me whether the Content-Length includes the length of the headers also or just the payload).
The listing for the response in SOAP indicates a "method name not supported error". Here is the listing for the response:
C.
HTTP/1.1 500 Internal Server Error
Connection: close
Date: Mon, 21 Feb 2005 18:22:24 GMT
Server: Apache/1.3.31 (Unix) mod_fastcgi/2.2.12 mod_perl/1.27 mod_ssl/2.8.19 OpenSSL/0.9.7d
Content-Type: text/xml; charset=utf-8
Client-Date: Mon, 21 Feb 2005 18:37:54 GMT
Client-Peer: 128.248.155.93:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/" soap:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client.Error::System::SOAPRequest</faultcode>
<faultstring>The SOAPAction's method name is not supported</faultstring>
<detail>
<cwsl:Error xmlns:cwsl="
http://www.oracle.com/WebServices/Calendaring/1.0/">
<Class>Error::System::SOAPRequest</Class>
<Code>0020-00-00-00000009</Code>
<Line>1258</Line>
<FileName>SOAPRequestHandler.cpp,v</FileName>
<Version>1.33</Version>
<LastMod>2003/09/16 19:40:42</LastMod>
<Author>ericp</Author>
<Date>Mon Feb 21 12:22:24 2005</Date>
<PID>21360</PID>
<TID>3030703024</TID>
<Level>Error</Level>
</cwsl:Error>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Would greatly appreciate any help with this.
Thanks,
Paul