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 4621 - 4650 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#4621 From: "Paul TBBle Hampson" <paul.hampson@...>
Date: Mon May 2, 2005 1:41 pm
Subject: Accessing HTTP Auth from a SOAP service
tbble
Send Email Send Email
 
I'm creating a SOAP service which I want to
username/password protect, against the database
the service modifies.

It seems to me that the easiest way to do this
would be to have access to the username/password
sent in by the client via HTTP basic auth
available somehow to the eventual perl functions.

However, I can't see any way to do this.

Have I missed something important, or am I trying
to do something impossible?

I'm on the Debian 0.60 package at the moment,
and using the mod_soap (Apache::SOAP mod_perl
handler) method to run, although I can change
that if needed. (I'd _rather_ run it through
Apache2 since I get access it's HTTPS setup
for free that way. ^_^)

#4622 From: Byrne Reese <byrne@...>
Date: Mon May 2, 2005 2:36 pm
Subject: Re: Accessing HTTP Auth from a SOAP service
byrnereese
Send Email Send Email
 
You can't do that in 0.60. Try 0.65.

But you could use mod_auth_mysql or my_auth_postgres which are Apache
plugins which will automatically do username/passsword lookups for you
from a set of Basic Auth credentials.

http://www.majordojo.com/archives/000636.php

Paul TBBle Hampson wrote:

> I'm creating a SOAP service which I want to
> username/password protect, against the database
> the service modifies.
>
> It seems to me that the easiest way to do this
> would be to have access to the username/password
> sent in by the client via HTTP basic auth
> available somehow to the eventual perl functions.
>
> However, I can't see any way to do this.
>
> Have I missed something important, or am I trying
> to do something impossible?
>
> I'm on the Debian 0.60 package at the moment,
> and using the mod_soap (Apache::SOAP mod_perl
> handler) method to run, although I can change
> that if needed. (I'd _rather_ run it through
> Apache2 since I get access it's HTTPS setup
> for free that way. ^_^)
>
>
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/soaplite/
>
>     * To unsubscribe from this group, send an email to:
>       soaplite-unsubscribe@yahoogroups.com
>       <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>

#4623 From: robert@...
Date: Mon May 2, 2005 8:04 pm
Subject: SOAP Document/RPC encoded?
robertatelas...
Send Email Send Email
 
I suspect my problem is because I'm using an older version of SOAP::Lite but can
anybody tell me if I'm using SOAP::Lite

$VERSION = sprintf("%d.%s", map {s/_//g; $_} q$Name: release-0_55-public $ =~
/-
(\d+)_([\d_]+)/)^M

should I expect the same level of support for

RPC/ENCODED

as

DOCUMENT/LITERAL

I already have a webserver that SOAP::Lite talks to in DOCUMENT/LITERAL
but whenever I try to call one using RPC/ENCODE I end up with a lot of
this sort of thing. ie. c-gensym[n] etc.

<arg0 xsi:type="namesp2:String"><c-gensym4
xsi:type="xsd:string">Risk</c-gensym4></arg0>

On the server I get an exception complaining that

Default encoding style is not supported by deserialization context

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

#4624 From: paul.hampson@...
Date: Tue May 3, 2005 1:27 am
Subject: Re: Accessing HTTP Auth from a SOAP service
tbble
Send Email Send Email
 
On Mon, May 02, 2005 at 07:36:03AM -0700, Byrne Reese wrote:
> You can't do that in 0.60. Try 0.65.

> But you could use mod_auth_mysql or my_auth_postgres which are Apache
> plugins which will automatically do username/passsword lookups for you
> from a set of Basic Auth credentials.

That wouldn't help, as I need to know which record it was that the
username/password identified.

> http://www.majordojo.com/archives/000636.php

This covers the client, but I need to do it in the server-side
functions, where I don't actually have any SOAP objects.

I can get the SOM by putting something in @ISA, but I can't see
how I can use that to get to the HTTP::Request.

> Paul TBBle Hampson wrote:
>
> >I'm creating a SOAP service which I want to
> >username/password protect, against the database
> >the service modifies.
> >
> >It seems to me that the easiest way to do this
> >would be to have access to the username/password
> >sent in by the client via HTTP basic auth
> >available somehow to the eventual perl functions.
> >
> >However, I can't see any way to do this.
> >
> >Have I missed something important, or am I trying
> >to do something impossible?
> >
> >I'm on the Debian 0.60 package at the moment,
> >and using the mod_soap (Apache::SOAP mod_perl
> >handler) method to run, although I can change
> >that if needed. (I'd _rather_ run it through
> >Apache2 since I get access it's HTTPS setup
> >for free that way. ^_^)
> >
> >
> >
> >
> >------------------------------------------------------------------------
> >*Yahoo! Groups Links*
> >
> >    * To visit your group on the web, go to:
> >      http://groups.yahoo.com/group/soaplite/
> >
> >    * To unsubscribe from this group, send an email to:
> >      soaplite-unsubscribe@yahoogroups.com
> >      <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
> >
> >    * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >      Service <http://docs.yahoo.com/info/terms/>.
> >
> >
>

--
Paul "TBBle" Hampson, on an alternate email client.

#4625 From: Chris Nielsen <chris@...>
Date: Tue May 3, 2005 2:06 am
Subject: namespace/nesting problem
zchris98119
Send Email Send Email
 
Hi all...
I didn't see this come to me from the list, so I'll try agian... If anyone
has a hint several people will be most appreciative!

The vast majority of Soap::Lite examples (all that I can recall) and other
details seem to always have the simple <SOAP-ENV:Body>  type tag. However,
it appears that my requirement is to modify that tag, and also to have 2
non-nested namespaces like this:

<SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:NS2="urn:SInfotype">
     <NS1:AppMeta xmlns:NS1="urn:WidgetsincWSRV">
         <metadata_a xsi:type="xsd:boolean">  </metadata_a>
         <metadata_b xsi:type="xsd:string">   </metadata_b>
         <AppDetail href="#1"/>
     </NS1:AppMeta>
     <NS2:AppDetail id="1" xsi:type="NS2:AppDetail">
         <app_param_a xsi:type="xsd:string"> </app_param_a>
         <app_param_b xsi:type="xsd:string"> </app_param_b>
     </NS2:AppDetail>
</SOAP-ENV:Body>

About the closest so far is something like this - the required
xmlns:NS2="urn:SInfotype" is not in the body tag, which I think has to do
with NS2 being *inside* NS1, which is not correct.

<SOAP-ENV:Body >
   <NS1:AppMeta xmlns:NS1="urn:WidgetsincWSRV" xmlns:NS2="urn:SInfotype" >
         <metadata_a xsi:type="xsd:boolean">  </metadata_a>
         <metadata_b xsi:type="xsd:boolean">  </metadata_b>
     <AppMeta_bogus>
      <NS2:AppDetail >
           <app_param_a xsi:type="xsd:string">    application data item 1
</app_param_a>
           <app_param_b xsi:type="xsd:string">    application data item 1
</app_param_b>
      </NS2:AppDetail>
     </AppMeta_bogus>
   </NS1:AppMeta>
</SOAP-ENV:Body>

This is sanitized somewhat of course, I hope I haven't introduced any
errors.

If anyone has ideas or knows if it is even possible to match control the
body tag, and un-nest the namespace elements, thanks for posting or
e-mailing ideas - or ideas on work arounds.

Thanks all...
-C



--
Christopher Nielsen    chris@...    http://ZORINco.com
______________________________________________________________
        Electronic Products  -  Consulting  -  Hosting

      C  O  N  T  R  O  L    Y  O  U  R    W  O  R  L  D

#4626 From: Byrne Reese <byrne@...>
Date: Tue May 3, 2005 2:14 am
Subject: Re: Accessing HTTP Auth from a SOAP service
byrnereese
Send Email Send Email
 
The same methods are available on the server. Simply instantiate an
instance of SOAP::Transport::HTTP::*, access the
http_request/http_response elements from that instance, and then make a
call to dispatch_to|with on that instance.

I make it sould so easy...

my $server = SOAP::Transport::HTTP::CGI->new;
my $req  = $server->http_request();
# do something
$server->dispatch_to(...);

paul.hampson@... wrote:

> On Mon, May 02, 2005 at 07:36:03AM -0700, Byrne Reese wrote:
> > You can't do that in 0.60. Try 0.65.
>
> > But you could use mod_auth_mysql or my_auth_postgres which are Apache
> > plugins which will automatically do username/passsword lookups for you
> > from a set of Basic Auth credentials.
>
> That wouldn't help, as I need to know which record it was that the
> username/password identified.
>
> > http://www.majordojo.com/archives/000636.php
>
> This covers the client, but I need to do it in the server-side
> functions, where I don't actually have any SOAP objects.
>
> I can get the SOM by putting something in @ISA, but I can't see
> how I can use that to get to the HTTP::Request.
>
> > Paul TBBle Hampson wrote:
> >
> > >I'm creating a SOAP service which I want to
> > >username/password protect, against the database
> > >the service modifies.
> > >
> > >It seems to me that the easiest way to do this
> > >would be to have access to the username/password
> > >sent in by the client via HTTP basic auth
> > >available somehow to the eventual perl functions.
> > >
> > >However, I can't see any way to do this.
> > >
> > >Have I missed something important, or am I trying
> > >to do something impossible?
> > >
> > >I'm on the Debian 0.60 package at the moment,
> > >and using the mod_soap (Apache::SOAP mod_perl
> > >handler) method to run, although I can change
> > >that if needed. (I'd _rather_ run it through
> > >Apache2 since I get access it's HTTPS setup
> > >for free that way. ^_^)
> > >
> > >
> > >
> > >
> >
> >------------------------------------------------------------------------
> > >*Yahoo! Groups Links*
> > >
> > >    * To visit your group on the web, go to:
> > >      http://groups.yahoo.com/group/soaplite/
> > >
> > >    * To unsubscribe from this group, send an email to:
> > >      soaplite-unsubscribe@yahoogroups.com
> > >      <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
> > >
> > >    * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > >      Service <http://docs.yahoo.com/info/terms/>.
> > >
> > >
> >
>
> --
> Paul "TBBle" Hampson, on an alternate email client.
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/soaplite/
>
>     * To unsubscribe from this group, send an email to:
>       soaplite-unsubscribe@yahoogroups.com
>       <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>

#4627 From: Robert Nicholson <robert@...>
Date: Tue May 3, 2005 2:16 am
Subject: Returning XML it's entity encoded.
robertatelas...
Send Email Send Email
 
Does anybody know why when I make a soap lite call to a document/
literal service why when it returns xml that xml comes back entity
encoded. I'm assuming it's entity encoded on the way back from the call?

#4628 From: "netstat" <netstat@...>
Date: Tue May 3, 2005 10:38 am
Subject: Google and SOAP
netstat
Send Email Send Email
 
I'm trying out the Google API with SOAPLite, what does the error
message mean below? Did I fail to include any module when I compiled
SOAPLite?

Service description 'file:./GoogleSearch.wsdl' can't be loaded: 501
Protocol scheme 'file' is not supported

#4629 From: Matthew <obc_spike@...>
Date: Tue May 3, 2005 2:44 pm
Subject: Setting the SOAP server uri
obc_spike
Send Email Send Email
 
In the SOAP Lite user guide (http://guide.soaplite.com/), you test many
examples against a remote server. However, I'd like to test these examples
locally. Where do I declare the server's URI in a perl server?

If I save the first example on my server:

   #!perl -w

   use SOAP::Transport::HTTP;

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

   package Demo;

   (etc...)

How should I reference it from the test script?

   #!perl -w

   use SOAP::Lite;

   print SOAP::Lite
     -> uri('?')
     -> proxy('http://localhost/hibye.cgi')
     -> hi()
     -> result;

Thanks for any help.

Matthew

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#4630 From: "kgoess" <kgoess@...>
Date: Wed May 4, 2005 12:29 am
Subject: expat parse error causes call stack corruption
kgoess
Send Email Send Email
 
We've just run into this problem using SOAP::Lite 0.60 on Apache
1.33 on Perl 5.8.6 using SOAP::Transport::HTTP::Apache and
dispatch_with handlers.

When our application receives a POST with malformed XML it returns a
soap fault with a "not well-formed (invalid token)" error from
XML::Parser.

But when the next hit comes in to that apache process, our method
call is given the parameters from the SOAP call we got *before* the
one with the bad xml.

So if the client hits our server with

mymethod('tiger','woods')
mymethod(junk xml ...)
mymethod('arnold','palmer')

our logs clearly show "arnold palmer" in the incoming xml, but our
function is called with "tiger woods".

Has anybody else seen this?  Is it a known problem?  Is there a
workaround?

#4631 From: "Jay A. Kreibich" <jak@...>
Date: Wed May 4, 2005 4:12 am
Subject: Re: Accessing HTTP Auth from a SOAP service
jaykreibich
Send Email Send Email
 
On Mon, May 02, 2005 at 01:41:13PM -0000, Paul TBBle Hampson scratched on the
wall:
> I'm creating a SOAP service which I want to
> username/password protect, against the database
> the service modifies.
>
> It seems to me that the easiest way to do this
> would be to have access to the username/password
> sent in by the client via HTTP basic auth
> available somehow to the eventual perl functions.

   I would actually say this isn't the way to do this.  You are mating
   application requirements (e.g. the need to have auth/auth info
   associated with the SOAP transaction) with the particular transport
   option (e.g. HTTP[S]).  Even if you never plan on supporting anything
   except HTTP[S], it is the wrong layer to be putting this information
   into.  If the auth/auth info is part of the SOAP transaction, it
   should be included in the SOAP message, and not the transport layer.

   There is also the issue that adding HTTP header information is
   difficult, if not impossible, with many existing SOAP libraries
   (SOAP::Lite not included).

   I would suggest you look at SOAP Headers, rather than HTTP headers.

    -j

--
                      Jay A. Kreibich | CommTech, Emrg Net Tech Svcs
                         jak@... | Campus IT & Edu Svcs
           <http://www.uiuc.edu/~jak> | University of Illinois at U/C

#4632 From: Juan Fco Rodriguez <jf.rodriguez@...>
Date: Wed May 4, 2005 7:14 am
Subject: Re: Google and SOAP
yonailo
Send Email Send Email
 
On Tue, 3 May 2005, netstat wrote:

>
>
> I'm trying out the Google API with SOAPLite, what does the error
> message mean below? Did I fail to include any module when I compiled
> SOAPLite?
>
> Service description 'file:./GoogleSearch.wsdl' can't be loaded: 501
> Protocol scheme 'file' is not supported

It means that the WSDL file coudn't be loaded, you can try
to access the file using HTTP instead.

Good luck.



>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> _____________________________________________________________________
> Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es
>

_____________________________________________________________________
Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es

#4633 From: NETSTAT <netstat@...>
Date: Wed May 4, 2005 7:46 am
Subject: Re: Google and SOAP
netstat
Send Email Send Email
 
Hi Juan!

I tried specifying the full path and it still gives me
the same error message.

Muchas gracias!



--- Juan Fco Rodriguez <jf.rodriguez@...>
wrote:
>
>
>
> On Tue, 3 May 2005, netstat wrote:
>
> >
> >
> > I'm trying out the Google API with SOAPLite, what
> does the error
> > message mean below? Did I fail to include any
> module when I compiled
> > SOAPLite?
> >
> > Service description 'file:./GoogleSearch.wsdl'
> can't be loaded: 501
> > Protocol scheme 'file' is not supported
>
> It means that the WSDL file coudn't be loaded, you
> can try
> to access the file using HTTP instead.
>
> Good luck.
>
>
>
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
_____________________________________________________________________
> > Mensaje analizado y protegido, tecnologia
> antivirus www.trendmicro.es
> >
>
>
_____________________________________________________________________
> Mensaje analizado y protegido, tecnologia antivirus
> www.trendmicro.es
>

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#4634 From: "damocalup" <damocalup@...>
Date: Wed May 4, 2005 8:49 am
Subject: Say good bye to prepaid calling cards!
damocalup
Send Email Send Email
 
Say good bye to prepaid calling cards!

No more spending money on calling cards, Earn free

Calling cards at our site using this link, Register, Login and earn
Free calling cards.

  http://tinyurl.com/3nxbu

#4635 From: "Merten Schumann" <merten.schumann@...>
Date: Wed May 4, 2005 12:31 pm
Subject: my client died with "Element 'xml' can't be allowed in valid XML message"
merten_schumann
Send Email Send Email
 
Hello,

just, if anyone else should run into this message ... It seems, for some
reason a method signature foo(String xml) cannot be processed in a
SOAP::Lite client. For me, it died with "Element 'xml' can't be allowed
in valid XML message". First I thought the String I'm trying to send
there (which is XML text) produced the problem. But it was the method
parameter name. So I renamed my method parameter and things work fine
:-)

    Merten

#4636 From: "obc_spike" <obc_spike@...>
Date: Wed May 4, 2005 2:55 pm
Subject: Re: Google and SOAP
obc_spike
Send Email Send Email
 
> > > I'm trying out the Google API with SOAPLite, what
> > does the error
> > > message mean below? Did I fail to include any
> > module when I compiled
> > > SOAPLite?
> > >
> > > Service description 'file:./GoogleSearch.wsdl'
> > can't be loaded: 501
> > > Protocol scheme 'file' is not supported
> >
> > It means that the WSDL file coudn't be loaded, you
> > can try
> > to access the file using HTTP instead.
> >
> > Good luck.

Please post your code that's trying to load the module. (Using wsdl is
a little different than proxies.)

Matthew

#4637 From: "obc_spike" <obc_spike@...>
Date: Wed May 4, 2005 2:57 pm
Subject: Re: Setting the SOAP server uri
obc_spike
Send Email Send Email
 
--- In soaplite@yahoogroups.com, Matthew <obc_spike@y...> wrote:
> In the SOAP Lite user guide (http://guide.soaplite.com/), you test many
> examples against a remote server. However, I'd like to test these
examples
> locally. Where do I declare the server's URI in a perl server?

I'll answer my own question here. If the package on the server is
called "Demo"...

>   package Demo;

You reference it this way from the test script (urn: + package name):

>   #!perl -w
>
>   use SOAP::Lite;
>
>   print SOAP::Lite
>     -> uri('urn:Demo')
>     -> proxy('http://localhost/hibye.cgi')
>     -> hi()
>     -> result;

Matthew

#4638 From: "obc_spike" <obc_spike@...>
Date: Wed May 4, 2005 3:23 pm
Subject: Question using .NET wsdl file in perl client
obc_spike
Send Email Send Email
 
I'm calling this service to test using a wsdl file in a perl client:

   #!/usr/bin/perl -w


   use strict;
   use SOAP::Lite +trace => "debug",
         service =>
'http://www.francisshanahan.com/TheHolyBible.asmx?wsdl';


   my $soap = ListBooks()->valueof("//BookTitle");


   print "$soap\n";

The debug trace shows the call being made (and the data coming back),
but the print statement gives an "unblessed reference" error.

Using this prints out the hash ID, so I know the object is stored:

   my $soap = ListBooks();

   print "$soap\n";

How do I bless this object to get at its data? I'm not a perl
sophisticate, so there could be something obvious I'm missing.

Matthew

#4639 From: "kyxssvdzhlbg" <kyxssvdzhlbg@...>
Date: Wed May 4, 2005 8:15 pm
Subject: Current Information
kyxssvdzhlbg
Send Email Send Email
 
Trust me it has never been easier to refinance your home loan at a better
interest rate saving you thousands. Check out this free service. 
http://allapprovelender.com take 30 seconds and fill out this free form

#4640 From: "yflai98006" <ying-fang.lai@...>
Date: Wed May 4, 2005 9:15 pm
Subject: How to download/install Crypt::SSLeay in Windows XP?
yflai98006
Send Email Send Email
 
Is this module what I need to access a https url?  I'm using
ActiveState Perl 5.8.6 build 811.  Here is the document I found in
ActivePerl which did not spell out the details how/where to get the
module.  Thanks for your help!

-------------------------------------------------------
For information about installing HTTPS support for your LWP
installation, see the helpful README.SSL file that comes in the libwww-
perl distribution.

Ying-Fang

#4641 From: "steve_f_maher" <steve_f_maher@...>
Date: Wed May 4, 2005 9:54 pm
Subject: Re: SOAP::Lite/.net interop
steve_f_maher
Send Email Send Email
 
I got this to work after adding

"xmlns:SOAP-ENC" => "http://schemas.xmlsoap.org/soap/encoding/"

in the last attr() clause.

Great example!

Steve

#4642 From: "kgoess" <kgoess@...>
Date: Wed May 4, 2005 11:59 pm
Subject: Re: expat parse error causes call stack corruption
kgoess
Send Email Send Email
 
It's a definite bug in 0.60 and 0.60a and I see it's been fixed in
0.65_3.

If a parse failure occurs the SOAP::Parser doesn't clear its state
before the next parse, so you're going to get the results of the
previous parse.

Below is the fix for 0.60a and demonstration code.


--- lib/SOAP/Lite.pm.orig       2005-05-04 16:52:00.810619056 -0700
+++ lib/SOAP/Lite.pm    2005-05-04 16:52:33.903588160 -0700
@@ -1283,21 +1283,28 @@
  sub decode { SOAP::Trace::trace('()');
    my $self = shift;

    $self->parser->setHandlers(
      Final => sub { shift; $self->final(@_) },
      Start => sub { shift; $self->start(@_) },
      End   => sub { shift; $self->end(@_)   },
      Char  => sub { shift; $self->char(@_)  },
      ExternEnt => sub { shift; die "External entity (pointing to
'$_[1]') is not allowed" },
    );
-  my $parsed = $self->parser->parse($_[0]);
+  #my $parsed = $self->parser->parse($_[0]);
+  #need to clear values on parse failure
+  my $parsed;
+  eval { $parsed = $self->parser->parse($_[0])};
+  if ($@) {
+      undef $self->{_values};
+  }
+
    return $parsed;
  }


-----------------------------------------
use SOAP::Lite;

package MySOAPServer;

sub myMethod {
     print "got '$_[1]'\n";
}

package main;

my $s = SOAP::Server->new-> dispatch_with(
     { 'urn:kgtest' => 'MySOAPServer',});

my $xml = <<EOL;
<Envelope>
     <Body>
         <namesp1:myMethod xmlns:namesp1="urn:kgtest">
             <delivery>tiger woods</delivery>
         </namesp1:myMethod>
     </Body>
</Envelope>
EOL

$s->handle($xml); #prints "got 'tiger woods'"

$s->handle('<junk><<');

$xml =~ s/tiger woods/arnold palmer/;

$s->handle($xml); #prints "got 'tiger woods'" *again*

#4643 From: paul.hampson@...
Date: Thu May 5, 2005 3:22 am
Subject: Re: Accessing HTTP Auth from a SOAP service
tbble
Send Email Send Email
 
On Tue, May 03, 2005 at 11:12:12PM -0500, Jay A. Kreibich wrote:
> On Mon, May 02, 2005 at 01:41:13PM -0000, Paul TBBle Hampson scratched on the
wall:
> > I'm creating a SOAP service which I want to
> > username/password protect, against the database
> > the service modifies.

> > It seems to me that the easiest way to do this
> > would be to have access to the username/password
> > sent in by the client via HTTP basic auth
> > available somehow to the eventual perl functions.

>   I would actually say this isn't the way to do this.  You are mating
>   application requirements (e.g. the need to have auth/auth info
>   associated with the SOAP transaction) with the particular transport
>   option (e.g. HTTP[S]).  Even if you never plan on supporting anything
>   except HTTP[S], it is the wrong layer to be putting this information
>   into.  If the auth/auth info is part of the SOAP transaction, it
>   should be included in the SOAP message, and not the transport layer.

>   There is also the issue that adding HTTP header information is
>   difficult, if not impossible, with many existing SOAP libraries
>   (SOAP::Lite not included).

>   I would suggest you look at SOAP Headers, rather than HTTP headers.

OK, fair point and well taken.

I've found the '@ISA' thing that lets me pop the SOM out of @_ at the
start of every function, so I'm guessing I just call ->headers on that,
and skip happily through that array until I find the custom headers
I've defined...

So I guess the main thing is, do I have to worry about namespace
clashes with other things using the SOAP Headers, or should I just define
my own namespace? Of course, I'm not too clear on how the latter works.
>_<

--
Paul "TBBle" Hampson, on an alternate email client.

#4644 From: "obc_spike" <obc_spike@...>
Date: Thu May 5, 2005 5:14 am
Subject: UPDATED Re: Question using .NET wsdl file in perl client
obc_spike
Send Email Send Email
 
After tinkering a bit with my perl client connecting to a .NET server, I have
this:

#!/usr/bin/perl -w

use strict;
use SOAP::Lite +trace=>'debug';

my $soap = SOAP::Lite
	 ->service('http://www.francisshanahan.com/TheHolyBible.asmx?wsdl')
	 ->ListBooks();

bless $soap, "SOAP::SOM";

for ($soap->valueof("//bible_content")) {
	 print $_->BookTitle, ' - ', $_->Book, "\n";
}

Examining the trace output shows the data is being passed back to $soap and the
bless
statement allows me to use valueof. However, the print statement shows nothing.
It
outputs one empty line and that's it. Any idea why I'm not getting to the data
in $soap?

Matthew

#4645 From: Duncan Cameron <duncan_cameron2002@...>
Date: Thu May 5, 2005 8:12 am
Subject: Re: UPDATED Re: Question using .NET wsdl file in perl client
duncan_camer...
Send Email Send Email
 
At 2005-05-05, 06:14:12 you wrote:

>After tinkering a bit with my perl client connecting to a .NET server,
I have this:
>
>#!/usr/bin/perl -w
>
>use strict;
>use SOAP::Lite +trace=>'debug';
>
>my $soap = SOAP::Lite
> ->service('http://www.francisshanahan.com/TheHolyBible.asmx?wsdl')
> ->ListBooks();
>
>bless $soap, "SOAP::SOM";
>
>for ($soap->valueof("//bible_content")) {
> print $_->BookTitle, ' - ', $_->Book, "\n";
>}
>
>Examining the trace output shows the data is being passed back to
$soap and the bless
>statement allows me to use valueof. However, the print statement shows
nothing. It
>outputs one empty line and that's it. Any idea why I'm not getting to
the data in $soap?
>
>Matthew
>
See this prior thread about using WSDL and getting the SOM object

http://groups.yahoo.com/group/soaplite/message/4445

Duncan









___________________________________________________________
Yahoo! Messenger - want a free and easy way to contact your friends online?
http://uk.messenger.yahoo.com

#4646 From: Duncan Cameron <duncan_cameron2002@...>
Date: Thu May 5, 2005 8:15 am
Subject: Re: How to download/install Crypt::SSLeay in Windows XP?
duncan_camer...
Send Email Send Email
 
At 2005-05-04, 22:15:01 you wrote:

>Is this module what I need to access a https url?  I'm using
>ActiveState Perl 5.8.6 build 811.  Here is the document I found in
>ActivePerl which did not spell out the details how/where to get the
>module.  Thanks for your help!
>
>-------------------------------------------------------
>For information about installing HTTPS support for your LWP
>installation, see the helpful README.SSL file that comes in the
libwww-
>perl distribution.
>
>Ying-Fang
>
Randy Kobes repository is usually a good place to look for ppms

http://theoryx5.uwinnipeg.ca

Duncan









___________________________________________________________
Yahoo! Messenger - want a free and easy way to contact your friends online?
http://uk.messenger.yahoo.com

#4647 From: NETSTAT <netstat@...>
Date: Thu May 5, 2005 8:41 am
Subject: Re: Re: Google and SOAP
netstat
Send Email Send Email
 
Hi Matt!

Here's the line that is giving me the problem. I tried
using http as suggested by somebody from this list and
it worked. I need to understand why it doesn't work
wit h "file"

my $googleSearch = SOAP::Lite ->
service('file:./GoogleSearch.wsdl');

Thank you!


> Please post your code that's trying to load the
> module. (Using wsdl is
> a little different than proxies.)
>
> Matthew
>
>
>



__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail

#4648 From: Duncan Cameron <duncan_cameron2002@...>
Date: Thu May 5, 2005 11:58 am
Subject: Re: Re: Re: Google and SOAP
duncan_camer...
Send Email Send Email
 
At 2005-05-05, 09:41:28 you wrote:

>Hi Matt!
>
>Here's the line that is giving me the problem. I tried
>using http as suggested by somebody from this list and
>it worked. I need to understand why it doesn't work
>wit h "file"
>
>my $googleSearch = SOAP::Lite ->
>service('file:./GoogleSearch.wsdl');
>
>Thank you!
It looks like you may have an old version of LWP::Protocol installed.
Do you have a file under the Perl directory
site/lib/LWP/Protocol/file.pm ?
If not, then you need to install the latest version of LWP.

Duncan








___________________________________________________________
Yahoo! Messenger - want a free and easy way to contact your friends online?
http://uk.messenger.yahoo.com

#4649 From: "obc_spike" <obc_spike@...>
Date: Thu May 5, 2005 2:13 pm
Subject: Re: Question using .NET wsdl file in perl client
obc_spike
Send Email Send Email
 
> See this prior thread about using WSDL and getting the SOM object
>
> http://groups.yahoo.com/group/soaplite/message/4445
>
> Duncan

Hi Duncan,

Thanks for your note. I've tested the example from that thread and it
works fine for validating a result or fault, but I'm still unable to
iterate a complex object (the .NET dataset). Here's what I have now:

#!/usr/bin/perl -w
use SOAP::Lite +trace=>'debug';
my $obj = SOAP::Lite
         ->
service('http://www.francisshanahan.com/TheHolyBible.asmx?wsdl');
my $books = $obj->ListBooks();
my $som = $obj->call;
unless ($som->fault) {
         print "result: ", $som->result, ' $books: ', $books, "\n";
         for ($books->valueof('//bible_content')) {
                 print $_->BookTitle, "\n";
         }
}

This is the output:

result: HASH(0x85a3174) $books: HASH(0x85a3174)
Can't call method "valueof" on unblessed reference at ./WSDLExample.pl
line 9.

The output verifies the $som->result and the original returned value
($books) are the same HASH ref, but trying to use $books gets the
unblessed error. Blessing it as a SOAP::SOM object removes the error,
but doesn't do anything in the for loop. Is there another step I'm
missing?

Matthew

#4650 From: Duncan Cameron <duncan_cameron2002@...>
Date: Thu May 5, 2005 2:33 pm
Subject: Re: Re: Question using .NET wsdl file in perl client
duncan_camer...
Send Email Send Email
 
At 2005-05-05, 15:13:47 you wrote:

>> See this prior thread about using WSDL and getting the SOM object
>>
>> http://groups.yahoo.com/group/soaplite/message/4445
>>
>> Duncan
>
>Hi Duncan,
>
>Thanks for your note. I've tested the example from that thread and it
>works fine for validating a result or fault, but I'm still unable to
>iterate a complex object (the .NET dataset). Here's what I have now:
>
>#!/usr/bin/perl -w
>use SOAP::Lite +trace=>'debug';
>my $obj = SOAP::Lite
>        ->
>service('http://www.francisshanahan.com/TheHolyBible.asmx?wsdl');
>my $books = $obj->ListBooks();
>my $som = $obj->call;
>unless ($som->fault) {
>        print "result: ", $som->result, ' $books: ', $books, "\n";
>        for ($books->valueof('//bible_content')) {
>                print $_->BookTitle, "\n";
>        }
>}
>
>This is the output:
>
>result: HASH(0x85a3174) $books: HASH(0x85a3174)
>Can't call method "valueof" on unblessed reference at ./WSDLExample.pl
>line 9.
>
>The output verifies the $som->result and the original returned value
>($books) are the same HASH ref, but trying to use $books gets the
>unblessed error. Blessing it as a SOAP::SOM object removes the error,
>but doesn't do anything in the for loop. Is there another step I'm
>missing?
>
>Matthew
>
You need to access everything through the som object. In your case it
looks like the return value from Listbooks() does not give you
everything that you want.
Does this work for you?

unless ($som->fault) {
         print "result: ", $som->result, ' $books: ', $books, "\n";
         for ($som->valueof('//bible_content')) {
                 print $_->BookTitle, "\n";
         }
}

Duncan









___________________________________________________________
Yahoo! Messenger - want a free and easy way to contact your friends online?
http://uk.messenger.yahoo.com

Messages 4621 - 4650 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