Loading ...
Sorry, an error occurred while loading the content.

6283Need paid consult to solve SOAP::Lite complex parameter issue

Expand Messages
  • ncbjd@rocketmail.com
    Feb 3, 2009
    • 0 Attachment
      At this point, I am looking for someone to hire to help solve what may
      be a simple problem of serializing a slightly complex parameter sent
      with a SOAP method call. Thank you for your help in solving the
      problem directly, or passing me a pointer to someone who can.

      Below, I have included
      0. the form of the desired xml request
      1. my script,
      2. the relevant parts of the wsdl file, and
      3. the SOAP error message:

      Overview:


      I need to pass a single string (wsdl defined "ticketNumber" of type
      "string") + a [complex] data item (of type "nameValuePairs")
      consisting of two (or more) elements, each a "nameValuePair" (wsdl
      defined as string "name" + string "value"). The resulting XML needs to
      look like this:

      #----------------------------------------------
      #----------------------------------------------

      <correct request xml>

      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <generateSecureLinkTicketRequest
      xmlns="http://types.secureLink.touchnet.com">
      <ticketName>Test Ticket</ticketName>
      <nameValuePairs>
      <name>AMT</name>
      <value>45.00</value>
      </nameValuePairs>
      <nameValuePairs>
      <name>ID</name>
      <value>123</value>
      </nameValuePairs>
      </generateSecureLinkTicketRequest>
      </soapenv:Body>
      </soapenv:Envelope>

      </correct request xml>

      #------------------------------------------
      #------------------------------------------
      <script>


      #!/usr/bin/perl
      use strict;
      use warnings;
      use SOAP::Lite + trace=>'debug';

      $ENV{HTTPS_KEY_FILE}="/root/KeyStoreFinal20081222.x509";
      $ENV{HTTPS_CERT_FILE}="/root/SignedCert20081222.crt";
      $ENV{HTTPS_DEBUG}=1;

      my $uri ='https://198.136.211.18:8448/axis/services';
      my $proxy ='https://198.136.211.18:8448/axis/services/TPGSecureLink';

      my
      $params=SOAP::Data->name("aRequest")->type("SecureLinkTicketRequest")=>SOAP::Data->name("ticketName"
      => "PY13579"),
      SOAP::Data->name("nameValuePairs")->type("secureLinkTypes:nameValuePair")
      => {SOAP::Data->name("AMT"=>"45.00"),
      SOAP::Data->name("BILL_NAME"=>"Luigi Barzoni") };
      my $response =
      SOAP::Lite->uri($uri)->proxy($proxy)->generateSecureLinkTicket($params)->result;

      my @out=$response->paramsout;
      my $out_1=$out[1];
      my $out_2=$out[2];
      my $out_3=$out[3];

      if ($response) {

      print "$out_1\n";
      print "$out_2\n";} else {print"NoJoy";}

      </script>


      #----------------------------------------------
      #----------------------------------------------

      <wsdl>

      <complexType name="nameValuePair" >
      <sequence>
      <element name="name" type="xsd:string" />
      <element name="value" type="xsd:string" />
      </sequence>
      </complexType>




      <complexType name="GenerateSecureLinkTicketRequest">
      <sequence>
      <element name="ticketName" type="xsd:string" />
      <element name="nameValuePairs"
      type="secureLinkTypes:nameValuePair" minOccurs="0"
      maxOccurs="unbounded" />
      </sequence>
      </complexType>

      </wsdl>

      #----------------------------------------------
      #----------------------------------------------

      <fault message>


      <?kml version="1.0" encoding="utf-8"?>
      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <soapenv:Fault>
      <faultcode>
      soapenv:Server.userException
      </faultcode>
      <faultstring>org.xml.sax.SAXException:
      Invalid element in
      com.touchnet.secureLink.types.GenerateSecureLinkTicketRequest - aRequest
      </faultstring>
      <detail>
      <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">
      TNETREADY2
      </ns1:hostname>
      </detail>
      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>

      </fault message>
    • Show all 2 messages in this topic