Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Re: SOAP Client

by Hammy (Scribe)
on Apr 14, 2004 at 03:09 UTC ( #344916=note: print w/replies, xml ) Need Help??

in reply to Re: SOAP Client
in thread SOAP Client

Thank you very much for the detailed write up. I am going to do what you did to see what happened in translation and try a few things. Thanks for obscuring my key, it was only a demo given out to me so I can test the service. I do believe I am closer than I was before because I did not know anything about the trace prior. Again thanks for your effort and my education.

Replies are listed 'Best First'.
Re: Re: Re: SOAP Client
by rob_au (Abbot) on Apr 14, 2004 at 03:14 UTC
    Just as a follow-up, I continued to play with SOAP::Data::Builder to see if I could build a successful request - To this end, I have the following code:
    #!/opt/bin/perl use SOAP::Data::Builder; use SOAP::Lite +trace; my $builder = SOAP::Data::Builder->new; $builder->add_elem( 'name' => 'parameters' ); $builder->add_elem( 'name' => 'CustID', 'parent' => $builder->get_elem('parameters'), 'value' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ); $builder->add_elem( 'name' => 'Data', 'parent' => $builder->get_elem('parameters'), 'value' => 'Testing' ); my $result = SOAP::Lite ->service(' +dl') ->Encrypt( $builder->to_soap_data ); print $result, "\n";
    ... which produces the following well-formed request ...
    Accept: text/xml Accept: multipart/* Content-Length: 558 Content-Type: text/xml; charset=utf-8 SOAPAction: " +/Encrypt" <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-EN +C="" SOAP-ENV:encodingStyle= +"" xmlns:SOAP-ENV="http://sc" xmlns:xsi=" +MLSchema-instance" xmlns:xsd=""><SOAP +-ENV:Body><Encrypt xmlns=""><parameters><CustID xsi:type="xsd:string" +>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</CustID><Data xsi:type="xsd:string" +>Testing</Data></parameters></Encrypt></SOAP-ENV:Body></SOAP-ENV:Enve +lope>
    However, whilst I haven't achieved a successful result, I have been able to build a well-formed SOAP request to dispatch to the service. If you can get a copy of a successful request generated by other means, it may be worth playing with SOAP::Data::Builder further to fashion a successful perl client.


    perl -le "print unpack'N', pack'B32', '00000000000000000000001011001111'"

      Just to put to bed a mystery, I did solve this one. Well, I did not actually solve this one, but a Java programmer who wrote the service found it. Anyway here is the code.
      use SOAP::Lite; my $s = SOAP::Lite -> uri(' +ervice') ->proxy(' +ncryptionService.asmx') -> on_action(sub{sprintf '%s/%s', @_ }); my $custID = SOAP::Data->name('CustID' => "$cust_id")->type('strin +g')->uri('') +; my $data = SOAP::Data->name('EncryptedData' => "$es")->type('strin +g')->uri('') +; $result = $s->Decrypt($custID, $data)->result;
      I do not necessarily understand the differences between all my iterations and this one, but it works which was my main concern. ES and client ID are now passed in. I still do not know why +trace never worked for me. I never saw anthing on the screen. Anytime there is an error I write it to a file and I found all kinds of garbage in there dealing with my attempts. Thanks for your help.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://344916]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2020-08-15 14:06 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (78 votes). Check out past polls.