Ok so thank you everyone for you help so far. Currently I have not have not been able to get much back from the system so I have decided to try the html approach in Perl. Below is the code
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
use HTTP::Request::Common;
my $userAgent = LWP::UserAgent->new(agent => 'perl post');
my $message = "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance
+\"
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">
<soap12:Body>
<getCardInfo xmlns=\"http://www.designa.de/\">
<UserID>ws</UserID>
<UserPWD>ws</UserPWD>
<TccNum>45</TccNum>
<CardNumber>\"PM010010110000000037\"</CardNumber>
</getCardInfo>
</soap12:Body>
</soap12:Envelope>" ;
my $response = $userAgent->request(POST 'http://192.168.1.100/AbacusWe
+bService/ServiceCashPoint.asmx/getCardInfo',
Content_Type => 'text/plain',
Content => $message);
print $response->error_as_HTML unless $response->is_success;
print $response->as_string;
Now I can connect for the isAlive command and get a response bac even though it is in a xml format. How ever when I try and and request getCardInfo which is to return a few different things I get a error saying Request format is invalid. I know I am missing something simple but for the life of me I cannot work it out. Once again thanks for all the help
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|