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

Soap Lite Envelope/Header/Data Modification

Expand Messages
  • matt_germonprez
    Just a follow-up for anyone that has been following this conversation and thanks to the people who have helped me. The service is still not working but I
    Message 1 of 1 , Nov 22, 2005
    • 0 Attachment
      Just a follow-up for anyone that has been following this conversation
      and 'thanks' to the people who have helped me. The service is still
      not working but I don't think it has anything to do with what is being
      sent. I'm working with the spell check people on this. Any here is my
      perl code (and resultant SOAP) that:

      (1) Modifies the <Envelope>
      (2) Produces complex type data tags
      (3) Modifies SoapAction header
      (4) Creates complex type <header>


      Thanks again,
      matt

      #############################################

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

      $text = 'qwick brown fox is a good guy';

      my $som=SOAP::Lite
      ->service('http://ws.strikeiron.com/wsdirect/spellchecker?WSDL');
      ->proxy('http://ws.strikeiron.com/wsdirect/spellchecker/SpellerServiceService')
      ->uri('http://ws.strikeiron.com/')
      #->proxy('http://www.wsdirect.net/axis/services/spellcheckerdoc')
      ->on_action(sub{sprintf '""' });

      $som->serializer()->register_ns('http://ws.strikeiron.com', 's1');

      $header = SOAP::Header
      ->name("LicenseInfo"=>\SOAP::Data->value(

      SOAP::Data->name("RegisteredUser"=>\SOAP::Data->value(
      SOAP::Data->name("UserID"=>'ECB9F')))));
      #SOAP::Data->name("Password"=>"")))));

      $somspell = $som
      ->GetMisspelledIndices( $header,
      SOAP::Data->name("key"=>'ECB9F'),
      SOAP::Data->name("text"=>$text),
      SOAP::Data->name("dicCode"=>'32'));

      #######################################################


      <?xml version="1.0" encoding="UTF-8"?>
      <soap:Envelope
      soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:s1="http://ws.strikeiron.com"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Header><LicenseInfo><RegisteredUser>
      <UserID xsi:type="xsd:string">ECB9F47FC1C0BEA92B8D</UserID>
      </RegisteredUser></LicenseInfo></soap:Header>
      <soap:Body>
      <namesp1:GetMisspelledIndices xmlns:namesp1="http://ws.strikeiron.com/">
      <key xsi:type="xsd:string">ECB9F47FC1C0BEA92B8D</key>
      <text xsi:type="xsd:string">qwick brown fox is a good guy</text>
      <dicCode xsi:type="xsd:int">32</dicCode>
      </namesp1:GetMisspelledIndices></soap:Body></soap:Envelope>
    Your message has been successfully submitted and would be delivered to recipients shortly.