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 5965 - 5994 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#5965 From: "nicholas_toze" <nicholas_toze@...>
Date: Wed Jun 6, 2007 5:16 pm
Subject: Re: trapping soap faults when using a wsdl
nicholas_toze
Send Email Send Email
 
The hack I've used is to set a global $last_fault variable in the
on_fault handler. Then undef it before the soap call and check if it's
defined after the call.

--- In soaplite@yahoogroups.com, James Abbott <j.abbott@...> wrote:
>
> Hi Folks,
>
> I'm having trouble trapping soap faults when access a service using
> SOAP::Lite accessed via a wsdl. My client code looks something like:
>

#5966 From: "pyrtold" <pyrtold@...>
Date: Mon Jun 11, 2007 12:16 pm
Subject: SOAP::Lite and Zenfolio
pyrtold
Send Email Send Email
 
Hello,

   I'm trying to write a script that will allow me to download all
the photos I have uploaded to my Zenfolio account (which is at
http://bertold.zenfolio.com). The API is documented here:


http://www.zenfolio.com/zf/help/?topic=api/introduction


As a test I'm trying to just get *anything* to work, so the first
simple script I wanted to write was one that returned my account
details. This requires the use of the LoadPublicProfile method. So
I used the example here:


http://www.zenfolio.com/zf/api/zfapi.asmx?op=LoadPublicProfile


And came up with this:


---------
#!/usr/bin/perl
use warnings;
use strict;

use Data::Dumper;

use SOAP::Lite;

my $soap = SOAP::Lite
     ->uri('http://www.zenfolio.com/zf/api/zfapi.asmx')

->proxy('http://www.zenfolio.com/zf/api/zfapi.asmx/LoadPublicProfile?loginName=b\
ertold
HTTP/1.1');

print Dumper $soap;
---------


While this does create a SOAP::Lite object, it is filled with "generic"
data. None of it relates to my Zenfolio account, so I am assuming that
the process didn't proceed as expected. Can anyone tell me what I can
do to get more information on what went wrong? Or is there something
obvious that I am doing incorrectly in the above code?


Thanks a lot,
Pyrtold

#5967 From: "decibel3276" <jalazar@...>
Date: Tue Jun 12, 2007 6:13 pm
Subject: Parsing thru a SOAP::Lite response.... HASHES??
decibel3276
Send Email Send Email
 
When the resultant response is the following:

<?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>
     <FindStreetResponse xmlns="http://www.mysite.com/webservices/postal/">
       <FindStreetResult>
         <StreetInfo>
           <Predirectional />
           <Street>Meadow St</Street>
           <Zip>15236</Zip>
         </StreetInfo>
         <StreetInfo>
           <Predirectional />
           <Street>Meadow Park Dr</Street>
           <Zip>15236</Zip></StreetInfo>
         <StreetInfo>
           <Predirectional />
           <Street>White Hampton Ln</Street>
           <Zip>15236</Zip>
         </StreetInfo>
       </FindStreetResult>
     </FindStreetResponse>
   </soap:Body>
</soap:Envelope>

How would I go about getting an array of StreetInfo?  Any time I try
to parse thru this, I either get errors or I get the last StreetInfo
data.

I've tried using foreach $e(@{$result->{StreetInfo}}) and a couple of
other variants of that but nothing seems to be working.  Anyone have
any helpful ideas?

I am using: use SOAP::Lite +trace => 'debug';

If I could only get the raw XML and parse it myself it would be a lot
easier.

#5968 From: Eric Bridger <eric@...>
Date: Thu Jun 14, 2007 1:38 pm
Subject: Re: Parsing thru a SOAP::Lite response.... HASHES??
ebridger2004
Send Email Send Email
 
I believe you need to tell your SOAP client you want it to return an
SOM object via:

$client->want_som(1);

Then use:
foreach my $e ( @{$response->valueof('//FindStreetResult/StreetInfo'){

}

You should also be able to get the XML returned using:

   $client->transport->http_response->content();

Eric

On Jun 12, 2007, at 2:13 PM, decibel3276 wrote:

> When the resultant response is the following:
>
> <?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>
> <FindStreetResponse xmlns="http://www.mysite.com/webservices/postal/">
> <FindStreetResult>
> <StreetInfo>
> <Predirectional />
> <Street>Meadow St</Street>
> <Zip>15236</Zip>
> </StreetInfo>
> <StreetInfo>
> <Predirectional />
> <Street>Meadow Park Dr</Street>
> <Zip>15236</Zip></StreetInfo>
> <StreetInfo>
> <Predirectional />
> <Street>White Hampton Ln</Street>
> <Zip>15236</Zip>
> </StreetInfo>
> </FindStreetResult>
> </FindStreetResponse>
> </soap:Body>
> </soap:Envelope>
>
> How would I go about getting an array of StreetInfo? Any time I try
> to parse thru this, I either get errors or I get the last StreetInfo
> data.
>
> I've tried using foreach $e(@{$result->{StreetInfo}}) and a couple of
> other variants of that but nothing seems to be working. Anyone have
> any helpful ideas?
>
> I am using: use SOAP::Lite +trace => 'debug';
>
> If I could only get the raw XML and parse it myself it would be a lot
> easier.
>
>
>

#5969 From: "soapsod" <soapsod@...>
Date: Mon Jun 18, 2007 7:51 am
Subject: SOAP::Lite client for Axis WS
soapsod
Send Email Send Email
 
Hello,

perhaps I should mention that I'm not a web developer and only
preoccupy  myself with the Perl SOAP::Lite toolkit (at least so far)
because I was given the task to write a client for an Axis SOAP server.
As I am somewhat restricted to using Perl
(1st because this language I feel most comfortable with for getting a
nasty job quickly done, and 2nd because the client should run on an
hpux server where there isn't much choice for other bloating SOAP
toolkits)
SOAP::Lite appeared as a natural option.

Because I was provided with a WSDL file of the Axis WS
I prematurely thought this to be a fairly easy job by simply passing
the service() method the local location of my WSDL file's copy.

This soon proved to be a big mistake.

First of all my SOAP::Lite object simply rebuked my WSDL file and died.

Then it took me a whole day to merely tinker up some lousy SOAP
security header that the damned Axis server would accept for
authentication of my client for a rediculous GetVersionRequest.
I only managed this by some wild trial and error of nested and ugly
SOAP::Data constructs, with repetitive tcpdumps of the client server
communication.

Here comes my first question.
Is there any easier way to get a dump of the serialized XML displayed,
perhaps by some custom accessor or display method like known from LWP
than the circuitous packet sniffing?
I haven't found mentioning of such in the PODs of SOAP::Lite, nor
SOAP::Data, nor SOAP::Serializer.
In the Perl debugger I could only realize various SOAP::Data objrefs
where I rather would have liked to have seen some XML as would be sent
over the wire.

Now, I am despairing over how to correctly (for the Axis server)
serialize the aggregated object that I am supposed to pass as
parameters to the remote method calls that I am really interested in.

All the sample codes that I have found in various PODs and Howtos only
relate to rather trivial services (e.g. like those temperature
conversions) or concocted services with the emphasis rather on a Perl
SOAP::Lite server if any convoluted data structures are involved at all.

Are there any recipes how to "manually" translate the interface of the
WSDL file into valid XML through SOAP::Data or similar modules?

#5970 From: I.B. <ig3v10@...>
Date: Tue Jun 19, 2007 8:19 pm
Subject: SOAP::Lite and wsdl
ig3v10@...
Send Email Send Email
 
Hi,
i installed SOAP::Lite using cpan shell:
install SOAP::Lite

it compiled and build ok.
but following test from module documentation
silently failed, without printing out anything

   use SOAP::Lite;
   print SOAP::Lite
     -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
     -> getQuote('MSFT');


this is debug information (+trace):

SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x87d5968)
SOAP::Transport::HTTP::Client::send_receive: POST
http://services.xmethods.net/soap HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 675
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:xmethods-delayed-quotes#getQuote"

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
xmlns:namesp1="urn:xmethods-delayed-quotes"
xmlns:electric="http://www.themindelectric.com/"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.\
StockQuote/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><namesp1:getQuote><symbo\
l
xsi:type="xsd:string">MSFT</symbol></namesp1:getQuote></soap:Body></soap:Envelop\
e>
SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x87b9d00)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
Connection: close
Date: Tue, 19 Jun 2007 20:16:19 GMT
Server: Electric/1.0
Content-Length: 1359
Content-Type: text/xml
Client-Date: Tue, 19 Jun 2007 20:16:29 GMT
Client-Peer: 38.102.129.128:80
Client-Response-Num: 1
X-Cache: MISS from www.xmethods.net

<?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'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><soap:Body><soap:\
Fault><faultcode>soap:Server</faultcode><faultstring/><detail><e:electric-detail
xmlns:e='http://www.themindelectric.com/'><class>java.lang.NullPointerException<\
/class><message/><trace>java.lang.NullPointerException
         at electric.net.soap.http.SOAPHandler.getPath(SOAPHandler.java:128)
         at electric.net.soap.http.SOAPHandler.service(SOAPHandler.java:76)
         at electric.server.http.ServletServer.service(ServletServer.java:218)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at electric.net.servlet.Config.service(Config.java:182)
         at electric.net.http.HTTPContext.service(HTTPContext.java:118)
         at electric.net.servlet.Servlets.service(Servlets.java:47)
         at electric.net.http.WebServer.service(WebServer.java:127)
         at electric.net.tcp.TCPServer.run(TCPServer.java:145)
         at electric.net.tcp.Request.run(TCPServer.java:262)
         at electric.util.ThreadPool.run(ThreadPool.java:105)
         at java.lang.Thread.run(Thread.java:479)
</trace></e:electric-detail></detail></soap:Fault></soap:Body></soap:Envelope>
SOAP::Deserializer::deserialize: ()
SOAP::Parser::decode: ()




When i use my company wsdl, i am getting following message:

"Nothing to access. URL is not specified at
/usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm line 3360"

which is not clear for me. Why URL is expected if I have provided WSDL ?



thank you for any help.

Ig

#5971 From: I.B. <ig3v10@...>
Date: Wed Jun 20, 2007 1:12 am
Subject: Re: SOAP::Lite and wsdl
ig3v10@...
Send Email Send Email
 
it was a typo in 2nd case. but the main issue still remains - example
from documentation returns null pointer exception. is it only for me?


On 6/19/07, I. B. <ig3v10@...> wrote:
> Hi,
> i installed SOAP::Lite using cpan shell:
> install SOAP::Lite
>
> it compiled and build ok.
> but following test from module documentation
> silently failed, without printing out anything
>
>  use SOAP::Lite;
>  print SOAP::Lite
>    -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
>    -> getQuote('MSFT');
>
>
> this is debug information (+trace):
>
> SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x87d5968)
> SOAP::Transport::HTTP::Client::send_receive: POST
> http://services.xmethods.net/soap HTTP/1.1
> Accept: text/xml
> Accept: multipart/*
> Accept: application/soap
> Content-Length: 675
> Content-Type: text/xml; charset=utf-8
> SOAPAction: "urn:xmethods-delayed-quotes#getQuote"
>
> <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
> xmlns:namesp1="urn:xmethods-delayed-quotes"
> xmlns:electric="http://www.themindelectric.com/"
> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>
xmlns:tns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.\
StockQuote/"
>
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><namesp1:getQuote><symbo\
l
>
xsi:type="xsd:string">MSFT</symbol></namesp1:getQuote></soap:Body></soap:Envelop\
e>
> SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x87b9d00)
> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server
Error
> Connection: close
> Date: Tue, 19 Jun 2007 20:16:19 GMT
> Server: Electric/1.0
> Content-Length: 1359
> Content-Type: text/xml
> Client-Date: Tue, 19 Jun 2007 20:16:29 GMT
> Client-Peer: 38.102.129.128:80
> Client-Response-Num: 1
> X-Cache: MISS from www.xmethods.net
>
> <?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'
> xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
>
soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><soap:Body><soap:\
Fault><faultcode>soap:Server</faultcode><faultstring/><detail><e:electric-detail
>
xmlns:e='http://www.themindelectric.com/'><class>java.lang.NullPointerException<\
/class><message/><trace>java.lang.NullPointerException
>        at electric.net.soap.http.SOAPHandler.getPath(SOAPHandler.java:128)
>        at electric.net.soap.http.SOAPHandler.service(SOAPHandler.java:76)
>        at electric.server.http.ServletServer.service(ServletServer.java:218)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>        at electric.net.servlet.Config.service(Config.java:182)
>        at electric.net.http.HTTPContext.service(HTTPContext.java:118)
>        at electric.net.servlet.Servlets.service(Servlets.java:47)
>        at electric.net.http.WebServer.service(WebServer.java:127)
>        at electric.net.tcp.TCPServer.run(TCPServer.java:145)
>        at electric.net.tcp.Request.run(TCPServer.java:262)
>        at electric.util.ThreadPool.run(ThreadPool.java:105)
>        at java.lang.Thread.run(Thread.java:479)
> </trace></e:electric-detail></detail></soap:Fault></soap:Body></soap:Envelope>
> SOAP::Deserializer::deserialize: ()
> SOAP::Parser::decode: ()
>
>
>
>
> When i use my company wsdl, i am getting following message:
>
> "Nothing to access. URL is not specified at
> /usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm line 3360"
>
> which is not clear for me. Why URL is expected if I have provided WSDL ?
>
>
>
> thank you for any help.
>
> Ig
>

#5972 From: "Vijay Gopalakrishnan" <gvjay@...>
Date: Wed Jun 20, 2007 4:31 pm
Subject: Passing multiple arrays correctly
gvijay_bits
Send Email Send Email
 
Hi all,
I am new to SOAP::Lite and am trying to understand the "correct" way
of passing multiple array arguements from a client to a server.

I have the following arrays:
my @pIf     = qw(p1 p2 p3 p4 p5 p6);
my @bIf     = qw(b10 b20 b30);
my @bAs     = ();

I call the server function print_arr as
$soap_obj->print_arr(\@pIf, \@bIf, \@bAs);

On the server side, the function prints the arrays that are passed as
parameters using Data::Dumper. With SOAP::Lite ver 0.60(a) the output
on the server side is

$VAR1 = [
           'p1',
           'p2',
           'p3',
           'p4',
           'p5',
           'p6'
         ];
$VAR1 = [
           'b10',
           'b20',
           'b30'
         ];
$VAR1 = [];

With SOAP::Lite ver > 0.65, however, the output is
$VAR1 = [
           'p1',
           'p2',
           'p3',
           'p4',
           'p5',
           'p6',
           [
             'b10',
             'b20',
             'b30'
           ],
           []
         ];
$VAR1 = [
           'b10',
           'b20',
           'b30'
         ];
$VAR1 = [];

I would like to understand why there is the difference, what has
changed, and if I am doing something wrong.

Thanks,
Vijay

#5973 From: "martinh2osport" <martin@...>
Date: Thu Jun 21, 2007 10:02 pm
Subject: Re: SOAP::Lite and wsdl
martinh2osport
Send Email Send Email
 
It's ok for me,

:~# cat soapTest.pl
#!/usr/bin/perl

use SOAP::Lite;
print SOAP::Lite
-> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
-> getQuote('MSFT');

:~# ./soapTest.pl
30.22:~#

using debian;

perl 5.8.4

and the apt package on debian for soaplite

Source: soap-lite
Version: 0.60-2

Martin



--- In soaplite@yahoogroups.com, I.B. <ig3v10@...> wrote:
>
> it was a typo in 2nd case. but the main issue still remains - example
> from documentation returns null pointer exception. is it only for me?
>
>
> On 6/19/07, I. B. <ig3v10@...> wrote:
> > Hi,
> > i installed SOAP::Lite using cpan shell:
> > install SOAP::Lite
> >
> > it compiled and build ok.
> > but following test from module documentation
> > silently failed, without printing out anything
> >
> >  use SOAP::Lite;
> >  print SOAP::Lite
> >    -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
> >    -> getQuote('MSFT');
> >
> >
> > this is debug information (+trace):
> >
> > SOAP::Transport::HTTP::Client::send_receive:
HTTP::Request=HASH(0x87d5968)
> > SOAP::Transport::HTTP::Client::send_receive: POST
> > http://services.xmethods.net/soap HTTP/1.1
> > Accept: text/xml
> > Accept: multipart/*
> > Accept: application/soap
> > Content-Length: 675
> > Content-Type: text/xml; charset=utf-8
> > SOAPAction: "urn:xmethods-delayed-quotes#getQuote"
> >
> > <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
> > xmlns:namesp1="urn:xmethods-delayed-quotes"
> > xmlns:electric="http://www.themindelectric.com/"
> > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> >
xmlns:tns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.\
StockQuote/"
> >
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><namesp1:getQuote><symbo\
l
> >
xsi:type="xsd:string">MSFT</symbol></namesp1:getQuote></soap:Body></soap:Envelop\
e>
> > SOAP::Transport::HTTP::Client::send_receive:
HTTP::Response=HASH(0x87b9d00)
> > SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
Server Error
> > Connection: close
> > Date: Tue, 19 Jun 2007 20:16:19 GMT
> > Server: Electric/1.0
> > Content-Length: 1359
> > Content-Type: text/xml
> > Client-Date: Tue, 19 Jun 2007 20:16:29 GMT
> > Client-Peer: 38.102.129.128:80
> > Client-Response-Num: 1
> > X-Cache: MISS from www.xmethods.net
> >
> > <?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'
> > xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
> >
soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><soap:Body><soap:\
Fault><faultcode>soap:Server</faultcode><faultstring/><detail><e:electric-detail
> >
xmlns:e='http://www.themindelectric.com/'><class>java.lang.NullPointerException<\
/class><message/><trace>java.lang.NullPointerException
> >        at
electric.net.soap.http.SOAPHandler.getPath(SOAPHandler.java:128)
> >        at
electric.net.soap.http.SOAPHandler.service(SOAPHandler.java:76)
> >        at
electric.server.http.ServletServer.service(ServletServer.java:218)
> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >        at electric.net.servlet.Config.service(Config.java:182)
> >        at electric.net.http.HTTPContext.service(HTTPContext.java:118)
> >        at electric.net.servlet.Servlets.service(Servlets.java:47)
> >        at electric.net.http.WebServer.service(WebServer.java:127)
> >        at electric.net.tcp.TCPServer.run(TCPServer.java:145)
> >        at electric.net.tcp.Request.run(TCPServer.java:262)
> >        at electric.util.ThreadPool.run(ThreadPool.java:105)
> >        at java.lang.Thread.run(Thread.java:479)
> >
</trace></e:electric-detail></detail></soap:Fault></soap:Body></soap:Envelope>
> > SOAP::Deserializer::deserialize: ()
> > SOAP::Parser::decode: ()
> >
> >
> >
> >
> > When i use my company wsdl, i am getting following message:
> >
> > "Nothing to access. URL is not specified at
> > /usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm line 3360"
> >
> > which is not clear for me. Why URL is expected if I have provided
WSDL ?
> >
> >
> >
> > thank you for any help.
> >
> > Ig
> >
>

#5974 From: "martinh2osport" <martin@...>
Date: Thu Jun 21, 2007 10:21 pm
Subject: Re: SOAP::Lite and wsdl
martinh2osport
Send Email Send Email
 
Almost :-(

my main server is back now still debian but, perl 5.8.8 soaplite

ii  libsoap-lite-perl         0.69-1

from debug soap request that works;

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Bod\
y><namesp1:getQuote
xmlns:namesp1="urn:xmethods-delayed-quotes"><symbol
xsi:type="xsd:string">MSFT</symbol></namesp1:getQuote></SOAP-ENV:Body></SOAP-ENV\
:Envelope>

soap request that gets exception;

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
xmlns:namesp1="urn:xmethods-delayed-quotes"
xmlns:electric="http://www.themindelectric.com/"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.\
StockQuote/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><namesp1:getQuote><symbo\
l
xsi:type="xsd:string">MSFT</symbol></namesp1:getQuote></soap:Body></soap:Envelop\
e>

Not sure if this helps much,

Martin



--- In soaplite@yahoogroups.com, "martinh2osport" <martin@...> wrote:
>
>
> It's ok for me,
>
> :~# cat soapTest.pl
> #!/usr/bin/perl
>
> use SOAP::Lite;
> print SOAP::Lite
> -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
> -> getQuote('MSFT');
>
> :~# ./soapTest.pl
> 30.22:~#
>
> using debian;
>
> perl 5.8.4
>
> and the apt package on debian for soaplite
>
> Source: soap-lite
> Version: 0.60-2
>
> Martin
>
>
>
> --- In soaplite@yahoogroups.com, I.B. <ig3v10@> wrote:
> >
> > it was a typo in 2nd case. but the main issue still remains - example
> > from documentation returns null pointer exception. is it only for me?
> >
> >
> > On 6/19/07, I. B. <ig3v10@> wrote:
> > > Hi,
> > > i installed SOAP::Lite using cpan shell:
> > > install SOAP::Lite
> > >
> > > it compiled and build ok.
> > > but following test from module documentation
> > > silently failed, without printing out anything
> > >
> > >  use SOAP::Lite;
> > >  print SOAP::Lite
> > >    -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
> > >    -> getQuote('MSFT');
> > >
> > >
> > > this is debug information (+trace):
> > >
> > > SOAP::Transport::HTTP::Client::send_receive:
> HTTP::Request=HASH(0x87d5968)
> > > SOAP::Transport::HTTP::Client::send_receive: POST
> > > http://services.xmethods.net/soap HTTP/1.1
> > > Accept: text/xml
> > > Accept: multipart/*
> > > Accept: application/soap
> > > Content-Length: 675
> > > Content-Type: text/xml; charset=utf-8
> > > SOAPAction: "urn:xmethods-delayed-quotes#getQuote"
> > >
> > > <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
> > > xmlns:namesp1="urn:xmethods-delayed-quotes"
> > > xmlns:electric="http://www.themindelectric.com/"
> > > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > >
>
xmlns:tns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.\
StockQuote/"
> > >
>
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><namesp1:getQuote><symbo\
l
> > >
>
xsi:type="xsd:string">MSFT</symbol></namesp1:getQuote></soap:Body></soap:Envelop\
e>
> > > SOAP::Transport::HTTP::Client::send_receive:
> HTTP::Response=HASH(0x87b9d00)
> > > SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
> Server Error
> > > Connection: close
> > > Date: Tue, 19 Jun 2007 20:16:19 GMT
> > > Server: Electric/1.0
> > > Content-Length: 1359
> > > Content-Type: text/xml
> > > Client-Date: Tue, 19 Jun 2007 20:16:29 GMT
> > > Client-Peer: 38.102.129.128:80
> > > Client-Response-Num: 1
> > > X-Cache: MISS from www.xmethods.net
> > >
> > > <?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'
> > > xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
> > >
>
soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><soap:Body><soap:\
Fault><faultcode>soap:Server</faultcode><faultstring/><detail><e:electric-detail
> > >
>
xmlns:e='http://www.themindelectric.com/'><class>java.lang.NullPointerException<\
/class><message/><trace>java.lang.NullPointerException
> > >        at
> electric.net.soap.http.SOAPHandler.getPath(SOAPHandler.java:128)
> > >        at
> electric.net.soap.http.SOAPHandler.service(SOAPHandler.java:76)
> > >        at
> electric.server.http.ServletServer.service(ServletServer.java:218)
> > >        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >        at electric.net.servlet.Config.service(Config.java:182)
> > >        at
electric.net.http.HTTPContext.service(HTTPContext.java:118)
> > >        at electric.net.servlet.Servlets.service(Servlets.java:47)
> > >        at electric.net.http.WebServer.service(WebServer.java:127)
> > >        at electric.net.tcp.TCPServer.run(TCPServer.java:145)
> > >        at electric.net.tcp.Request.run(TCPServer.java:262)
> > >        at electric.util.ThreadPool.run(ThreadPool.java:105)
> > >        at java.lang.Thread.run(Thread.java:479)
> > >
>
</trace></e:electric-detail></detail></soap:Fault></soap:Body></soap:Envelope>
> > > SOAP::Deserializer::deserialize: ()
> > > SOAP::Parser::decode: ()
> > >
> > >
> > >
> > >
> > > When i use my company wsdl, i am getting following message:
> > >
> > > "Nothing to access. URL is not specified at
> > > /usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm line 3360"
> > >
> > > which is not clear for me. Why URL is expected if I have provided
> WSDL ?
> > >
> > >
> > >
> > > thank you for any help.
> > >
> > > Ig
> > >
> >
>

#5975 From: I.B. <ig3v10@...>
Date: Sat Jun 23, 2007 12:16 am
Subject: Re: Re: SOAP::Lite and wsdl
ig3v10@...
Send Email Send Email
 
Allright,
thank you for help. at least we narrowed it to my box only.
Example work from my another system.
 
On 6/21/07, martinh2osport <martin@...> wrote:


Almost :-(

my main server is back now still debian but, perl 5.8.8 soaplite

ii libsoap-lite-perl 0.69-1

from debug soap request that works;

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC=" http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ "
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:getQuote
xmlns:namesp1="urn:xmethods-delayed-quotes"><symbol
xsi:type="xsd:string">MSFT</symbol></namesp1:getQuote></SOAP-ENV:Body></SOAP-ENV:Envelope>

soap request that gets exception;

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
xmlns:namesp1="urn:xmethods-delayed-quotes"
xmlns:electric=" http://www.themindelectric.com/"
soap:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/ "
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/ "
xmlns:tns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/ "
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><namesp1:getQuote><symbol
xsi:type="xsd:string">MSFT</symbol></namesp1:getQuote></soap:Body></soap:Envelope>

Not sure if this helps much,

Martin



--- In soaplite@yahoogroups.com, "martinh2osport" <martin@...> wrote:
>
>
> It's ok for me,
>
> :~# cat soapTest.pl
> #!/usr/bin/perl
>
> use SOAP::Lite;
> print SOAP::Lite
> -> service(' http://www.xmethods.net/sd/StockQuoteService.wsdl')
> -> getQuote('MSFT');
>
> :~# ./soapTest.pl
> 30.22:~#
>
> using debian;
>
> perl 5.8.4
>
> and the apt package on debian for soaplite
>
> Source: soap-lite
> Version: 0.60-2
>
> Martin
>
>
>
> --- In soaplite@yahoogroups.com, I.B. <ig3v10@> wrote:
> >
> > it was a typo in 2nd case. but the main issue still remains - example
> > from documentation returns null pointer exception. is it only for me?
> >
> >
> > On 6/19/07, I. B. <ig3v10@> wrote:
> > > Hi,
> > > i installed SOAP::Lite using cpan shell:
> > > install SOAP::Lite
> > >
> > > it compiled and build ok.
> > > but following test from module documentation
> > > silently failed, without printing out anything
> > >
> > > use SOAP::Lite;
> > > print SOAP::Lite
> > > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl ')
> > > -> getQuote('MSFT');
> > >
> > >
> > > this is debug information (+trace):
> > >
> > > SOAP::Transport::HTTP::Client::send_receive:
> HTTP::Request=HASH(0x87d5968)
> > > SOAP::Transport::HTTP::Client::send_receive: POST
> > > http://services.xmethods.net/soap HTTP/1.1
> > > Accept: text/xml
> > > Accept: multipart/*
> > > Accept: application/soap
> > > Content-Length: 675
> > > Content-Type: text/xml; charset=utf-8
> > > SOAPAction: "urn:xmethods-delayed-quotes#getQuote"
> > >
> > > <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
> > > xmlns:namesp1="urn:xmethods-delayed-quotes"
> > > xmlns:electric="http://www.themindelectric.com/"
> > > soap:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"
> > > xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/"
> > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/ "
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > >
>
xmlns:tns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/ "
> > >
>
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><namesp1:getQuote><symbol
> > >
>
xsi:type="xsd:string">MSFT</symbol></namesp1:getQuote></soap:Body></soap:Envelope>
> > > SOAP::Transport::HTTP::Client::send_receive:
> HTTP::Response=HASH(0x87b9d00)
> > > SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
> Server Error
> > > Connection: close
> > > Date: Tue, 19 Jun 2007 20:16:19 GMT
> > > Server: Electric/1.0
> > > Content-Length: 1359
> > > Content-Type: text/xml
> > > Client-Date: Tue, 19 Jun 2007 20:16:29 GMT
> > > Client-Peer: 38.102.129.128:80
> > > Client-Response-Num: 1
> > > X-Cache: MISS from www.xmethods.net
> > >
> > > <?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'
> > > xmlns:soapenc=' http://schemas.xmlsoap.org/soap/encoding/'
> > >
>
soap:encodingStyle=' http://schemas.xmlsoap.org/soap/encoding/'><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring/><detail><e:electric-detail
> > >
>
xmlns:e=' http://www.themindelectric.com/'><class>java.lang.NullPointerException</class><message/><trace> java.lang.NullPointerException
> > > at
> electric.net.soap.http.SOAPHandler.getPath(SOAPHandler.java :128)
> > > at
> electric.net.soap.http.SOAPHandler.service(SOAPHandler.java:76)
> > > at
> electric.server.http.ServletServer.service(ServletServer.java:218)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at electric.net.servlet.Config.service(Config.java:182)
> > > at
electric.net.http.HTTPContext.service( HTTPContext.java:118)
> > > at electric.net.servlet.Servlets.service(Servlets.java:47)
> > > at electric.net.http.WebServer.service(WebServer.java:127)
> > > at electric.net.tcp.TCPServer.run(TCPServer.java:145)
> > > at electric.net.tcp.Request.run(TCPServer.java :262)
> > > at electric.util.ThreadPool.run(ThreadPool.java:105)
> > > at java.lang.Thread.run(Thread.java:479)
> > >
>
</trace></e:electric-detail></detail></soap:Fault></soap:Body></soap:Envelope>
> > > SOAP::Deserializer::deserialize: ()
> > > SOAP::Parser::decode: ()
> > >
> > >
> > >
> > >
> > > When i use my company wsdl, i am getting following message:
> > >
> > > "Nothing to access. URL is not specified at
> > > /usr/lib/perl5/site_perl/5.8.5/SOAP/ Lite.pm line 3360"
> > >
> > > which is not clear for me. Why URL is expected if I have provided
> WSDL ?
> > >
> > >
> > >
> > > thank you for any help.
> > >
> > > Ig
> > >
> >
>



#5976 From: "hug_rich" <hug_rich@...>
Date: Mon Jun 25, 2007 10:12 pm
Subject: Accessing SOAP Lite server thru WSDL
hug_rich
Send Email Send Email
 
I have a very simple question.  I have been successfully using SOAP
Lite with an older version .5x for some time.  The client is
implemented on unix using perl. The server side is on Windows 2000
using .5x. I am trying to bring up the client interface on a new
unix environment.  SOAP Lite .67 is installed on this machine.  I am
getting this error an cannot figure out how to get around it.

$soap = SOAP::Lite
      -> service(http://hhhh/ggg/ggg/xxxx.WSDL)
      -> Accept(hhh,hhh,hh,hh)

I get the following:

"use_prefix has been deprecated. If you wish to turn off or use on
the use of a default namespace, then please use either ns(uri) or
default_ns(uri) at ……./SOAP/Lite.pm line 858"

I have read the following:

uri and use_prefix deprecated in next release
I have seen a lot of support requests recently asking about setting
default namespaces and the like. As a result, I will be introducing
some changes to the API that I believe makes this task much more
intuitive. Of course, changing the API should not be done lightly,
especially to a subroutine like uri which is used by every
installation of SOAP::Lite on the planet - one way or another. So it
will be slowly phased out. So what are these changes, you ask?
First, there are two new subroutines added to SOAP::Serializer and
also made available through SOAP::Lite as a shortcut, they are:
default_ns() and ns(). They set the namespace URI of a request while
at the same time express how that namespace should be serialized -
either as a default namespace or as a declared namespace. Second, to
provide a more intuitive name, use_prefix is being deprecated in
favor of one of the aforementioned subroutines. Finally, uri() is
also being deprecated for similar reasons. It's name never did make
that much sense to me, and I am hoping that ns() is more intuitive.
Keep reading to see the man page entries for these new subroutines.
default_ns($uri) - Sets the default namespace for the request to the
specified uri. This overrides any previous namespace declaration
that may have been set using a previous call to ns() or default_ns
(). Setting the default namespace causes elements to be serialized
without a namespace prefix, like so:
   <soap:Envelope>
     <soap:Body>
       <myMethod xmlns="http://www.someuri.com">
         <foo />
       </myMethod>
     </soap:Body>
   </soap:Envelope>
ns($uri,$prefix=undef) - Sets the namespace uri and optionally the
namespace prefix for the request to the specified values. This
overrides any previous namespace declaration that may have been set
using a previous call to ns() or default_ns(). If a prefix is not
specified, one will be generated for you automatically. Setting the
namespace causes elements to be serialized with a namespace prefix,
like so:
   <soap:Envelope>
     <soap:Body>
       <my:myMethod xmlns:my="http://www.someuri.com">
         <my:foo />
       </my:myMethod>
     </soap:Body>
   </soap:Envelope>


I have tried various permutations using ns and/or default_ns with no
luck.  I can't figure out what I need to change since I am not using
the use_prefix or uri subroutines directly. Do I have a
compatibility issue between the server and client?

Any inputs would be appreciated.

#5977 From: "mail2ejik" <a.meliukstis@...>
Date: Tue Jun 26, 2007 6:08 am
Subject: Lost about SOAP::Lite
mail2ejik
Send Email Send Email
 
Hello everyone,
I'm lost about SOAP::Lite.

When I create a SOAP service via

my $service = SOAP::Lite -> service($wsdl_location);

sometimes I get SSL timeout error, so I think I need to increase
timeout.
But when I do create service via:

my $service = SOAP::Lite -> proxy( $wsdl_location, timeout =>
$many_seconds );

I get error from my SOAP server: "POST method is not supported".

I need to somehow solve this. Does anyone have any ideas?

-A.

#5978 From: "Enrique J." Hernández <quique@...>
Date: Tue Jun 26, 2007 7:57 am
Subject: Re: Lost about SOAP::Lite
quique_jh
Send Email Send Email
 
El mar, 26-06-2007 a las 06:08 +0000, mail2ejik escribió:
> Hello everyone,
> I'm lost about SOAP::Lite.
>
> When I create a SOAP service via
>
> my $service = SOAP::Lite -> service($wsdl_location);
>
> sometimes I get SSL timeout error, so I think I need to increase
> timeout.
> But when I do create service via:
>
> my $service = SOAP::Lite -> proxy( $wsdl_location, timeout =>
> $many_seconds );
>
> I get error from my SOAP server: "POST method is not supported".
>
> I need to somehow solve this. Does anyone have any ideas?
>
> -A.

Have you loaded the Crypt::SSLeay module and set the appropriate
certificates to establish SSL communication?

Best regards,

#5979 From: "dkindlund" <kindlund@...>
Date: Wed Jun 27, 2007 7:10 pm
Subject: SOAP4R v1.5.6 and SOAP::Lite v0.69
dkindlund
Send Email Send Email
 
I have a SOAP server running in ruby using SOAP4R v1.5.6 and a SOAP
client running in perl using SOAP::Lite v0.69.

When a SOAP4R client sends a "get_time()" request to the SOAP4R
server, it looks like:

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:Body>
    <n1:get_time xmlns:n1="urn:Blah"
        env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    </n1:get_time>
  </env:Body>
</env:Envelope>

In this case, valid data is passed back to the SOAP4R client.

However, here is the SOAP message that the SOAP::Lite client sends to
the SOAP4R ruby server:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <get_time xmlns="urn:Blah" xsi:nil="true" />
  </soap:Body>
</soap:Envelope>

In this case, I seem to be encountering the following generic error
message from the SOAP4R library:

    <env:Fault xmlns:n1="http://schemas.xmlsoap.org/soap/encoding/"
        env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <faultcode xsi:type="xsd:string">Server</faultcode>
      <faultstring xsi:type="xsd:string">not an RPC style</
faultstring>
      <faultactor xsi:type="xsd:string">SOAPServer::Server</
faultactor>
      <detail xmlns:n2="http://www.ruby-lang.org/xmlns/ruby/type/
custom"
          xsi:type="n2:SOAPException">
        <cause xmlns:n3="http://www.ruby-lang.org/xmlns/ruby/type/1.6"
            xsi:type="n3:SOAP..RPCRoutingError">
          <message xsi:type="xsd:string">not an RPC style</message>
          <backtrace xsi:type="n1:Array"
              n1:arrayType="xsd:anyType[19]">
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/soap/rpc/
router.rb:415:in `request_rpc&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/soap/rpc/
router.rb:391:in `call&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/soap/rpc/
router.rb:168:in `route&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/soap/rpc/
soaplet.rb:88:in `do_POST&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
httpservlet/abstract.rb:35:in `__send__&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
httpservlet/abstract.rb:35:in `service&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
httpserver.rb:104:in `service&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
httpserver.rb:65:in `run&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:173:in `start_thread&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:162:in `start&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:162:in `start_thread&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:95:in `start&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:92:in `each&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:92:in `start&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:23:in `start&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:82:in `start&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/soap/rpc/
httpserver.rb:123:in `run&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/logger.rb:
659:in `start&apos;</item>
            <item xsi:type="xsd:string">soap_server.rb:37</item>
          </backtrace>
        </cause>
        <excn_type_name xsi:type="xsd:string">SOAP..RPCRoutingError</
excn_type_name>
      </detail>
    </env:Fault>

It seems to be from SOAP4R being unable to validate the SOAP::Lite's
data as a valid SOAPStruct object.  Could you please tell me if there
is anything I can do to configure SOAP::Lite to send a valid
SOAPStruct object, as seen by SOAP4R?

To clarify, here is a copy of my test scripts:

--------------
soap_server.rb
--------------
require 'soap/rpc/standaloneServer'

class SOAPServer

  class Blah
    def get_time
        Time.now.to_s
    end
  end

  class Server < SOAP::RPC::StandaloneServer
    def on_init
      s = Blah.new
      add_method(s, 'get_time')
      puts "Server started"
    end
  end

  if __FILE__ == $0
    svr = Server.new('Server', 'urn:Blah', '0.0.0.0', 12321)
    trap('INT') { svr.shutdown }
    svr.start
  end

end

--------------
soap_client.rb
--------------
require 'soap/rpc/driver'

class SOAPClient
  proxy = SOAP::RPC::Driver.new('http://127.0.0.1:12321',
    'urn:Blah')

  proxy.add_method('get_time')
  puts "get_time() = #{proxy.get_time}\n\n"

end

--------------
soap_client.pl
--------------
#!/usr/bin/perl -w

use strict;
use warnings;
use Carp ();

# The on_action bit unsets the SOAPAction parameter
use SOAP::Lite
  +trace => 'all',
  on_action => sub { return }
;

print SOAP::Lite
    -> uri('urn:Blah')
    -> proxy('http://127.0.0.1:12321')
    -> call('get_time')
    -> result();
--------------

Calling soap_server.rb and soap_client.rb yields:
--------------
get_time() = Wed Jun 27 14:47:55 -0400 2007
--------------

Calling soap_server.rb and soap_client.pl yields:
--------------
SOAP::Transport::new: ()
SOAP::Serializer::new: ()
SOAP::Deserializer::new: ()
SOAP::Parser::new: ()
SOAP::Lite::new: ()
SOAP::Lite::new: ()
SOAP::Transport::HTTP::Client::new: ()
SOAP::Lite::call: ()
SOAP::Serializer::envelope: ()
SOAP::Serializer::envelope: get_time
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Transport::HTTP::Client::send_receive:
HTTP::Request=HASH(0x1044435c)
SOAP::Transport::HTTP::Client::send_receive: POST http://127.0.0.1:12321
HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 411
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://s
chemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/
XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soa
p/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/"><soap:Body><get_time xmlns="urn:Blah" xsi:nil="true" /></
soap:Body></soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive:
HTTP::Response=HASH(0x107aa608)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
Server Error
Connection: close
Date: Wed, 27 Jun 2007 18:48:24 GMT
Server: WEBrick/1.3.1 (Ruby/1.8.5/2006-08-25)
Content-Length: 3115
Content-Type: text/xml; charset="utf-8"
Client-Date: Wed, 27 Jun 2007 18:48:24 GMT
Client-Peer: 127.0.0.1:12321
Client-Response-Num: 1

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:Body>
    <env:Fault xmlns:n1="http://schemas.xmlsoap.org/soap/encoding/"
        env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <faultcode xsi:type="xsd:string">Server</faultcode>
      <faultstring xsi:type="xsd:string">not an RPC style</
faultstring>
      <faultactor xsi:type="xsd:string">SOAPServer::Server</
faultactor>
      <detail xmlns:n2="http://www.ruby-lang.org/xmlns/ruby/type/
custom"
          xsi:type="n2:SOAPException">
        <excn_type_name xsi:type="xsd:string">SOAP..RPCRoutingError</
excn_type_name>
        <cause xmlns:n3="http://www.ruby-lang.org/xmlns/ruby/type/1.6"
            xsi:type="n3:SOAP..RPCRoutingError">
          <message xsi:type="xsd:string">not an RPC style</message>
          <backtrace xsi:type="n1:Array"
              n1:arrayType="xsd:anyType[19]">
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/soap/rpc/
router.rb:415:in `request_rpc&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/soap/rpc/
router.rb:391:in `call&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/soap/rpc/
router.rb:168:in `route&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/soap/rpc/
soaplet.rb:88:in `do_POST&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
httpservlet/abstract.rb:35:in `__send__&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
httpservlet/abstract.rb:35:in `service&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
httpserver.rb:104:in `service&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
httpserver.rb:65:in `run&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:173:in `start_thread&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:162:in `start&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:162:in `start_thread&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:95:in `start&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:92:in `each&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:92:in `start&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:23:in `start&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/webrick/
server.rb:82:in `start&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/soap/rpc/
httpserver.rb:123:in `run&apos;</item>
            <item xsi:type="xsd:string">/usr/lib/ruby/1.8/logger.rb:
659:in `start&apos;</item>
            <item xsi:type="xsd:string">soap_server.rb:22</item>
          </backtrace>
        </cause>
      </detail>
    </env:Fault>
  </env:Body>
</env:Envelope>
SOAP::Deserializer::deserialize: ()
SOAP::Parser::decode: ()
SOAP::SOM::new: ()
SOAP::SOM::DESTROY: ()
SOAP::Transport::HTTP::Client::DESTROY: ()
SOAP::Lite::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Parser::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
--------------

Any additional help would be greatly appreciative.

Thanks,
-- Darien

Cross posted from:
http://groups.google.com/group/soap4r/browse_frm/thread/e6ef170c9a4e7857

#5980 From: "thomas.lochmatter" <thomas.lochmatter@...>
Date: Sun Jul 1, 2007 11:25 am
Subject: Dispatch to a class with a different name
thomas.lochm...
Send Email Send Email
 
In all SOAP::Lite examples I've seen, the class name was derived from the URL,
e.g. When
calling
  print SOAP::Lite
     -> proxy('http://services.soaplite.com/hibye.cgi')
     -> uri('http://www.soaplite.com/Demo')
     -> hi()
     -> result;
the method hi() of the class "Demo" is invoked.

Is there a way to configure SOAP::Lite to dispatch such requests to another
class? E.g.
     $server->dispatch_to({'Demo' => 'SomeClass'});
or even better
     $server->dispatch_to({'Demo' => $someInitializedObjectOfMyClass});
or at least
     $server->dispatch_to({'Demo' => 'MyNamespace::Demo'});

I'm having this problem in a project with several hundred classes where each
part of the
project lives in its own namespace. Hence all SOAP classes are supposed to be in
some
"ProjectNameAndVersion::SOAP::*" namespace.

Thanks,
Thomas

#5981 From: "Garz" <fgarzon@...>
Date: Sun Jul 1, 2007 11:18 pm
Subject: Re: Dispatch to a class with a different name
mx17f
Send Email Send Email
 
--- In soaplite@yahoogroups.com, "thomas.lochmatter"
<thomas.lochmatter@...> wrote:
>
> In all SOAP::Lite examples I've seen, the class name was derived
from the URL, e.g. When
> calling
>  print SOAP::Lite
>     -> proxy('http://services.soaplite.com/hibye.cgi')
>     -> uri('http://www.soaplite.com/Demo')
>     -> hi()
>     -> result;
> the method hi() of the class "Demo" is invoked.
>
> Is there a way to configure SOAP::Lite to dispatch such requests to
another class? E.g.
>     $server->dispatch_to({'Demo' => 'SomeClass'});
> or even better
>     $server->dispatch_to({'Demo' => $someInitializedObjectOfMyClass});
> or at least
>     $server->dispatch_to({'Demo' => 'MyNamespace::Demo'});
>

Have you looked into the dispatch_with method ? Here is a sample of my
code :


$server->dispatch_with
         ({ $MyClass::NS => new MyClass($cgi) ,
            $MyOtherClass::NS => new MyOtherClass($cgi),
            ....
          })->handle();

$MyClass::NS is a URL defining the SOAPAction header (at least its
beginning). It looks like "http://server/MyClass/1.0". I use the
version number as a way to support several versions of the API in the
future...
I've defined one Namespace for each of my classes, and
have only one cgi to handle them all.

So my SOAP client just needs to be called with ->uri($MyClass::NS) for
the calls to be dispatched to the correct class.

Hope this helps...

#5982 From: "Christian" <yahoo@...>
Date: Mon Jul 2, 2007 12:44 pm
Subject: Modify envelope-node attributes
spokathome
Send Email Send Email
 
Hi,

I was browsing the internet and the mailinglist for a while but could
not find any solution to the following problem:

I have my SOAP server running using soap lite. The problem is, that
old .NET clients have problems with the

"soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"

attribute included in the <soap:envelope/> node of the response message.

Is there a possibility to get rid of that attribute without patching
the module? I tried already some ways with writing my own serializer,
but non of my ideas worked out.

Any help would be appreciated,
Christian

#5983 From: Eric Bridger <eric@...>
Date: Thu Jul 5, 2007 6:48 pm
Subject: Re: Modify envelope-node attributes
ebridger2004
Send Email Send Email
 
It is possible but I can't find an example in my code.
See this link: http://www.majordojo.com/archives/2003_04.html#000009
which should get you started.

Eric

On Jul 2, 2007, at 8:44 AM, Christian wrote:

> Hi,
>
> I was browsing the internet and the mailinglist for a while but could
> not find any solution to the following problem:
>
> I have my SOAP server running using soap lite. The problem is, that
> old .NET clients have problems with the
>
> "soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>
> attribute included in the <soap:envelope/> node of the response
> message.
>
> Is there a possibility to get rid of that attribute without patching
> the module? I tried already some ways with writing my own serializer,
> but non of my ideas worked out.
>
> Any help would be appreciated,
> Christian
>
>
>

#5984 From: "shnuber" <shnuber@...>
Date: Fri Jul 6, 2007 10:21 pm
Subject: https and timeout
shnuber
Send Email Send Email
 
I have a webservice client that might/might not be able to access the
server, so getting timeout working is crucial. It seems to work fine
over regular http, but when i try and switch to use ssl https the
timeout feature doesn't timeout the SOAP call. Anyone else have this
problem, and know how to fix it?

my $soap = SOAP::Lite
   ->uri('urn:RegisterServer')
   ->proxy('https://' . $httpsURL, timeout => 5);

	 $soap->proxy->timeout(5);
	 $soap->transport->timeout(5);

#5985 From: "Thomas Eden" <thomas.eden@...>
Date: Fri Jul 6, 2007 11:31 pm
Subject: Re: https and timeout
teden
Send Email Send Email
 
Been using it with https no problem:

my $response = SOAP::Lite
->outputxml(1)
->proxy($config{url}, timeout => $config{timeout})
->uri($config{uri})
->call(blah-blah);

On 7/6/07, shnuber <shnuber@...> wrote:

I have a webservice client that might/might not be able to access the
server, so getting timeout working is crucial. It seems to work fine
over regular http, but when i try and switch to use ssl https the
timeout feature doesn't timeout the SOAP call. Anyone else have this
problem, and know how to fix it?

my $soap = SOAP::Lite
->uri('urn:RegisterServer')
->proxy('https://' . $httpsURL, timeout => 5);

$soap->proxy->timeout(5);
$soap->transport->timeout(5);



#5986 From: Ian Malpass <ian@...>
Date: Mon Jul 9, 2007 7:44 pm
Subject: SOAP::Lite serialisation differences between 0.60 and 0.69
ian_a_malpass
Send Email Send Email
 
I'm using MantisConnect[0] to connect my code to the Mantis bug-tracking
system[1]. The code I wrote works with 0.60, but fails with anything
newer, and I don't know why. I've looked in the changelog but nothing
obvious appeared.

I have, in the past, built complex data structures by using bless. I'm
assuming this isn't the right way to do things, but it works (or used
to) and it's a lot simpler than mucking with SOAP::Data and friends.

Below is a script that illustrates my approach and suffers from the
problem. (Apologies for the ugliness of the transport sub - I lost the
will to make it pretty.) The 'ObjectRef' blessed refs come from previous
method calls to extract data from Mantis, also using MantisConnect. The
WSDL file can be seen at
<http://www.futureware.biz/mantis/mc/mantisconnect.php?wsdl>.

I've also added the HTTP::Request that gets sent for 0.60 and 0.69. In
0.60, the request includes serialised data for the IssueData object as
expected. In 0.69, I get

      <issue xsi:nil="true" xsi:type="tns:IssueData" />

Any help, insight, pointers, etc. would be greatly appreciated.

Thanks,

Ian

----

# SOAP::Lite example script
use strict;
use warnings;
use Data::Dumper;
use SOAP::Lite ( +trace => [ transport => sub {
	 my $msg = Dumper $_[0];
          $msg =~ s|<|\n<|g;
          $msg =~ s|>|>\n|g;
          $msg =~ s|=>\n|=>|g;
          $msg =~ s|\n\n|\n|g;
          print STDERR "$msg\n------\n";
} ] );

my $issue = bless( {
      'priority' => bless(
          { 'name' => 'none', 'id' => '10' }, 'ObjectRef'
      ),
      'additional_information' => 'some additonal info',
      'project' => bless(
          { 'name' => 'Example', 'id' => '1', }, 'ObjectRef'
      ),
      'description' => 'a description',
      'summary' => 'a summary',
      'view_state' => bless(
          { 'name' => 'public', 'id' => '10' }, 'ObjectRef'
      ),
      'category' => 'Category A',
      'reproducibility' => bless(
          { 'name' => 'always', 'id' => '10' }, 'ObjectRef'
      ),
      'severity' => bless(
          { 'name' => 'feature', 'id' => '10' }, 'ObjectRef'
      )
}, 'IssueData' );

my $soap = SOAP::Lite
          ->service( 'http://localhost/mantis/mc/mantisconnect.php?wsdl' )
          ->xmlschema( 'http://www.w3.org/2001/XMLSchema' );
$issue = $soap->mc_issue_add( 'administrator', 'root', $issue );

----

# SOAP Lite 0.60

$VAR1 = bless( {
                   '_protocol' => 'HTTP/1.1',
                   '_content' => '
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:namesp2="http://namespaces.soaplite.com/perl"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<namesp1:mc_issue_add xmlns:namesp1="http://futureware.biz/mantisconnect">
<username xsi:type="xsd:string">
administrator
</username>
<password xsi:type="xsd:string">
root
</password>
<issue xsi:type="tns:IssueData">
<priority xsi:type="namesp2:ObjectRef">
<name xsi:type="xsd:string">
none
</name>
<id xsi:type="xsd:int">
10
</id>
</priority>
<additional_information xsi:type="xsd:string">
additonal info
</additional_information>
<project xsi:type="namesp2:ObjectRef">
<name xsi:type="xsd:string">
ATM
</name>
<id xsi:type="xsd:int">
1
</id>
</project>
<description xsi:type="xsd:string">
desc
</description>
<summary xsi:type="xsd:string">
sdfsdfd
</summary>
<view_state xsi:type="namesp2:ObjectRef">
<name xsi:type="xsd:string">
public
</name>
<id xsi:type="xsd:int">
10
</id>
</view_state>
<category xsi:type="xsd:string">
Category A
</category>
<reproducibility xsi:type="namesp2:ObjectRef">
<name xsi:type="xsd:string">
always
</name>
<id xsi:type="xsd:int">
10
</id>
</reproducibility>
<severity xsi:type="namesp2:ObjectRef">
<name xsi:type="xsd:string">
feature
</name>
<id xsi:type="xsd:int">
10
</id>
</severity>
</issue>
</namesp1:mc_issue_add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
',
                   '_uri' => bless( do{\(my $o =
'http://localhost/mantis/mc/mantisconnect.php')}, 'URI::http' ),
                   '_headers' => bless( {
                                          'soapaction' =>
'"http://localhost/mantis/mc/mantisconnect.php/mc_issue_add"',
                                          'content-type' => 'text/xml;
charset=utf-8',
                                          'accept' => [
                                                        'text/xml',
                                                        'multipart/*'
                                                      ],
                                          'content-length' => 1539
                                        }, 'HTTP::Headers' ),
                   '_method' => 'POST'
                 }, 'HTTP::Request' );

----

# SOAP::Lite 0.69

$VAR1 = bless( {
                   '_protocol' => 'HTTP/1.1',
                   '_content' => '
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:si="http://soapinterop.org/xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://futureware.biz/mantisconnect"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<tns:mc_issue_add>
<username xsi:type="xsd:string">
administrator
</username>
<password xsi:type="xsd:string">
root
</password>
<issue xsi:nil="true" xsi:type="tns:IssueData" />
</tns:mc_issue_add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
',
                   '_uri' => bless( do{\(my $o =
'http://persephone/mantis/mc/mantisconnect.php')}, 'URI::http' ),
                   '_headers' => bless( {
                                          'soapaction' =>
'"http://persephone/mantis/mc/mantisconnect.php/mc_issue_add"',
                                          'content-type' => 'text/xml;
charset=utf-8',
                                          'accept' => [
                                                        'text/xml',
                                                        'multipart/*',
                                                        'application/soap'
                                                      ],
                                          'content-length' => 764
                                        }, 'HTTP::Headers' ),
                   '_method' => 'POST'
                 }, 'HTTP::Request' );

----

[0] <http://www.futureware.biz/mantisconnect/>
[1] <http://www.mantisbt.org/>

#5987 From: "Robert Eden" <rmeden@...>
Date: Wed Aug 1, 2007 5:50 am
Subject: attribute name of "id"
rmeden
Send Email Send Email
 
Look at the following code...

    $subscr= SOAP::Data
         ->name("subscription")
         ->type("subscription")
         ->attr({ subscriptionProfile => "OpenEGP", id => "3" })
         ->value( \SOAP::Data->value(
               SOAP::Data->name("activationstatus" => 'A'),

The attribute with a name of "id" never shows up in the XML.  If I
change it do "idz" it does.

Is this a known issue?  Is there any way to get around it?

What if I use XML::Simple to generate my request... can I pass it to
the SOAP method?  I tried, but it HTMLizes it. (changes < to <)

Robert

#5988 From: rahed <raherh@...>
Date: Wed Aug 1, 2007 10:00 am
Subject: Re: attribute name of "id"
raherh
Send Email Send Email
 
On 8/1/07, Robert Eden <rmeden@...> wrote:

>  The attribute with a name of "id" never shows up in the XML.  If I
>  change it do "idz" it does.
>
>  Is this a known issue?  Is there any way to get around it?

id/href pair attributes are used in soap to define uniquely its entities.
So rename them (or qualifiy them into a namespace).

--
Radek

#5989 From: "Thomas Eden" <thomas.eden@...>
Date: Wed Aug 1, 2007 2:22 pm
Subject: Re: attribute name of "id"
teden
Send Email Send Email
 
You can use XML::Simple or any other XML generation tool you want. Just make sure you specify the SOAP::Data->type("xml")->value($myXML).

Thom Eden

On 8/1/07, Robert Eden <rmeden@...> wrote:

Look at the following code...

$subscr= SOAP::Data
->name("subscription")
->type("subscription")
->attr({ subscriptionProfile => "OpenEGP", id => "3" })
->value( \SOAP::Data->value(
SOAP::Data->name("activationstatus" => 'A'),

The attribute with a name of "id" never shows up in the XML. If I
change it do "idz" it does.

Is this a known issue? Is there any way to get around it?

What if I use XML::Simple to generate my request... can I pass it to
the SOAP method? I tried, but it HTMLizes it. (changes < to &lt)

Robert



#5990 From: rahed <raherh@...>
Date: Thu Aug 2, 2007 9:03 am
Subject: Re: attribute name of "id"
raherh
Send Email Send Email
 
> Sorry.... I'm new to SOAP, hacking my way through this... I can't rename it,
> so how do I qualify it into a namespace?

Something like this:

$soap = SOAP::Data->name(subscr=>\SOAP::Data->value(
             SOAP::Data->name(tag1=>10)->attr({'n1:id'=>1}),
             SOAP::Data->name(tag2=>20)->attr({'n2:id'=>2})
                                            )
                                            )->attr({'xmlns:n1'=>"myns1",
                                                        'xmlns:n2'=>"myns2",});

Here the namespaces myns1 and myns2 are declared within the parent
element subscr with prefixes n1 and n2. Id attributes are then
qualified into these namespaces.

HTH

--
Radek

#5991 From: Ian Harisay <imharisa@...>
Date: Thu Aug 16, 2007 10:52 pm
Subject: need help building a client from a wsdl
imharisa@...
Send Email Send Email
 
Hi,

hopefully someone can help me make this work.  I just don't see what I
am doing wrong here.  I have written my client in Java.  The Java code
is working.  I would really like to get this to work under perl instead.

Working Java code block:

private static final String END_POINT =
             "http://206.210.94.165/keystone/services/External?wsdl";


     public static void main(String args[]) {
         String USER_IDENTIFIER = "test_user_000000002";
         String ORG_CODE = "MY_COMPANY";
         String DIGEST = "";
         String PART_NUMBER = "10071";
         String PROGRAM = "fit_for_life";
         String SEED = "9f05343d89fec4";

         try {

             // Create the digest for security when communicating from
3rd Party
             // To the SenseWear Application.
             String stamp = AuthenticationHandler.createTimestamp();
             DIGEST = AuthenticationHandler.createDigest(stamp,
USER_IDENTIFIER, SEED);

             External service = new External_Impl(END_POINT);
             ExternalPortType port =
service.getExternalSOAP11Port_Http();
             ExternalCreateUser user = new ExternalCreateUser();

             user.setUser(USER_IDENTIFIER);
             user.setOrgCode(ORG_CODE);
             user.setDigest(DIGEST);
             user.setProgram(PROGRAM);
             user.setTimestamp(stamp);
             user.setSubscription(PART_NUMBER);

             ExternalCreateUserResponse c_Response =
port.externalCreate(user);

             if (c_Response.getReturn().booleanValue()) {
                 System.out.println("--External User Created-- ");
                 System.out.println("Error Code: " +
c_Response.getCode());
             } else {
                 System.out.println("--External Create Failure--");
                 System.out.println("Error Code: " +
c_Response.getCode());
             }

         } catch (Exception ex) {
             System.out.println("Unable to create the ExternalStub");
             ex.printStackTrace();
         }


Perl code that doesn't work (yet :)

use strict;
use Digest::MD5 qw(md5_hex);
use Data::Dumper;
use Time::CTime;
use SOAP::Lite;

my $seed         = '9f05343d89fec4';
my $org_code     = 'MY_COMPANY';
my $user         = 'bill_the_user'.$$;
my $subscription = '10071';
my $program      = 'fit_for_life';
my $timestamp    = get_timestamp();
my $digest       = get_digest();

print "Connecting to Bodymedia web services...\n";
my $response  = SOAP::Lite
   ->service('http://206.210.94.165/keystone/services/External?wsdl')
   ->externalCreate(
      'orgCode'      => $org_code,
      'user'         => $user,
      'program'      => 'fit_weight',
      'subscription' => '10071',
      'digest'       => $digest,
      'timestamp'    => $timestamp);

print Dumper($response);

sub get_digest {
   return md5_hex($timestamp.$user.$seed);
}

sub get_timestamp {
   return strftime('%Y-%m-%d %X' ,localtime(time));
}

Thanks for any help I can get

#5992 From: "robertatelastica" <robert.nicholson@...>
Date: Sun Aug 26, 2007 2:59 pm
Subject: Why does this code no longer work? AWS
robertatelas...
Send Email Send Email
 
my $aws_wsdl =
"http://ecs.amazonaws.com/AWSECommerceService/AWSECommerceService.wsdl";

   #Create a new SOAP::Lite instance, feeding it Amazon's WSDL
   my $aws_handle = SOAP::Lite->service("$aws_wsdl");

   my $request_complex_type = \SOAP::Data->value(
     SOAP::Data->name('ItemId')
     ->value($asin),
     SOAP::Data->name('IdType')
     ->value('ASIN'),
     SOAP::Data->name('Condition')
     ->value('All'),
     SOAP::Data->name('ResponseGroup')
     ->value('Large'));

   #my $itemlookup_request = SOAP::Data->value(
   #  SOAP::Data->name('SubscriptionId')
   #            ->value($subscription_id),
   #  SOAP::Data->name('Request')
   #            ->value($request_complex_type));

   my $itemlookup_request = SOAP::Data->value(
     SOAP::Data->name('MarketplaceDomain')
               ->value(''),
     SOAP::Data->name('SubscriptionId')
               ->value($subscription_id),
     SOAP::Data->name('Request')
               ->value($request_complex_type));

   my $results = $aws_handle->ItemLookup($itemlookup_request);

Anybody know why this results in

String value expected instead of SOAP::Data reference
  at /home/XXXXX/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm line 174

SOAP::XMLSchema1999::Serializer::as_string('SOAP::Serializer=HASH(0xa1a7158)',
'SOAP::Data=HASH(0x9aae9a0)', 'MarketplaceDomain', 'xs:string',
'HASH(0xa1abd44)') called at (eval
184)[/home/XXXXX/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm:2964] line 342

AWSECommerceService::_call('AWSECommerceService=HASH(0xa003b80)',
'ItemLookup', 'SOAP::Data=HASH(0x9aae9a0)') called at (eval
184)[/home/XXXXX/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm:2964] line 383
         AWSECommerceService::__ANON__[(eval
184)[/home/XXXXX/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm:2964]:384]('AWSECommerce\
Service=HASH(0xa003b80)',
'SOAP::Data=HASH(0x9aae9a0)') called at filter.pl line 1319
XXXXX

#5993 From: rahed <raherh@...>
Date: Tue Aug 28, 2007 1:06 pm
Subject: Re: Why does this code no longer work? AWS
raherh
Send Email Send Email
 
On 8/26/07, robertatelastica <robert.nicholson@...> wrote:

> my $aws_wsdl =
>  "http://ecs.amazonaws.com/AWSECommerceService/AWSECommerceService.wsdl";
>
>  #Create a new SOAP::Lite instance, feeding it Amazon's WSDL
>    my $aws_handle = SOAP::Lite->service("$aws_wsdl");

You want to call your service like this:

$aws_handle->ItemLookup(SOAP::Data->name('myname'=>\SOAP::Data->value(SOAP::Data\
->name('myothername'=>'somevalue'))));

Trim it to your requirements. Value of a name attribute must be a
string or a reference.

--
Radek

#5994 From: "Mandeep" <mandeep_chd@...>
Date: Tue Aug 28, 2007 4:01 pm
Subject: Does SOAP:Lite has dependency on perl version ??
mandeep_chd
Send Email Send Email
 
Hi Friends,

I am new to the group. I want to use SOAP:Lite.

On my linux host the current perl version is

v5.6.1 built for i686-linux

I have two questions:

1) if I install the SOAP::Lite package on my linux host..will it
work or it has some dependency on the perl version?

2) During installation, will the SOAP::Lite package overwrite any
existing perl packages or libraries ?

Your help is really appreciated.

Regards,
Mandeep

Messages 5965 - 5994 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