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

working example: Open Patent Service - SOAP::Util overriding, stubmaker.pl use

Expand Messages
  • Mike
    I notice that the OpenPatentService client at http://tech.groups.yahoo.com/group/soaplite/message/6012 no longer works. Here is a new version, using the stub
    Message 1 of 1 , Apr 11 10:14 AM
    View Source
    • 0 Attachment
      I notice that the OpenPatentService client at
      http://tech.groups.yahoo.com/group/soaplite/message/6012
      no longer works.

      Here is a new version, using the stub supplied by
      stubmaker.pl and incorporating other improvements.

      The warning about overriding subroutines in Lite.pm
      can be removed as shown for the overriding of
      &SOAP::Util::encode_data()- but I don't want to
      fork it.

      As before, after the code is a base64 encoded section
      to reconstitute the code with necessary spacing.

      #!/usr/bin/perl -w
      # licensed under the Artistic License 2.0 or later versions
      # as published by the Perl Foundation (Yet Another Society)
      # http://www.perlfoundation.org/artistic_license_2_0
      # For the assistance of search engines:
      # ops Open Patent Services OpenPatentServices EPO
      # European Patent Office worldpatentdata getpatentdata
      BEGIN {

      # Note that we redefine the method &SOAP::Utils::encode_data()
      # and use the stub produced by stubmaker.pl with dashes repaired by hand

      use diagnostics;
      use strict;
      use warnings;
      no warnings 'redefine';

      # +trace => ['debug']
      eval " use SOAP::Lite; "; # worked on version 0.71 Apr 2008
      use warnings;

      package OpenPatentServicesService;

      # Generated by SOAP::Lite (v0.71) for Perl -- soaplite.com
      # Copyright (C) 2000-2006 Paul Kulchenko, Byrne Reese
      # -- generated at [Thu Apr 10 14:58:55 2008]
      # -- generated from
      http://ops.espacenet.com/OpenPatentServices/webService/getPatentData?wsdl
      my %methods = (
      getPatentData => {
      endpoint => 'http://ops.espacenet.com/OpenPatentServices/webService',
      soapaction => '',
      namespace => 'urn:EPO-OpenPatentServices',

      # namespace => 'urn:EPO-OpenPatentServices',
      parameters => [SOAP::Data->new(name => 'input_request', type =>
      'xsd:string', attr => {}),], # end parameters
      }, # end getPatentData
      getDocumentData => {
      endpoint => 'http://ops.espacenet.com/OpenPatentServices/webService',
      soapaction => '',
      namespace => 'urn:EPO-OpenPatentServices-documentData',
      parameters => [SOAP::Data->new(name => 'input_request', type =>
      'xsd:string', attr => {}),], # end parameters
      }, # end getDocumentData
      ); # end my %methods

      # use SOAP::Lite; # careful- this may have previously been overridden.
      use Exporter;
      use Carp ();

      use vars qw(@ISA $AUTOLOAD @EXPORT_OK %EXPORT_TAGS);
      @ISA = qw(Exporter SOAP::Lite);
      @EXPORT_OK = (keys %methods);
      %EXPORT_TAGS = ('all' => [@EXPORT_OK]);

      sub _call {
      my ($self, $method) = (shift, shift);
      my $name = UNIVERSAL::isa($method => 'SOAP::Data') ? $method->name :
      $method;
      my %method = %{$methods{$name}};
      $self->proxy($method{endpoint} || Carp::croak "No server address
      (proxy) specified")
      unless $self->proxy;
      my @templates = @{$method{parameters}};
      my @parameters = ();
      foreach my $param (@_) {
      if (@templates) {
      my $template = shift @templates;
      my ($prefix, $typename) = SOAP::Utils::splitqname($template->type);
      my $method = 'as_' . $typename;
      my $result = $self->serializer->$method($param, $template->name,
      $template->type, $template->attr);
      push(@parameters, $template->value($result->[2]));
      }
      else {
      push(@parameters, $param);
      }
      }
      $self->endpoint($method{endpoint})->ns($method{namespace})

      # ->ns($method{namespace})
      ->on_action(sub {qq!"$method{soapaction}"!});
      $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/",
      "wsdl");
      $self->serializer->register_ns("http://www.w3.org/2001/XMLSchema",
      "xsd");

      $self->serializer->register_ns("http://ops.espacenet.com/OpenPatentServices/webService/getPatentData?wsdl",
      "tns");

      $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/soap/",
      "soap");
      my $som = $self->SUPER::call($method => @parameters);
      if ($self->want_som) {
      return $som;
      }
      UNIVERSAL::isa($som => 'SOAP::SOM') ? wantarray ? $som->paramsall :
      $som->result : $som;
      }

      sub BEGIN {
      no strict 'refs';
      for my $method (qw(want_som)) {
      my $field = '_' . $method;
      *$method = sub {
      my $self = shift->new;
      @_ ? ($self->{$field} = shift, return $self) : return $self->{$field};
      }
      }
      }
      no strict 'refs';
      for my $method (@EXPORT_OK) {
      my %method = %{$methods{$method}};
      *$method = sub {
      my $self = UNIVERSAL::isa($_[0] => __PACKAGE__)
      ? ref $_[0]
      ? shift # OBJECT
      # CLASS, either get self or create new and assign to self
      : (shift->self || __PACKAGE__->self(__PACKAGE__->new))

      # function call, either get self or create new and assign to self
      : (__PACKAGE__->self || __PACKAGE__->self(__PACKAGE__->new));
      $self->_call($method, @_);
      }
      }

      sub AUTOLOAD {
      my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2);
      return if $method eq 'DESTROY' || $method eq 'want_som';
      die "Unrecognized method '$method'. List of available method(s):
      @EXPORT_OK\n";
      }

      package SOAP::Utils;
      my %encode_data = ('&' => '&', '>' => '>', '<' => '<',
      "\xd" => ' ', '"' => '"');

      no warnings 'redefine';

      eval( q! sub encode_data {
      my $e = $_[0];
      if ($e) {$e =~ s/([&<>"\015])/$encode_data{$1}/g; $e =~
      s/\]\]>/\]\]>/g;}
      $e;
      } !
      );

      use warnings;

      } # end of BEGIN

      # my $request = '\<OpenPatentServices
      ACTION=\"Family\"><WORLDPATENTDATA><FAMILY
      SEED=" EP 1006112A1" SEED_FORMAT="D"
      SEED_TYPE="PN" DESC_LNG="ENG"
      DATE_MIGR="00000000"
      LEGAL="NO"/></WORLDPATENTDATA></OpenPatentServices>';

      #use OpenPatentServicesService;
      #
      " EP 1006112A1"
      my $request
      = '<OpenPatentServices ACTION="Family"><WORLDPATENTDATA><FAMILY
      SEED=" EP 0688878A1" SEED_FORMAT="D" SEED_TYPE="PN" DESC_LNG="ENG"
      DATE_MIGR="99999999"
      LEGAL="YES"></FAMILY></WORLDPATENTDATA></OpenPatentServices>';

      #
      12345678901234567

      # behind a firewall, using a proxy ? It gets rather arcane.
      if (defined $ENV{http_proxy}) {$ENV{HTTP_proxy} = $ENV{http_proxy}}
      $SOAP::Constants::PREFIX_ENV = 'soapenv';
      print 'SOAP Lite version ', $SOAP::Lite::VERSION, "\n"; #tested on 0.69
      use MIME::Entity;
      use Data::Dumper;

      my $f = new OpenPatentServicesService;

      #$f->use_prefix(0);
      $f->ns('urn:EPO-OpenPatentServices', 'urn');
      $f->readable(1);
      $f->want_som(1);

      my $som = $f->getPatentData($request);

      # print Dumper($som);
      if ($som->fault) { # will be defined if Fault element is in the message
      print $som->faultstring; # returns value of 'detail' element as
      }
      else {
      print "no error for \$request = '$request'. \n"; # print
      $som->result, "\n";
      }

      foreach $request (
      '<OpenPatentServices ACTION="Biblio"><WORLDPATENTDATA><BIBLIO
      SEED="EP1000000" SEED_FORMAT="E"
      SEED_TYPE="PN"/></WORLDPATENTDATA></OpenPatentServices>',
      '<OpenPatentServices
      ACTION="FamilyAndLegalAndBiblio"><WORLDPATENTDATA><FAMILY SEED=" US
      5000063%%" SEED_FORMAT="D" SEED_TYPE="PN" DESC_LNG="ENG"
      DATE_MIGR="00000000"
      LEGAL="YES"/></WORLDPATENTDATA></OpenPatentServices>',

      #
      12345678901234567
      '<OpenPatentServices ACTION="Claims"><WORLDPATENTDATA><BIBLIO
      SEED="EP1000000" SEED_FORMAT="E"
      SEED_TYPE="PN"/></WORLDPATENTDATA></OpenPatentServices>',
      '<OpenPatentServices
      ACTION="DocumentInquiry"><WORLDPATENTDATA><INQUIRY SEED="EP1000000"
      SEED_FORMAT="E" SEED_TYPE="PN"/></WORLDPATENTDATA></OpenPatentServices>',
      )
      {
      my $som = $f->getPatentData($request);

      # print Dumper($som);
      if ($som->fault) { # will be defined if Fault element is in the
      message
      print $som->faultstring; # returns value of 'detail' element as
      }
      else {
      print "no error for \$request = '$request'. \n"; # print
      $som->result, "\n";
      }
      }

      $f->ns('urn:EPO-OpenPatentServices-documentData', 'urn');
      $request
      = '<OpenPatentServices
      ACTION="DocumentRetrieval"><WORLDPATENTDATA><DOCUMENT ID="EP
      1000000PAFP " SYSTEM="BNS" FORMAT="SINGLE_PAGE_TIFF"
      PAGE_NUMBER="1"/></WORLDPATENTDATA></OpenPatentServices>';
      $som = $f->getDocumentData( $request );
      if ($som->fault) { # will be
      defined if Fault element is in the message
      print $som->faultstring; # returns
      value of 'detail' element
      }
      else {
      my $mime_entity = ${$som->parts}[0];
      my $body = $mime_entity->bodyhandle;
      open(OUT, '>1.tif') or die "whoops $!";

      #open ( OUT , '>1.pdf' ) or die "whoops $!" ;
      binmode(OUT);
      print OUT $body->as_string;
      close OUT;
      print "no error with Document Retrieval; check file system for output
      '1.tif'.\n";
      }



      #http://www.motobit.com/util/base64-decoder-encoder.asp




      IyEvdXNyL2Jpbi9wZXJsIC13DQojIGxpY2Vuc2VkIHVuZGVyIHRoZSBBcnRpc3RpYyBMaWNlbnNl
      IDIuMCBvciBsYXRlciB2ZXJzaW9ucw0KIyBhcyBwdWJsaXNoZWQgYnkgdGhlIFBlcmwgRm91bmRh
      dGlvbiAoWWV0IEFub3RoZXIgU29jaWV0eSkNCiMgaHR0cDovL3d3dy5wZXJsZm91bmRhdGlvbi5v
      cmcvYXJ0aXN0aWNfbGljZW5zZV8yXzANCiMgRm9yIHRoZSBhc3Npc3RhbmNlIG9mIHNlYXJjaCBl
      bmdpbmVzOg0KIyBvcHMgT3BlbiBQYXRlbnQgU2VydmljZXMgT3BlblBhdGVudFNlcnZpY2VzIEVQ
      TyANCiMgRXVyb3BlYW4gUGF0ZW50IE9mZmljZSB3b3JsZHBhdGVudGRhdGEgZ2V0cGF0ZW50ZGF0
      YQ0KQkVHSU4gew0KDQoJIyBOb3RlIHRoYXQgd2UgcmVkZWZpbmUgdGhlIG1ldGhvZCAmU09BUDo6
      VXRpbHM6OmVuY29kZV9kYXRhKCkNCgkjIGFuZCB1c2UgdGhlIHN0dWIgcHJvZHVjZWQgYnkgc3R1
      Ym1ha2VyLnBsIHdpdGggZGFzaGVzIHJlcGFpcmVkIGJ5IGhhbmQNCg0KCXVzZSBkaWFnbm9zdGlj
      czsNCgl1c2Ugc3RyaWN0Ow0KCXVzZSB3YXJuaW5nczsNCglubyB3YXJuaW5ncyAncmVkZWZpbmUn
      Ow0KDQoJIyAgICAgICAgICAgICAgICAgICAgICt0cmFjZSA9PiBbJ2RlYnVnJ10NCglldmFsICIg
      dXNlIFNPQVA6OkxpdGU7ICI7ICAjIHdvcmtlZCBvbiB2ZXJzaW9uIDAuNzEgQXByIDIwMDgNCgl1
      c2Ugd2FybmluZ3M7DQoNCglwYWNrYWdlIE9wZW5QYXRlbnRTZXJ2aWNlc1NlcnZpY2U7DQoNCgkj
      IEdlbmVyYXRlZCBieSBTT0FQOjpMaXRlICh2MC43MSkgZm9yIFBlcmwgLS0gc29hcGxpdGUuY29t
      DQoJIyBDb3B5cmlnaHQgKEMpIDIwMDAtMjAwNiBQYXVsIEt1bGNoZW5rbywgQnlybmUgUmVlc2UN
      CgkjIC0tIGdlbmVyYXRlZCBhdCBbVGh1IEFwciAxMCAxNDo1ODo1NSAyMDA4XQ0KCSMgLS0gZ2Vu
      ZXJhdGVkIGZyb20gaHR0cDovL29wcy5lc3BhY2VuZXQuY29tL09wZW5QYXRlbnRTZXJ2aWNlcy93
      ZWJTZXJ2aWNlL2dldFBhdGVudERhdGE/d3NkbA0KCW15ICVtZXRob2RzID0gKA0KCQlnZXRQYXRl
      bnREYXRhID0+IHsNCgkJCWVuZHBvaW50ICAgPT4gJ2h0dHA6Ly9vcHMuZXNwYWNlbmV0LmNvbS9P
      cGVuUGF0ZW50U2VydmljZXMvd2ViU2VydmljZScsDQoJCQlzb2FwYWN0aW9uID0+ICcnLA0KCQkJ
      bmFtZXNwYWNlICA9PiAndXJuOkVQTy1PcGVuUGF0ZW50U2VydmljZXMnLA0KDQoJCQkjICAgIG5h
      bWVzcGFjZSA9PiAndXJuOkVQTy1PcGVuUGF0ZW50U2VydmljZXMnLA0KCQkJcGFyYW1ldGVycyA9
      PiBbU09BUDo6RGF0YS0+bmV3KG5hbWUgPT4gJ2lucHV0X3JlcXVlc3QnLCB0eXBlID0+ICd4c2Q6
      c3RyaW5nJywgYXR0ciA9PiB7fSksXSwgICAgIyBlbmQgcGFyYW1ldGVycw0KCQl9LCAgICAjIGVu
      ZCBnZXRQYXRlbnREYXRhDQoJCWdldERvY3VtZW50RGF0YSA9PiB7DQoJCQllbmRwb2ludCAgID0+
      ICdodHRwOi8vb3BzLmVzcGFjZW5ldC5jb20vT3BlblBhdGVudFNlcnZpY2VzL3dlYlNlcnZpY2Un
      LA0KCQkJc29hcGFjdGlvbiA9PiAnJywNCgkJCW5hbWVzcGFjZSAgPT4gJ3VybjpFUE8tT3BlblBh
      dGVudFNlcnZpY2VzLWRvY3VtZW50RGF0YScsDQoJCQlwYXJhbWV0ZXJzID0+IFtTT0FQOjpEYXRh
      LT5uZXcobmFtZSA9PiAnaW5wdXRfcmVxdWVzdCcsIHR5cGUgPT4gJ3hzZDpzdHJpbmcnLCBhdHRy
      ID0+IHt9KSxdLCAgICAjIGVuZCBwYXJhbWV0ZXJzDQoJCX0sICAgICMgZW5kIGdldERvY3VtZW50
      RGF0YQ0KCSk7ICAgICAgICAjIGVuZCBteSAlbWV0aG9kcw0KDQoJIyB1c2UgU09BUDo6TGl0ZTsg
      ICMgY2FyZWZ1bC0gdGhpcyBtYXkgaGF2ZSBwcmV2aW91c2x5IGJlZW4gb3ZlcnJpZGRlbi4NCgl1
      c2UgRXhwb3J0ZXI7DQoJdXNlIENhcnAgKCk7DQoNCgl1c2UgdmFycyBxdyhASVNBICRBVVRPTE9B
      RCBARVhQT1JUX09LICVFWFBPUlRfVEFHUyk7DQoJQElTQSAgICAgICAgID0gcXcoRXhwb3J0ZXIg
      U09BUDo6TGl0ZSk7DQoJQEVYUE9SVF9PSyAgID0gKGtleXMgJW1ldGhvZHMpOw0KCSVFWFBPUlRf
      VEFHUyA9ICgnYWxsJyA9PiBbQEVYUE9SVF9PS10pOw0KDQoJc3ViIF9jYWxsIHsNCgkJbXkgKCRz
      ZWxmLCAkbWV0aG9kKSA9IChzaGlmdCwgc2hpZnQpOw0KCQlteSAkbmFtZSA9IFVOSVZFUlNBTDo6
      aXNhKCRtZXRob2Qg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ucygkbWV0aG9ke25hbWVzcGFjZX0pDQoJCQkt
      Pm9uX2FjdGlvbihzdWIge3FxISIkbWV0aG9ke3NvYXBhY3Rpb259IiF9KTsNCgkJJHNlbGYtPnNl
      cmlhbGl6ZXItPnJlZ2lzdGVyX25zKCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93c2RsLyIs
      ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIndzZGwiKTsNCgkJJHNl
      bGYtPnNlcmlhbGl6ZXItPnJlZ2lzdGVyX25zKCJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNj
      aGVtYSIsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgInhzZCIpOw0K
      CQkkc2VsZi0+c2VyaWFsaXplci0+cmVnaXN0ZXJfbnMoImh0dHA6Ly9vcHMuZXNwYWNlbmV0LmNv
      bS9PcGVuUGF0ZW50U2VydmljZXMvd2ViU2VydmljZS9nZXRQYXRlbnREYXRhP3dzZGwiLCAidG5z
      Iik7DQoJCSRzZWxmLT5zZXJpYWxpemVyLT5yZWdpc3Rlcl9ucygiaHR0cDovL3NjaGVtYXMueG1s
      c29hcC5vcmcvd3NkbC9zb2FwLyIsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
      ICJzb2FwIik7DQoJCW15ICRzb20gPSAkc2VsZi0+U1VQRVI6OmNhbGwoJG1ldGhvZCA9PiBAcGFy
      YW1ldGVycyk7DQoJCWlmICgkc2VsZi0+d2FudF9zb20pIHsNCgkJCXJldHVybiAkc29tOw0KCQl9
      DQoJCVVOSVZFUlNBTDo6aXNhKCRzb20gPT4gJ1NPQVA6OlNPTScpID8gd2FudGFycmF5ID8gJHNv
      bS0+cGFyYW1zYWxsIDogJHNvbS0+cmVzdWx0IDogJHNvbTsNCgl9DQoNCglzdWIgQkVHSU4gew0K
      CQlubyBzdHJpY3QgJ3JlZnMnOw0KCQlmb3IgbXkgJG1ldGhvZCAoc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1b3Q7Tk8mcXVvdDsvJmd0
      OyZsdDsvV09STERQQVRFTlREQVRBJmd0OyZsdDsvT3BlblBhdGVudFNlcnZpY2VzJmd0Oyc7DQoN
      CiN1c2UgT3BlblBhdGVudFNlcnZpY2VzU2VydmljZTsNCiMgICAgICAgICAgICAgICAgICAgICAg
      ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnF1b3Q7IEVQICAg
      ICAxMDA2MTEyQTEmcXVvdDsNCm15ICRyZXF1ZXN0DQoJPSAnPE9wZW5QYXRlbnRTZXJ2aWNlcyBB
      Q1RJT049IkZhbWlseSI+PFdPUkxEUEFURU5UREFUQT48RkFNSUxZIFNFRUQ9IiBFUCAgICAgMDY4
      ODg3OEExIiBTRUVEX0ZPUk1BVD0iRCIgU0VFRF9UWVBFPSJQTiIgREVTQ19MTkc9IkVORyIgREFU
      RV9NSUdSPSI5OTk5OTk5OSIgTEVHQUw9IllFUyI+PC9GQU1JTFk+PC9XT1JMRFBBVEVOVERBVEE+
      PC9PcGVuUGF0ZW50U2VydmljZXM+JzsNCg0KIyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
      ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjM0NTY3ODkwMTIz
      NDU2Nw0KDQojIGJlaGluZCBhIGZpcmV3YWxsLCB1c2luZyBhIHByb3h5ID8gIEl0IGdldHMgcmF0
      aGVyIGFyY2FuZS4gDQppZiAoZGVmaW5lZCAkRU5We2h0dHBfcHJveHl9KSB7JEVOVntIVFRQX3By
      b3h5fSA9ICRFTlZ7aHR0cF9wcm94eX19DQokU09BUDo6Q29uc3RhbnRzOjpQUkVGSVhfRU5WID0g
      J3NvYXBlbnYnOw0KcHJpbnQgJ1NPQVAgTGl0ZSB2ZXJzaW9uICcsICRTT0FQOjpMaXRlOjpWRVJT
      SU9OLCAiXG4iOyAgICAjdGVzdGVkIG9uIDAuNjkNCnVzZSBNSU1FOjpFbnRpdHk7DQp1c2UgRGF0
      YTo6RHVtcGVyOw0KDQpteSAkZiA9IG5ldyBPcGVuUGF0ZW50U2VydmljZXNTZXJ2aWNlOw0KDQoj
      JGYtPnVzZV9wcmVmaXgoMCk7DQokZi0+bnMoJ3VybjpFUE8tT3BlblBhdGVudFNlcnZpY2VzJywg
      J3VybicpOw0KJGYtPnJlYWRhYmxlKDEpOw0KJGYtPndhbnRfc29tKDEpOw0KDQpteSAkc29tID0g
      JGYtPmdldFBhdGVudERhdGEoJHJlcXVlc3QpOw0KDQojIHByaW50IER1bXBlcigkc29tKTsNCmlm
      ICgkc29tLT5mYXVsdCkgeyAgICAjIHdpbGwgYmUgZGVmaW5lZCBpZiBGYXVsdCBlbGVtZW50IGlz
      IGluIHRoZSBtZXNzYWdlDQoJcHJpbnQgJHNvbS0+ZmF1bHRzdHJpbmc7ICAgICMgcmV0dXJucyB2
      YWx1ZSBvZiAnZGV0YWlsJyBlbGVtZW50IGFzDQp9DQplbHNlIHsNCglwcmludCAibm8gZXJyb3Ig
      Zm9yIFwkcmVxdWVzdCA9ICckcmVxdWVzdCcuIFxuIjsgICAgIyBwcmludCAkc29tLT5yZXN1bHQs
      ICJcbiI7DQp9DQoNCmZvcmVhY2ggJHJlcXVlc3QgKA0KCSc8T3BlblBhdGVudFNlcnZpY2VzIEFD
      VElPTj0iQmlibGlvIj48V09STERQQVRFTlREQVRBPjxCSUJMSU8gU0VFRD0iRVAxMDAwMDAwIiBT
      RUVEX0ZPUk1BVD0iRSIgU0VFRF9UWVBFPSJQTiIvPjwvV09STERQQVRFTlREQVRBPjwvT3BlblBh
      dGVudFNlcnZpY2VzPicsDQoJJzxPcGVuUGF0ZW50U2VydmljZXMgQUNUSU9OPSJGYW1pbHlBbmRM
      ZWdhbEFuZEJpYmxpbyI+PFdPUkxEUEFURU5UREFUQT48RkFNSUxZIFNFRUQ9IiBVUyAgICAgNTAw
      MDA2MyUlIiBTRUVEX0ZPUk1BVD0iRCIgU0VFRF9UWVBFPSJQTiIgREVTQ19MTkc9IkVORyIgREFU
      RV9NSUdSPSIwMDAwMDAwMCIgTEVHQUw9IllFUyIvPjwvV09STERQQVRFTlREQVRBPjwvT3BlblBh
      dGVudFNlcnZpY2VzPicsDQoNCgkjICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
      ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIzNDU2Nzg5
      MDEyMzQ1NjcNCgknPE9wZW5QYXRlbnRTZXJ2aWNlcyBBQ1RJT049IkNsYWltcyI+PFdPUkxEUEFU
      RU5UREFUQT48QklCTElPIFNFRUQ9IkVQMTAwMDAwMCIgU0VFRF9GT1JNQVQ9IkUiIFNFRURfVFlQ
      RT0iUE4iLz48L1dPUkxEUEFURU5UREFUQT48L09wZW5QYXRlbnRTZXJ2aWNlcz4nLA0KCSc8T3Bl
      blBhdGVudFNlcnZpY2VzIEFDVElPTj0iRG9jdW1lbnRJbnF1aXJ5Ij48V09STERQQVRFTlREQVRB
      PjxJTlFVSVJZIFNFRUQ9IkVQMTAwMDAwMCIgU0VFRF9GT1JNQVQ9IkUiIFNFRURfVFlQRT0iUE4i
      Lz48L1dPUkxEUEFURU5UREFUQT48L09wZW5QYXRlbnRTZXJ2aWNlcz4nLA0KCSkNCnsNCglteSAk
      c29tID0gJGYtPmdldFBhdGVudERhdGEoJHJlcXVlc3QpOw0KDQoJIyBwcmludCBEdW1wZXIoJHNv
      bSk7DQoJaWYgKCRzb20tPmZhdWx0KSB7ICAgICMgd2lsbCBiZSBkZWZpbmVkIGlmIEZhdWx0IGVs
      ZW1lbnQgaXMgaW4gdGhlIG1lc3NhZ2UNCgkJcHJpbnQgJHNvbS0+ZmF1bHRzdHJpbmc7ICAgICMg
      cmV0dXJucyB2YWx1ZSBvZiAnZGV0YWlsJyBlbGVtZW50IGFzDQoJfQ0KCWVsc2Ugew0KCQlwcmlu
      dCAibm8gZXJyb3IgZm9yIFwkcmVxdWVzdCA9ICckcmVxdWVzdCcuIFxuIjsgICAgIyBwcmludCAk
      c29tLT5yZXN1bHQsICJcbiI7DQoJfQ0KfQ0KDQokZi0+bnMoJ3VybjpFUE8tT3BlblBhdGVudFNl
      cnZpY2VzLWRvY3VtZW50RGF0YScsICd1cm4nKTsNCiRyZXF1ZXN0DQoJPSAnPE9wZW5QYXRlbnRT
      ZXJ2aWNlcyBBQ1RJT049IkRvY3VtZW50UmV0cmlldmFsIj48V09STERQQVRFTlREQVRBPjxET0NV
      TUVOVCBJRD0iRVAgICAxMDAwMDAwUEFGUCAiIFNZU1RFTT0iQk5TIiBGT1JNQVQ9IlNJTkdMRV9Q
      QUdFX1RJRkYiIFBBR0VfTlVNQkVSPSIxIi8+PC9XT1JMRFBBVEVOVERBVEE+PC9PcGVuUGF0ZW50
      U2VydmljZXM+JzsNCiRzb20gPSAkZi0+Z2V0RG9jdW1lbnREYXRhKCAkcmVxdWVzdCApOw0KaWYg
      KCRzb20tPmZhdWx0KSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
      IyB3aWxsIGJlIGRlZmluZWQgaWYgRmF1bHQgZWxlbWVudCBpcyBpbiB0aGUgbWVzc2FnZQ0KCXBy
      aW50ICRzb20tPmZhdWx0c3RyaW5nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBy
      ZXR1cm5zIHZhbHVlIG9mICdkZXRhaWwnIGVsZW1lbnQNCn0NCmVsc2Ugew0KCW15ICRtaW1lX2Vu
      dGl0eSA9ICR7JHNvbS0+cGFydHN9WzBdOw0KCW15ICRib2R5ICAgICAgICA9ICRtaW1lX2VudGl0
      eS0+Ym9keWhhbmRsZTsNCglvcGVuKE9VVCwgJz4xLnRpZicpIG9yIGRpZSAid2hvb3BzICQhIjsN
      Cg0KCSNvcGVuICggT1VUICwgJz4xLnBkZicgKSBvciBkaWUgIndob29wcyAkISIgOw0KCWJpbm1v
      ZGUoT1VUKTsNCglwcmludCBPVVQgJGJvZHktPmFzX3N0cmluZzsNCgljbG9zZSBPVVQ7DQoJcHJp
      bnQgIm5vIGVycm9yIHdpdGggRG9jdW1lbnQgUmV0cmlldmFsOyBjaGVjayBmaWxlIHN5c3RlbSBm
      b3Igb3V0cHV0ICcxLnRpZicuXG4iOyAgICANCn0NCg0K
    Your message has been successfully submitted and would be delivered to recipients shortly.