Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

soaplite · SOAP::Lite for Perl (soaplite.com)

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 1205
  • Category: Protocols
  • Founded: Jan 28, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 6385 - 6414 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#6385 From: Wes Malone <wesdmalone@...>
Date: Mon Nov 9, 2009 12:46 am
Subject: Why does Soap::Lite stop parsing this response?
wesdmalone@...
Send Email Send Email
 
I'm trying to write a simple SOAP client.  After making a request, the
response only seems to be parsed into perl data structure a couple
levels down.  After that it's just a string of the remaining XML. I
feel like it would be really kludgy to take that string and parse it
manually with another XML parser.

>     my $response = $soap->getVersionInfo;
>     my $data = $response->dataof('//getVersionInfoResponse');


The SOAP response looks like this in the trace:

>     <?xml version='1.0' encoding='utf-8'?>
>     <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>       <soapenv:Body>
>         <ns:getVersionInfoResponse
xmlns:ns="http://webservice.jchem.chemaxon">
>           <ns:return>
>             <Info>
>               <JChem>
>                 <Version>5.2.1</Version>
>               </JChem>
>               <Java>
>                 <Vendor>Sun Microsystems Inc.</Vendor>
>                 <VmName>Java HotSpot(TM) Server VM</VmName>
>                 <Version>1.6.0_06</Version>
>               </Java>
>               <Os>
>                 <Arch>x86</Arch>
>                 <Name>Windows XP</Name>
>                 <Version>5.1</Version>
>               </Os>
>             </Info>
>           </ns:return>
>         </ns:getVersionInfoResponse>
>       </soapenv:Body>
>     </soapenv:Envelope>

But what gets parsed into $data looks like this:

>     \bless( {
>         _attr => {},
>         _name => "getVersionInfoResponse",
>         _prefix => "ns",
>         _signature => [],
>         _uri => "http://webservice.jchem.chemaxon",
>         _value => [
>           {
>             return =>
"<Info>\n<JChem>\n<Version>5.2.6</Version>\n</JChem>\n<Java>\n<Vendor>Sun
Microsystems Inc.</Vendor>\n<VmName>Java HotSpot(TM) Client
VM</VmName>\n<Version>1.6.0_05</Version>\n</Java>\n<Os>\n<Arch>x86</Arch>\n<Name\
>Windows XP</Name>\n<Version>5.1</Version>\n</Os>\n</Info>\n"
>           }
>         ]
>       }, 'SOAP::Data' )

This is a simple example, but for more complex responses, it could
become a huge hassle to have to parse out that XML.

I found this post
(http://tech.groups.yahoo.com/group/soaplite/message/2641) on the
mailing list (from 2003!) that had a worrisome quote on it:

>  Keep in mind the requirement that any
>  attributes not natively known to SOAP
>  must be namespace-qualified.

And I noticed that everything that wasn't getting parsed was not
namespaced.  Is there a way to force SOAP::Lite to parse that
non-namespaced xml?  Is that even the problem?

Thanks,
Wes

#6386 From: "Martin Busik" <martin.busik@...>
Date: Mon Nov 9, 2009 8:55 pm
Subject: AW: Why does Soap::Lite stop parsing this response?
mbusik70
Send Email Send Email
 
Hi,
which SOAP::Lite Version are you using?

I've tried your example with 0.69 as well as with 0.710.10.

The result of the 0.69 differs from the result of 0.710.10, but also differs
from your code.
(The difference between 0.69 and 0.710.10 is, that in 0.710.10 there is an
instance of SOAP::Data for
every xml element returned, i.e. for JChem, Os, Java etc, where the 0.69
returned just getVersionInfoResponse as
a SOAP::Data instance)

Cheers,
Martin


> -----Ursprüngliche Nachricht-----
> Von: soaplite@yahoogroups.com
> [mailto:soaplite@yahoogroups.com] Im Auftrag von Wes Malone
> Gesendet: Montag, 9. November 2009 01:47
> An: soaplite@yahoogroups.com
> Betreff: [soaplite] Why does Soap::Lite stop parsing this response?
>
> I'm trying to write a simple SOAP client.  After making a request, the
> response only seems to be parsed into perl data structure a couple
> levels down.  After that it's just a string of the remaining XML. I
> feel like it would be really kludgy to take that string and parse it
> manually with another XML parser.
>
> >     my $response = $soap->getVersionInfo;
> >     my $data = $response->dataof('//getVersionInfoResponse');
>
>
> The SOAP response looks like this in the trace:
>
> >     <?xml version='1.0' encoding='utf-8'?>
> >     <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> >       <soapenv:Body>
> >         <ns:getVersionInfoResponse
> xmlns:ns="http://webservice.jchem.chemaxon">
> >           <ns:return>
> >             <Info>
> >               <JChem>
> >                 <Version>5.2.1</Version>
> >               </JChem>
> >               <Java>
> >                 <Vendor>Sun Microsystems Inc.</Vendor>
> >                 <VmName>Java HotSpot(TM) Server VM</VmName>
> >                 <Version>1.6.0_06</Version>
> >               </Java>
> >               <Os>
> >                 <Arch>x86</Arch>
> >                 <Name>Windows XP</Name>
> >                 <Version>5.1</Version>
> >               </Os>
> >             </Info>
> >           </ns:return>
> >         </ns:getVersionInfoResponse>
> >       </soapenv:Body>
> >     </soapenv:Envelope>
>
> But what gets parsed into $data looks like this:
>
> >     \bless( {
> >         _attr => {},
> >         _name => "getVersionInfoResponse",
> >         _prefix => "ns",
> >         _signature => [],
> >         _uri => "http://webservice.jchem.chemaxon",
> >         _value => [
> >           {
> >             return =>
> "<Info>\n<JChem>\n<Version>5.2.6</Version>\n</JChem>\n<Java>\n
> <Vendor>Sun Microsystems Inc.</Vendor>\n<VmName>Java
> HotSpot(TM) Client
> VM</VmName>\n<Version>1.6.0_05</Version>\n</Java>\n<Os>\n<Arch
> >x86</Arch>\n<Name>Windows
> XP</Name>\n<Version>5.1</Version>\n</Os>\n</Info>\n"
> >           }
> >         ]
> >       }, 'SOAP::Data' )
>
> This is a simple example, but for more complex responses, it could
> become a huge hassle to have to parse out that XML.
>
> I found this post
> (http://tech.groups.yahoo.com/group/soaplite/message/2641) on the
> mailing list (from 2003!) that had a worrisome quote on it:
>
> >  Keep in mind the requirement that any
> >  attributes not natively known to SOAP
> >  must be namespace-qualified.
>
> And I noticed that everything that wasn't getting parsed was not
> namespaced.  Is there a way to force SOAP::Lite to parse that
> non-namespaced xml?  Is that even the problem?
>
> Thanks,
> Wes
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>

#6387 From: Wes Malone <wesdmalone@...>
Date: Tue Nov 10, 2009 1:24 am
Subject: Re: Why does Soap::Lite stop parsing this response?
wesdmalone@...
Send Email Send Email
 
It turns out SOAP::Lite was Doing The Right Thing. I'd overlooked a
note in the service docs that that said

>Note: The special characters inside <ns:return> tag are encoded to entities.
(e.g. an xml return >value will contain < characters, which will be encoded to
< entities) Therefore entity decoding >is needed on the client side.

What I thought was just a trace output inconsistency was actually the
problem. SOAP::Lite being nice and unescaping the entities before they
ended up in the Dumper confused me as well. I originally included the
documentation's example because it was already formatted nicely.
Here's the actual output:
>
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <ns:getVersionInfoResponse xmlns:ns="http://webservice.jchem.chemaxon">
>          <ns:return>
>             <Info>
>             <JChem>
>             <Version>5.2.6</Version>
>             </JChem>
>             <Java>
>             <Vendor>Sun Microsystems Inc.</Vendor>
>             <VmName>Java HotSpot(TM) Client VM</VmName>
>             <Version>1.6.0_05</Version>
>             </Java>
>             <Os>
>             <Arch>x86</Arch>
>             <Name>Windows XP</Name>
>             <Version>5.1</Version>
>             </Os>
>             </Info>
>          </ns:return>
>       </ns:getVersionInfoResponse>
>    </soapenv:Body>
> </soapenv:Envelope>

Plus, everyone knows < is the same as <, right? Right? ;_;

As of now I'm parsing the string with XML::LibXML, so the question
still stands. Can I force SOAP::Lite to parse that interior XML
string, even though it's been escaped?

FWIW, I'm on version 0.710.08, the newest in the Win32-Trouchelle repo.

Thanks again,
Wes

On Mon, Nov 9, 2009 at 2:55 PM, Martin Busik <martin.busik@...> wrote:
>
> Hi,
> which SOAP::Lite Version are you using?
>
> I've tried your example with 0.69 as well as with 0.710.10.
>
> The result of the 0.69 differs from the result of 0.710.10, but also differs
> from your code.
> (The difference between 0.69 and 0.710.10 is, that in 0.710.10 there is an
> instance of SOAP::Data for
> every xml element returned, i.e. for JChem, Os, Java etc, where the 0.69
> returned just getVersionInfoResponse as
> a SOAP::Data instance)
>
> Cheers,
> Martin
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: soaplite@yahoogroups.com
> > [mailto:soaplite@yahoogroups.com] Im Auftrag von Wes Malone
> > Gesendet: Montag, 9. November 2009 01:47
> > An: soaplite@yahoogroups.com
> > Betreff: [soaplite] Why does Soap::Lite stop parsing this response?
> >
> > I'm trying to write a simple SOAP client.  After making a request, the
> > response only seems to be parsed into perl data structure a couple
> > levels down.  After that it's just a string of the remaining XML. I
> > feel like it would be really kludgy to take that string and parse it
> > manually with another XML parser.
> >
> > >     my $response = $soap->getVersionInfo;
> > >     my $data = $response->dataof('//getVersionInfoResponse');
> >
> >
> > The SOAP response looks like this in the trace:
> >
> > >     <?xml version='1.0' encoding='utf-8'?>
> > >     <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> > >       <soapenv:Body>
> > >         <ns:getVersionInfoResponse
> > xmlns:ns="http://webservice.jchem.chemaxon">
> > >           <ns:return>
> > >             <Info>
> > >               <JChem>
> > >                 <Version>5.2.1</Version>
> > >               </JChem>
> > >               <Java>
> > >                 <Vendor>Sun Microsystems Inc.</Vendor>
> > >                 <VmName>Java HotSpot(TM) Server VM</VmName>
> > >                 <Version>1.6.0_06</Version>
> > >               </Java>
> > >               <Os>
> > >                 <Arch>x86</Arch>
> > >                 <Name>Windows XP</Name>
> > >                 <Version>5.1</Version>
> > >               </Os>
> > >             </Info>
> > >           </ns:return>
> > >         </ns:getVersionInfoResponse>
> > >       </soapenv:Body>
> > >     </soapenv:Envelope>
> >
> > But what gets parsed into $data looks like this:
> >
> > >     \bless( {
> > >         _attr => {},
> > >         _name => "getVersionInfoResponse",
> > >         _prefix => "ns",
> > >         _signature => [],
> > >         _uri => "http://webservice.jchem.chemaxon",
> > >         _value => [
> > >           {
> > >             return =>
> > "<Info>\n<JChem>\n<Version>5.2.6</Version>\n</JChem>\n<Java>\n
> > <Vendor>Sun Microsystems Inc.</Vendor>\n<VmName>Java
> > HotSpot(TM) Client
> > VM</VmName>\n<Version>1.6.0_05</Version>\n</Java>\n<Os>\n<Arch
> > >x86</Arch>\n<Name>Windows
> > XP</Name>\n<Version>5.1</Version>\n</Os>\n</Info>\n"
> > >           }
> > >         ]
> > >       }, 'SOAP::Data' )
> >
> > This is a simple example, but for more complex responses, it could
> > become a huge hassle to have to parse out that XML.
> >
> > I found this post
> > (http://tech.groups.yahoo.com/group/soaplite/message/2641) on the
> > mailing list (from 2003!) that had a worrisome quote on it:
> >
> > >  Keep in mind the requirement that any
> > >  attributes not natively known to SOAP
> > >  must be namespace-qualified.
> >
> > And I noticed that everything that wasn't getting parsed was not
> > namespaced.  Is there a way to force SOAP::Lite to parse that
> > non-namespaced xml?  Is that even the problem?
> >
> > Thanks,
> > Wes
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>

#6388 From: "kartik_sxn" <kartik.sxn@...>
Date: Thu Nov 12, 2009 10:18 am
Subject: SOAP Lite problems.
kartik_sxn
Send Email Send Email
 
I am running a local StockQuoteService ,
http://localhost:8080/axis2/services/StockQuoteService?wsdl

$stockprice=SOAP::Lite ->service('http://localhost:8080/axis2/service/
StockQuoteService?wsdl') ->getPrice('IBM'); print Dumper($stockprice);
The result returns $VAR1 = undef;

I am getting a undef value , what is
the correct way to call a webservice using Perl?

When I run the code with URL I get the following SOAP message returned
<code>
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.w3.org/2\
005/08/addressing/soap/fault</wsa:Action></soapenv:Header><soapenv:Body><soapenv\
:Fault><faultcode>VersionMismatch</faultcode><faultstring>Only SOAP 1.1 or SOAP
1.2 messages are supported in the system</faultstring><detail
/></soapenv:Fault></soapenv:Body></soapenv:Envelope>
</code>


Can somebody guide me where I am getting wrong? Which are the best modules to
parse WSDLs in Perl?

#6389 From: "martin.busik@..." <martin.busik@...>
Date: Thu Nov 12, 2009 6:44 pm
Subject: Re: SOAP Lite problems.
mbusik70
Send Email Send Email
 
Hi,

> When I run the code with URL I get the following SOAP message returned

You can't "test" a SOAP-Webservice by entering its URL into a web browser. Use a tool
like SOAPUI (www.soapui.org)

> I am getting a undef value , what is
> the correct way to call a webservice using Perl?

As a first step, use the debugging options of SOAP::Lite, e.g.

use SOAP::Lite (+trace => [qw(transport debug parameters)]);

then you can see, what request goes to the server and what response you get.
Once you have the response, it is easier to find out what went wrong.

Cheers,
Martin

#6390 From: "Martin Busik" <martin.busik@...>
Date: Fri Nov 13, 2009 9:16 am
Subject: AW: Why does Soap::Lite stop parsing this response?
mbusik70
Send Email Send Email
 
Hi Wes,

> As of now I'm parsing the string with XML::LibXML, so the question
> still stands. Can I force SOAP::Lite to parse that interior XML
> string, even though it's been escaped?

No. If the XML-Schema-Type of the result element is "string", then
SOAP::Lite
(as well as other WS-packages) can treat it as a string only.

Cheers,
Martin

#6391 From: Paolo Asioli <paolo.asioli@...>
Date: Fri Nov 13, 2009 5:10 pm
Subject: Problem with request
paolo_asioli
Send Email Send Email
 
Hello,

I'm trying to create a request with SOAP::Lite with the enclosed WSDL.
I'd like to obtain something like the attached request (generated by
NuSoap in PHP) but I can't find a way to write it.

Is there someone that could provide me some sample code for this request ?

Thanks a lot in advance.

Best regards,
     Paolo

2 of 2 File(s)


#6392 From: "Martin Busik" <martin.busik@...>
Date: Sun Nov 15, 2009 2:09 pm
Subject: AW: Problem with request [2 Attachments]
mbusik70
Send Email Send Email
 
Hi Paolo,

> Is there someone that could provide me some sample code for
> this request ?

my  $proxy = SOAP::Lite->proxy('http:/192.168.1.1/:20000'); # Endpoint,
defined in your wsdl

     my $TNS_NS = "http://www.gruppounieuro.com/wsdl";
     my $TEMPURI_NS = "http://tempuri.org";

     $proxy->serializer->register_ns($TNS_NS);
     $proxy->serializer->register_ns($TEMPURI_NS);

     my $tnsprefix = $proxy->serializer->find_prefix($TNS_NS);
     my $tempuriprefix = $proxy->serializer->find_prefix($TEMPURI_NS);

my $response = $proxy->call(
         "$tnsprefix:S_IntCli",

SOAP::Data->name('Cogn')->value('ANITA')->type("$tempuriprefix:scastring.wit
hnull"),

SOAP::Data->name('Nome')->value('CALLIKU')->type("$tempuriprefix:scastring.w
ithnull"),

SOAP::Data->name('Cap')->value('17055')->type("$tempuriprefix:scastring.with
null"),

SOAP::Data->name('P_iva')->value('')->type("$tempuriprefix:scastring.withnul
l"),
     );

Cheers,
Martin

#6393 From: Paolo Asioli <paolo.asioli@...>
Date: Mon Nov 16, 2009 5:51 pm
Subject: Re: AW: Problem with request
paolo_asioli
Send Email Send Email
 
Hi, Martin.

Sorry to bother still, but looks like the perl module isn't geting the hostname correctly.

I get this error
Client-Warning: Internal response

500 Can't connect to :80 (Bad hostname '')

But the code you gave me seems perfect... do you have any suggestions ? I'm running SOAP::Lite 0.69

Thanks again.

Paolo


Martin Busik ha scritto:
 

Hi Paolo,

> Is there someone that could provide me some sample code for
> this request ?

my $proxy = SOAP::Lite->proxy('http:/192.168.1.1/:20000'); # Endpoint,
defined in your wsdl

my $TNS_NS = "http://www.gruppounieuro.com/wsdl";
my $TEMPURI_NS = "http://tempuri.org";

$proxy->serializer->register_ns($TNS_NS);
$proxy->serializer->register_ns($TEMPURI_NS);

my $tnsprefix = $proxy->serializer->find_prefix($TNS_NS);
my $tempuriprefix = $proxy->serializer->find_prefix($TEMPURI_NS);

my $response = $proxy->call(
"$tnsprefix:S_IntCli",

SOAP::Data->name('Cogn')->value('ANITA')->type("$tempuriprefix:scastring.wit
hnull"),

SOAP::Data->name('Nome')->value('CALLIKU')->type("$tempuriprefix:scastring.w
ithnull"),

SOAP::Data->name('Cap')->value('17055')->type("$tempuriprefix:scastring.with
null"),

SOAP::Data->name('P_iva')->value('')->type("$tempuriprefix:scastring.withnul
l"),
);

Cheers,
Martin



#6394 From: "Martin Busik" <martin.busik@...>
Date: Mon Nov 16, 2009 5:58 pm
Subject: Problem with request
mbusik70
Send Email Send Email
 
Hi Paolo,

> Sorry to bother still, but looks like the perl module isn't
> geting the hostname correctly.
>
> I get this error
> Client-Warning: Internal response
>
> 500 Can't connect to :80 (Bad hostname '')

my $proxy = SOAP::Lite->proxy('http:/192.168.1.1/:20000');

Invalid url is the problem.
It should be propably  'http://192.168.1.1:20000/'

I've copied the above string from the wsdl you've uploaded to the list.
There comes
the error from.

Cheers,
Martin

#6395 From: Paolo Asioli <paolo.asioli@...>
Date: Mon Nov 16, 2009 6:14 pm
Subject: Re: Problem with request
paolo_asioli
Send Email Send Email
 
Now it's working. Also, I had a single slash between http: and the IP.

Thank you very much for your help !!!!!!

Cheers,
    Paolo




Martin Busik ha scritto:
Hi Paolo,
Sorry to bother still, but looks like the perl module isn't geting the hostname correctly.
I get this error
Client-Warning: Internal response
500 Can't connect to :80 (Bad hostname '')

my $proxy = SOAP::Lite->proxy('http:/192.168.1.1/:20000');
Invalid url is the problem.
It should be propably 'http://192.168.1.1:20000/'
I've copied the above string from the wsdl you've uploaded to the list.
There comes
the error from.
Cheers,
Martin


#6396 From: "Julian" <julianokyap@...>
Date: Fri Nov 20, 2009 10:13 am
Subject: Use of inherited AUTOLOAD for non-method SOAP::Serializer::as_base64Binary()
julian_yap
Send Email Send Email
 
Hi all,

I'm having an issue and it may be a simple thing to resolve it.

When a SOAP::Lite server returns a hash array to a Python client, and one of the
hash fields is a large chunk of binary data (actually the contents of a .wav
file), the following is printed on stdout:

Use of inherited AUTOLOAD for non-method SOAP::Serializer::as_base64Binary() is
deprecated at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 1167.

When using a Perl client, it works correctly. Here's the SOAP request from the
Python client:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:get_message xmlns:ns1="Integrics/Enswitch/API" SOAP-ENC:root="1">
<v1 xsi:type="xsd:string">username</v1>
<v2 xsi:type="xsd:string">password</v2>
<v3 xsi:type="xsd:string">1234</v3>
<v4 xsi:type="xsd:string">INBOX</v4>
<v5 xsi:type="xsd:string">voicemail</v5>
<v6 xsi:type="xsd:string">msg0000</v6>
</ns1:get_message>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and here's what the client is reporting returned:

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><get_mess
ageResponse xmlns="Integrics/Enswitch/API"><gensym><name
xsi:type="xsd:string">msg0000.wav</name><mimetype
xsi:type="xsd:string">audio/x-wav</mimetype></gensym></get_messageResponse>
</soap:Body></soap:Envelope>

but there should also be a <data></data> field returned with about 500KB of
data. SOAP::Lite is 0.710.10, Perl is 5.8.8, the server OS is Centos 4.8.

Any ideas on what could be wrong?

Thanks!

#6397 From: "davemangot" <dave@...>
Date: Fri Nov 20, 2009 9:58 pm
Subject: getting NIL string on custom Akamai datatype
davemangot
Send Email Send Email
 
Hi,

    I'm kinda at wits end so hopefully this will make some sense.  I'm trying to
get a report from Akamai using their SOAP interface.

    I downloaded their WSDL file and used stubmaker.pl to generate the Perl
module.  I'm using SOAP::Lite version  0.710.10.

    Here is the call I make from my client:
my @cp2;
$cp2[0] = '33333';
my $returnResult =
$service->getTrafficSummaryForCPCode(\@cp2,'2009-11-00T00:00:00','2009-11-05T00:\
00:00','PST8PDT',\@columns);

Which is a call to:
getTrafficSummaryForCPCode => {
     endpoint =>
'https://control.akamai.com/nmrws/services/SiteAcceleratorReportService',
     soapaction => '',
     namespace => 'https://control.akamai.com/SiteAcceleratorReportService.xsd',
     parameters => [
       SOAP::Data->new(name => 'cpcodes', type => 'akasiteDeldt:ArrayOfInt', attr
=> {}),
       SOAP::Data->new(name => 'start', type => 'xsd:dateTime', attr => {}),
       SOAP::Data->new(name => 'end', type => 'xsd:dateTime', attr => {}),
       SOAP::Data->new(name => 'timeZone', type => 'xsd:string', attr => {}),
       SOAP::Data->new(name => 'columns', type => 'akasiteDeldt:ArrayOfString',
attr => {}),
     ], # end parameters
   }, # end getTrafficSummaryForCPCode


The problem is when I run this, all the fields that are straight up xsd types
(dateTime and string) work fine, but the akasiteDeldt types just show up as
blank.

<soap:Body><akasiteDeldt:getTrafficSummaryForCPCode><cpcodes xsi:nil="true"
xsi:type="akasiteDeldt:ArrayOfInt" /><start
xsi:type="xsd:dateTime">2009-11-00T00:00:00</start><end
xsi:type="xsd:dateTime">2009-11-05T00:00:00</end><timeZone
xsi:type="xsd:string">PST8PDT</timeZone><columns xsi:nil="true"
xsi:type="akasiteDeldt:ArrayOfString"
/></akasiteDeldt:getTrafficSummaryForCPCode></soap:Body>

However, for example, the first field is supposed to look like:
<cpcodes xsi:type="akasiteDeldt:ArrayOfInt"
soapenc:arrayType="xsd:int[]"><item>33244</item><item>33234</item></cpcodes>

If I change the type from akasiteDeldt:ArrayOfInt to xsd:string and pass in a
string, then it gets sent correctly (which of course breaks on the receiving
(server) end).

I'm guessing SOAP::Lite must not like the datastructure I'm passing in and
therefore will not format the fields correctly.

This is how ArrayOfInt is defined in the WSDL:

<complexType name="ArrayOfInt">
         <complexContent>
           <restriction base="soapenc:Array">
             <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
           </restriction>
         </complexContent>
       </complexType>


I've tried passing in arrays, arrays of arrays, hashes of arrays, references to
arrays, hashes, etc.  Still no luck.

How can I nail down what getTrafficSummaryForCPCode is expecting for a data
structure or why SOAP::Lite is not populating my field correctly?

Any help would be greatly appreciated.  I've run this as far with Akamai support
as I can.

Cheers,

-Dave

#6398 From: Aleksandar Jelenak <aleksandar.jelenak@...>
Date: Sat Nov 21, 2009 2:25 am
Subject: Re: getting NIL string on custom Akamai datatype
aleksandar.jelenak@...
Send Email Send Email
 
> my @cp2;
> $cp2[0] = '33333';

It is shorter to write:

my @cp2 = (33333);

> my $returnResult =
$service->getTrafficSummaryForCPCode(\@cp2,'2009-11-00T00:00:00','2009-11-05T00:\
00:00','PST8PDT',\@columns);

The start date is not valid: 2009-11-00. You probably meant
2009-11-01. Maybe this is the real culprit?

        -Aleksandar

#6399 From: "davemangot" <dave@...>
Date: Mon Nov 23, 2009 6:15 pm
Subject: Re: getting NIL string on custom Akamai datatype
davemangot
Send Email Send Email
 
--- In soaplite@yahoogroups.com, Aleksandar Jelenak <aleksandar.jelenak@...>
wrote:
>
> > my @cp2;
> > $cp2[0] = '33333';
>
> It is shorter to write:
>
> my @cp2 = (33333);
>
> > my $returnResult =
$service->getTrafficSummaryForCPCode(\@cp2,'2009-11-00T00:00:00','2009-11-05T00:\
00:00','PST8PDT',\@columns);
>
> The start date is not valid: 2009-11-00. You probably meant
> 2009-11-01. Maybe this is the real culprit?
>
>        -Aleksandar
>

You are correct, but even after fixing the date (which had been correct in
previous versions) SOAP::Lite still does not pass in my array to the server.

my @cp2 = (33333);
my $returnResult =
$service->getTrafficSummaryForCPCode(\@cp2,'2009-11-01T00:00:00','2009-11-05T00:\
00:00','PST8PDT',\@columns); # WS Call

<soap:Body><akasiteDeldt:getTrafficSummaryForCPCode><cpcodes xsi:nil="true"
xsi:type="akasiteDeldt:ArrayOfInt" /><start
xsi:type="xsd:dateTime">2009-11-01T00:00:00</start><end
xsi:type="xsd:dateTime">2009-11-05T00:00:00</end><timeZone
xsi:type="xsd:string">PST8PDT</timeZone><columns xsi:nil="true"
xsi:type="akasiteDeldt:ArrayOfString"
/></akasiteDeldt:getTrafficSummaryForCPCode></soap:Body>


Is there any more debugging I can turn on to find out why it won't properly
format my data structure?


-Dave

#6400 From: "Martin Busik" <martin.busik@...>
Date: Thu Nov 26, 2009 9:29 pm
Subject: AW: namespaces, was: SOAP Lite problems.
mbusik70
Send Email Send Email
 
Hi,

> How to insert a Namespace inside SOAP:Header Tag? I know how
> to do it for childnodes but not for the first node , the actual
>
> SOAP::Header?
>
> Same query for SOAP::Body

$namespace = "urn:myns";
     $proxy->serializer->register_ns($namespace);
     my $prefix = $proxy->serializer->find_prefix($namespace);

then you can use the prefix in your elements, e.g.:
SOAP::Data->name("$prefix:mydata")

Cheers,
Martin

#6401 From: "Martin Busik" <martin.busik@...>
Date: Thu Nov 26, 2009 9:25 pm
Subject: AW: getting NIL string on custom Akamai datatype
mbusik70
Send Email Send Email
 
Hi Dave,

the problem is, that SOAP::Lite does not serialize ArrayOfXXX types.

There are 2 ways to solve it:

1. define an own serializer:
---------------------
sub serialize_array {
     my ($self, $value, $name, $type, $attr) = @_;
     return [
         $name,
         { %$attr },
         [ map { SOAP::Data->name("item")->value($_)->type("") } @$value ],
     ];
}

*SOAP::Serializer::as_ArrayOfInt = \&serialize_array;
*SOAP::Serializer::as_ArrayOfString = \&serialize_array;

$service->serializer->typelookup->{ArrayOfInt} = [99, sub { ref($_[0]) eq
'ARRAY' }, 'as_ArrayOfInt'];
$service->serializer->typelookup->{ArrayOfString} = [99, sub { ref($_[0]) eq
'ARRAY' }, 'as_ArrayOfString'];

my @cp2 = (123);
my @columns = ("abc","def");

my $t = $service->getTrafficSummaryForCPCode( \@cp2
,'2009-11-00T00:00:00','2009-11-05T00:00:00','PST8PDT',\@columns);
-------------------------

2. Do not use the SOAP::Lite's serialization at all, construct your request
yourself.
As you are using a stub, make the parameters array emtpy, i.e. delete the
following lines:

     parameters => [
       SOAP::Data->new(name => 'cpcodes', type => 'tns1:ArrayOfInt', attr =>
{}),
       SOAP::Data->new(name => 'start', type => 'xsd:dateTime', attr => {}),
       SOAP::Data->new(name => 'end', type => 'xsd:dateTime', attr => {}),
       SOAP::Data->new(name => 'timeZone', type => 'xsd:string', attr => {}),
       SOAP::Data->new(name => 'columns', type => 'tns1:ArrayOfString', attr
=> {}),
     ], # end parameters

then call the service as follows:

my $t = $service->getTrafficSummaryForCPCode(
	 SOAP::Data->name('cpcodes')->type(undef)->value( \SOAP::Data->value(
             SOAP::Data->name('item')->value(123)->type(undef)
     )),

SOAP::Data->name('start')->type('xsd:dateTime')->value('2009-11-26T00:00:00'
),
     ...
);

Cheers,
Martin

#6402 From: "Martin Busik" <martin.busik@...>
Date: Thu Nov 26, 2009 7:48 pm
Subject: AW: Use of inherited AUTOLOAD for non-method SOAP::Serializer::as_base64Binary()
mbusik70
Send Email Send Email
 
Hi,

> When a SOAP::Lite server returns a hash array to a Python
> client, and one of the hash fields is a large chunk of binary
> data (actually the contents of a .wav file), the following is
> printed on stdout:
>
> Use of inherited AUTOLOAD for non-method
> SOAP::Serializer::as_base64Binary() is deprecated at
> /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 1167.
>
> When using a Perl client, it works correctly. Here's the SOAP
> request from the Python client:

If this is a server message, then it should be returned, whatever client
sends the request. I suppose, perl and python do not generate the same
request.

You might try SoapUI (www.soapui.com) to find out what part of a request
causes the problem.

> Use of inherited AUTOLOAD for non-method
SOAP::Serializer::as_base64Binary()
> is deprecated at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 1167.

The code causing the problem has to do with the "autotype" feature.

Cheers,
Martin

#6403 From: "jared.pohl" <jared.pohl@...>
Date: Mon Nov 30, 2009 1:58 pm
Subject: newbie.
jared.pohl
Send Email Send Email
 
Hi Guys

I've been fiddling around with SOAP::Lite and think its great so far, but am
really struggling to get a result.  I was wondering if anyone could give me a
bit of code to tell me how to create the following soap request:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
     <login xmlns="http://www.betfair.com/publicapi/v3/BFGlobalService/">
       <request>
         <locationId xmlns="">0</locationId>
         <password xmlns="">bfpassword</password>
         <productId xmlns="">82</productId>
         <username xmlns="">bfusername</username>
         <vendorSoftwareId xmlns="">0</vendorSoftwareId>
       </request>
     </login>
   </soap:Body>
</soap:Envelope>

I've even gone as far as creating a stub and trying to call the login method,
but i trip up trying to put the keys and values into the soap request (im
guessing this is what im doing wrong).

Any help would be appreciated - it will probably mean a lightbulb moment and
then i can move on ;)  thanks guys!~

#6404 From: "Martin Busik" <martin.busik@...>
Date: Mon Nov 30, 2009 9:09 pm
Subject: AW: newbie.
mbusik70
Send Email Send Email
 
Hi Jared,

> bit of code to tell me
> how to create the following soap request:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <soap:Body>
>     <login
> xmlns="http://www.betfair.com/publicapi/v3/BFGlobalService/">
>       <request>
>         <locationId xmlns="">0</locationId>
>         <password xmlns="">bfpassword</password>
>         <productId xmlns="">82</productId>
>         <username xmlns="">bfusername</username>
>         <vendorSoftwareId xmlns="">0</vendorSoftwareId>
>       </request>
>     </login>
>   </soap:Body>
> </soap:Envelope>

here comes it:

# Debug options: see the request actually being generated
#
use SOAP::Lite (+trace => [qw(transport debug parameters)]);

my  $proxy = SOAP::Lite->proxy('http:/localhost');
     $proxy->readable(1);
     $proxy->autotype(0); # disable generation of "xsi:type" attribute

     $proxy->uri("http://www.betfair.com/publicapi/v3/BFGlobalService/"); #
namespace of your method

my $response = $proxy->call(
         "login",
         SOAP::Data->name('request')->value(
             \SOAP::Data->value(
                 SOAP::Data->name('locationId')->value(0)->attr( { xmlns =>
"" }),
                 SOAP::Data->name('password')->value('bfpassword')->attr( {
xmlns => "" }),
                 SOAP::Data->name('productId')->value(82)->attr( { xmlns =>
"" }),
                 SOAP::Data->name('username')->value('bfusername')->attr( {
xmlns => "" }),
                 SOAP::Data->name('vendorSoftwareId')->value(0)->attr( {
xmlns => "" }),
             )
         )
     );

the weird about your request is, that the elements inside "request" do have
a null namespace, this needs to be
generated using ->attr( {xmlns => ""} ). The rest is just a
straight-forward.

Cheers,
Martin

#6405 From: "Martin Busik" <martin.busik@...>
Date: Mon Nov 30, 2009 10:26 pm
Subject: AW: WS-Trust / WS Security / RequestSecurityToken, was: namespace
mbusik70
Send Email Send Email
 
Hi Kartik,
i've fixed an cleaned your code. Now, with the attached code, you will
generate semantically the same request,
as your reference one. I mean semantically as the prefixes are different
sometimes, but they mean the same.

Also, your reference request contained unnecessary xmlns attribute, I've
removed them.

What's the point?

A namespace definition may occur anywhere in the code and is valid in that
element as well as in all chils.
(except it is overriden in childs)

"ns3:UsernameToken" and "wsu:usernameToken" are equal, if there the prefixes
are defined als follows:

xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd"
xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd"

So it is perfectly ok to use just one prefix.

By default, SOAP::Lite puts the xmlns:* attributes into the Envelope, which
is correct. You also do not need to
generate the Header element, SOAP::Lite generates it when needed.

Cheers,
Martin

1 of 1 File(s)


#6406 From: "Martin Busik" <martin.busik@...>
Date: Tue Dec 1, 2009 5:37 pm
Subject: AW: WS-Trust / WS Security / RequestSecurityToken, was: namespace
mbusik70
Send Email Send Email
 
Hi,
> I) You also replied to another email in the soaplite, yahoo
> email. Where you specified that through this command:
> $proxy->uri("http://www.betfair.com/publicapi/v3/BFGlobalServi
> ce/"); # namespace of your method
>
> We can generate
> <soap:Body>
> <login xmlns="http://www.betfair.com/publicapi/v3/BFGlobalService/">
>
> Can I do this for my requirement too?

in priniple yes. If you use this, you can write:

$proxy->uri("http://docs.oasis-open.org/ws-sx/ws-trust/200512/")
$proxy->call("RequestSecurityToken",...

instead of
$proxy->serializer->register_ns("http://docs.oasis-open.org/ws-sx/ws-trust/2
00512/","ns2")
$proxy->call("ns2:RequestSecurityToken",...

I.e. you do not need prefixes ($prefix2) for your elements inside
RequestSecurityToken, when using ->uri(NS) and
when all request elements are within this namespace.

> 2) You also mentioned that I can register namespaces inside
> SOAP:Envelop , and then do not need to do that stuff again
> for SOAP::Header , SOAP:Body?

right.

> Are you sure that the code which you sent me , ( where we are
> not inserting namespaces inside Header / body ) would also work?

yes. Except - the server does strange things with the request :-/
But I don't excpect the server to do strange things...

>
> SOAP::Lite I guess creates the header and body automatically
> when I issue the method call at runtime.I do not have the
> control to insert namespaces there.

You can. But why do you need them? It is ok to put a namespace declaration
on a valid "place". Envelope is
a valid place.

Anyway, you can supply a namespace for every element, including the method
name (RequestSecurityToken) by using:

$proxy->call(SOAP::Data->name("xyxyxy:RequestSecurityToken")->attr( {
"xmlns:xyxyxy => "urn:theNamespace" }), ...

Cheers,
Martin

#6407 From: "jared.pohl" <jared.pohl@...>
Date: Wed Dec 2, 2009 10:10 pm
Subject: SoapAction
jared.pohl
Send Email Send Email
 
Hi Guys,

Im still having problems with my soap request, it seems like its formed well but
i've noticed in when tracing it, the request made is different to what is
probably expected:

Looking for a standard soap request (from IBM) we get the following:

POST /EndorsementSearch HTTP/1.1
Host: www.snowboard-info.com
Content-Type: text/xml; charset="utf-8"
Content-Length: 261
SOAPAction: "http://www.snowboard-info.com/EndorsementSearch"


I've noticed when looking through the trace output to terminal, i see that the
soapaction generated is of the form
"http://www.snowboard-info.com/#EndorsementSearch"

How do you remove # from the soapaction header?

The soap::lite code i've used is as follows:

use SOAP::Lite (+trace => [qw(transport debug parameters)]);

my  $proxy = SOAP::Lite->proxy('http:/localhost');
    $proxy->readable(1);
    $proxy->autotype(0);
    $proxy->uri("http://www.betfair.com/publicapiv3BFGlobalService/");

my $response = $proxy->call("login",
        SOAP::Data->name('request')->value(
            \SOAP::Data->value(
                SOAP::Data->name('locationId')->value(0)->attr( { xmlns =>
"" }),
                SOAP::Data->name('password')->value('bfpassword')->attr( {
xmlns => "" }),
                SOAP::Data->name('productId')->value(82)->attr( { xmlns =>
"" }),
                SOAP::Data->name('username')->value('bfusername')->attr( {
xmlns => "" }),
                SOAP::Data->name('vendorSoftwareId')->value(0)->attr( {
xmlns => "" }),
            )
        )
    );

#6408 From: "martin.busik@..." <martin.busik@...>
Date: Thu Dec 3, 2009 10:38 am
Subject: Re: SoapAction
mbusik70
Send Email Send Email
 
Hi Jared,

to-be:
> SOAPAction: http://www.snowboard-info.com/EndorsementSearch

perl-is:
> SOAPAction: http://www.snowboard-info.com/#EndorsementSearch

See http://search.cpan.org/~mkutter/SOAP-Lite-0.710.10/lib/SOAP/Lite.pm, documentation of the on_action()
method.

Cheers,
Martin

#6409 From: "fde101" <fde101@...>
Date: Tue Dec 8, 2009 2:20 pm
Subject: XML::Parser Issue?
fde101
Send Email Send Email
 
Hi,

New to the group -- I'm trying to configure a SOAP service using SOAP::Lite
under mod_perl on Apache on one of our servers.

* If I set up a standalone server using "SOAP::Transport::HTTP::Daemon", it
works just fine.

* If I "bypass" SOAP::Lite by injecting my own simplistic protocol (not really
an option for immediate use right now) between my module containing the service
code and the mod_perl layer, this also works.

* The same code and basic configuration are working on other servers (some
module versions may be slightly different).

When I try to use SOAP::Lite under Apache, however, on this one server, I get
the following message returned to the client:


Application failed during request deserialization:
no element found at line 1, column 0, byte -1 at
/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/XML/Parser.pm line 187


This happens consistently for any given request (identical, other than port
number, to what I send to the standalone server, which works, using as much
identical code as possible to what is running under Apache).


Can anyone help me diagnose this issue?


Some details:



Apache/2.0.63 (Unix) DAV/2 mod_perl/2.0.0 Perl/v5.8.4 configured

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
   Platform:
     osname=solaris, osvers=2.10, archname=sun4-solaris-64int



package SOAP::Lite;

use 5.005;
use strict;
use vars qw($VERSION);
use version; $VERSION = qv('0.710.10');


package XML::Parser;

use Carp;

BEGIN {
   require XML::Parser::Expat;
   $VERSION = '2.36';


Partial httpd.conf (I removed a few things to protect specific internal details
and such -- PerlSetEnv used to configure my code layer, and a
PerlPostConfigRequire to help initialize something):

     PerlSwitches -I/usr/apache2/perl

     PerlModule Apache::DBI
     PerlModule ModPerl::Registry
     ScriptAlias /perl/ "/usr/apache2/perl/"
     <Location /perl>
         SetHandler perl-script
         PerlResponseHandler ModPerl::Registry
         PerlOptions +ParseHeaders
         Options +ExecCGI
     </Location>
     <Directory /usr/apache2/perl>
         AllowOverride None
         Options None
         Order allow,deny
         Allow from all
     </Directory>


To run under Apache:

use SOAP::Lite +trace;

use SOAP::Transport::HTTP;

use xxxx;


SOAP::Transport::HTTP::CGI->dispatch_to('xxxx')->handle;



Trace info:

SOAP::Transport::new: ()
SOAP::Serializer::new: ()
SOAP::Deserializer::new: ()
SOAP::Parser::new: ()
SOAP::Server::new: ()
SOAP::Transport::HTTP::Server::new: ()
SOAP::Transport::HTTP::CGI::new: ()
SOAP::Transport::HTTP::Server::handle:
SOAP::Server::handle: ()
SOAP::Deserializer::deserialize: ()
SOAP::Parser::decode: ()
SOAP::Serializer::envelope: ()
SOAP::Serializer::envelope: Client Application failed during request
deserialization:
no element found at line 1, column 0, byte -1 at
/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/XML/Parser.pm line 187

SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Transport::HTTP::CGI::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
SOAP::Parser::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()




For the standalone:

use SOAP::Lite +trace;
use SOAP::Transport::HTTP;

use xxxx;


my $daemon = SOAP::Transport::HTTP::Daemon->new(LocalPort => #####)
     ->dispatch_to('xxxx');

print "Server responds to ", $daemon->url, "\n";
$daemon->handle;


(where ##### is actually a port number :-)

#6410 From: Frank Engel <fde101@...>
Date: Tue Dec 8, 2009 4:12 pm
Subject: XML::Parser
fde101
Send Email Send Email
 
All, apologies if I wasted anyone's time here -- we downgraded to XML::Parser 2.34 and SOAP::Lite 0.710.08, and this seems to have resolved the issue.
 
Still of interest in case anyone else has this problem, or if some sort of issue exists in new versions and needs to be investigated?
 
 
Thank you!


#6411 From: "gcpochron" <gcpochron@...>
Date: Wed Dec 9, 2009 4:42 pm
Subject: SOAP WS-Security Header w/ Timestamp and UsernameToken nodes
gcpochron
Send Email Send Email
 
Hello,

I've looked low and high and can't find any example code on how to construct a
security header that contains both Timestamp and UsernameToken nodes. I need to
construct a header that looks like this:

    <soapenv:Header>
       <wsse:Security soapenv:mustUnderstand="1">
          <wsu:Timestamp wsu:Id="Timestamp">
             <wsu:Created>2009-12-09T16:34:34.990Z</wsu:Created>
             <wsu:Expires>2009-12-09T16:44:34.990Z</wsu:Expires>
          </wsu:Timestamp>
          <wsse:UsernameToken
xsi:type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec\
ext-1.0.xsd">
             <wsse:Username>user</wsse:Username>
             <wsse:Password>2dqe1e123</wsse:Password>
             <wsse:Nonce>de87wdsd23d23e</wsse:Nonce>
             <wsse:Created>2009-05-19T16:02:45.168Z</wsse:Created>
          </wsse:UsernameToken>
       </wsse:Security>
    </soapenv:Header>

Does anyone know of any code examples that demonstrate how to implement this?
I've got everything except for the Timestamp node. Here is what I've done so
far:

my $authhash_ref = {
     Username => SOAP::Data->type( ''     => $username )->prefix('wsse'),
     Password => SOAP::Data->type( $token => $pw_digest )->prefix('wsse'),
     Nonce => SOAP::Data->type( '' => $nonce)->prefix('wsse'),
     Created => SOAP::Data->type('' => $timestamp)->prefix('wsu'),
};


my $security_header = SOAP::Header->new(
     name   => 'Security',
     prefix => 'wsu',
     uri    => $wsu,
     value  => \SOAP::Data->new(
         name   => 'UsernameToken',
         prefix => 'wsse',
         type   => $wsse,
         value  => $authhash_ref,
     ),
);

Any help would be greatly appreciated.

#6412 From: "helbaby33" <helbaby33@...>
Date: Wed Dec 9, 2009 8:20 pm
Subject: Problems with Soap::Lite in IIS
helbaby33
Send Email Send Email
 
I am having problems getting the generic client/server script to run under IIS
with activestate per 5.8.9

I have tested basic perl CGI handling at it works. I'm really unsure about the
uri and how I would find out what the correct namespace is.

Any help would be very appreciated!!!

thanks - Brad



Here are the scripts and debug
**** Server ****

use SOAP::Transport::HTTP;

SOAP::Transport::HTTP::CGI
         -> dispatch_to('Demo')
         -> handle;

package Demo;
sub hi {
         return "Hello, world";
}

***** Client ****
#!perl -w

use SOAP::Lite +trace;


print SOAP::Lite
   -> uri('http://146.225.100.232/Demo')
   -> proxy('http://146.225.100.232:81/soap_server.pl')
   -> on_debug( sub {print @_})
   -> hi()
   -> result;
******


Here are the debug results

*******

C:\Perl\bin>c:\perl\bin\perl.exe \cygwin\home\Administrator\soap_client.pl
Unquoted string "trace" may clash with future reserved word at \cygwin\home\Admi
nistrator\soap_client.pl line 3.
SOAP::Transport::new: ()
SOAP::Serializer::new: ()
SOAP::Deserializer::new: ()
SOAP::Parser::new: ()
SOAP::Lite::new: ()
SOAP::Transport::HTTP::Client::new: ()
SOAP::Lite::call: ()
SOAP::Serializer::envelope: ()
SOAP::Serializer::envelope: on_debug CODE(0x1832064)
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
Cannot marshall CODE reference at c:/perl/site/lib/SOAP/Lite.pm line 3710
SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x1e11f64)
SOAP::Transport::HTTP::Client::send_receive: POST http://146.225.100.232:81/soap
_server.pl HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 415
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://146.225.100.232/Demo#on_debug"

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.or
g/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://sch
emas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/env
elope/"><soap:Body><on_debug xmlns="http://146.225.100.232/Demo" /></soap:Body><
/soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x2193408)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
Date: Wed, 09 Dec 2009 19:56:36 GMT
Server: Microsoft-IIS/6.0
Content-Length: 582
Content-Type: text/xml; charset=utf-8
Client-Date: Wed, 09 Dec 2009 19:56:36 GMT
Client-Peer: 146.225.100.232:81
Client-Response-Num: 1
SOAPServer: SOAP::Lite/Perl/0.710.10
X-Powered-By: ASP.NET

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.or
g/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://sch
emas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/env
elope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Fa
iled to access class (Demo): Can't locate Demo.pm in @INC (@INC contains: C:/Per
l/site/lib C:/Perl/lib .) at (eval 99) line 3.
</faultstring></soap:Fault></soap:Body></soap:Envelope>
SOAP::Deserializer::deserialize: ()
SOAP::Parser::decode: ()
SOAP::SOM::new: ()
Can't locate object method "hi" via package "SOAP::SOM" at \cygwin\home\Administ
rator\soap_client.pl line 10.
SOAP::SOM::DESTROY: ()
SOAP::Lite::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Transport::HTTP::Client::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
SOAP::Parser::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
******

#6413 From: "martin.busik@..." <martin.busik@...>
Date: Thu Dec 10, 2009 8:07 am
Subject: Re: SOAP WS-Security Header w/ Timestamp and UsernameToken nodes
mbusik70
Send Email Send Email
 
Hi,

> I've looked low and high and can't find any example code on how to construct a security header
> that contains both Timestamp and UsernameToken nodes. I need to construct a header
> that looks like this:

take a look at:

http://www.wlp-systems.de/soap-lite-and-ws-security.html

There is no timestamp in the example, but with that example it should be straight forward to
extend it.

Cheers,
Martin

#6414 From: "martin.busik@..." <martin.busik@...>
Date: Thu Dec 10, 2009 8:10 am
Subject: Re: Problems with Soap::Lite in IIS
mbusik70
Send Email Send Email
 
Hi,

> I am having problems ...

The reason is:

Failed to access class (Demo): Can't locate Demo.pm in @INC (@INC contains: C:/Per
l/site/lib C:/Perl/lib .)

you might extend your @INC paths. use lib qw(mypath) or use require("c:/path/to/my/module/Demo.pm")

Cheers,
Martin

Messages 6385 - 6414 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help