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...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 3259 - 3288 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#3259 From: "kiprop777" <kiprop777@...>
Date: Sun Jan 4, 2004 9:33 pm
Subject: Using WebService WDSL file--Help how to
kiprop777
Send Email Send Email
 
I am trying to develop a client for a broker service using SOAP::Lite.
I am testing their simple Echo() function so far with no success.
Appears that the WebService encoding is not  matching with
SOAP::Lite's default SOAP encoding. Here is the code I am using with
the service's WDSL file as well as the request and respose XML's

#!/usr/bin/perl -w
use strict;
use SOAP::Lite + trace => 'debug';
my $word='I am here today';
my $service = SOAP::Lite
     ->
service('http://api.efxnow.com/DEMOWebServices2.3/Service.asmx?WSDL')
     -> Echo(SOAP::Data->name("Message" => "$word")->type('xsd:string'));

print $service->call->faultstring if $service->call->fault;
exit;


<?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><Echo
xmlns=""><Message xsi:type="xsd:string">I am here
today</Message></Echo></SOAP-ENV:Body></SOAP-ENV:Envelope>

SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 (Internal
Server Error) Internal Server Error.
Cache-Control: private
Date: Sun, 04 Jan 2004 21:26:08 GMT
Server: Microsoft-IIS/6.0
Content-Length: 488
Content-Type: text/xml; charset=utf-8
Client-Date: Sun, 04 Jan 2004 21:26:14 GMT
Client-Peer: 12.161.223.47:80
Client-Response-Num: 1
MicrosoftOfficeWebServer: 5.0_Pub
X-AspNet-Version: 1.1.4322
X-Powered-By: ASP.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">
   <soap:Body>
     <soap:Fault>
       <faultcode>soap:Server</faultcode>
       <faultstring>Server was unable to process request. --> Object
reference not set to an instance of an object.</faultstring>
       <detail />
     </soap:Fault>
   </soap:Body>
</soap:Envelope>
Can't call method "call" on an undefined value at atest2 line 9.


How can I get this simple Echo() function to work. This will be key to
also getting the other services to work. Services which dont require
parameters such as GetTime() work just fine.
Thanks
Kip

#3260 From: "deepblah" <deepblah@...>
Date: Mon Jan 5, 2004 12:30 am
Subject: trace always on, even when I don't ask for it
deepblah
Send Email Send Email
 
Folks,

I've tried this on different machines (WinXP w/ ActivePerl 8xx; Linux
w/ Perl 5.8.2; WinXP w/ cygwin perl 5.8.2) with the same result.

Whether I just do 'use SOAP::Lite;' or 'use SOAP::Lite +trace => [qw
(fault)];' or any other way... it traces 'all' calls.

It's getting annoying now -- my script is almost done, and yet I
can't seem to be able to turn off the debugging output. And if I
redirect STDERR to /dev/null, I will not be able to use any 'warns'
or 'dies' -- at least, they won't be very useful. Redirecting STDERR
to a logfile doesn't help much, as it grows rather rapidly.

I am using v 0.55 on WinXP ActivePerl and v 0.60 on the other two
machines. Any ideas as to how I can silent the trace to only what I
want?

-SK.

#3261 From: "Byrne Reese" <byrne@...>
Date: Mon Jan 5, 2004 2:31 am
Subject: Re: trace always on, even when I don't ask for it
byrnereese
Send Email Send Email
 
That is very odd behavior. Are you using/requiring any Perl libraries
which might also 'use SOAP::Lite'? I ask because if a library turns on
debugging, then it will turn it on for all other scripts also using
SOAP::Lite.


> Folks,
>
> I've tried this on different machines (WinXP w/ ActivePerl 8xx; Linux
> w/ Perl 5.8.2; WinXP w/ cygwin perl 5.8.2) with the same result.
>
> Whether I just do 'use SOAP::Lite;' or 'use SOAP::Lite +trace =< [qw
> (fault)];' or any other way... it traces 'all' calls.
>
> It's getting annoying now -- my script is almost done, and yet I
> can't seem to be able to turn off the debugging output. And if I
> redirect STDERR to /dev/null, I will not be able to use any 'warns'
> or 'dies' -- at least, they won't be very useful. Redirecting STDERR
> to a logfile doesn't help much, as it grows rather rapidly.
>
> I am using v 0.55 on WinXP ActivePerl and v 0.60 on the other two
> machines. Any ideas as to how I can silent the trace to only what I
> want?
>
> -SK.
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
>
>   ADVERTISEMENT
>
>
>
>
>
>
>
>
>
> 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
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>
>
>
>


^byrne :/

#3262 From: "Byrne Reese" <byrne@...>
Date: Mon Jan 5, 2004 3:07 am
Subject: Re: new to soap, cant seem to get it right
byrnereese
Send Email Send Email
 
I could not agree with you more Tim.

I have considered documentation to be a real short-coming since I
started using SOAP::Lite. Luckily Randy J. Ray, the author of
the "Programming Web Services with Perl" book from Oreilly, has
volunteered (with permission from Oreilly of course) to reproduce a
large part of the aforementioned book in Perl POD format. It will not
be a carbon copy of the book, but will take the API documentation a
quantum-leap forward.

The sooner we can get a digital copy of that book, the sooner I can
start integrating it. I will ping Randy again to check his status on
this very important deliverable.

--- In soaplite@yahoogroups.com, Tim Wood <timwood0@p...> wrote:
> At 01:27 PM 12/30/03, opus23k wrote:
> >OK so I got some useful information from Jonathan:
> >---------
> >Take a look at http://soapenv.org/article.pl?
> >sid=02/02/11/1740229&mode=thread
> >
> >Also, see Byrne Reese's website.
> >http://majordojo.com/soaplite/
> >---------
> >
> >These sites have helped but I'm still having some trouble getting
> >this right.
> >
> >So you can see the XML I'm trying to generate...
>
> SOAPbox: There seems to be a meta-problem with SOAP::Lite that's
keeping from being as useful as it could be.  Basically I and others
are encountering fog where there should be a clear semantic model of
what SOAP::Lite APIs have what effect on which SOAP messages.
Clearly SOAP::Lite is a powerful package, but without a tutorial doc,
or at very least a Javadoc-style API spec, it's very difficult to
know how to use the package to get a desired result.
>
> The fact that we have to work at the level of SOAP message text and
reading the SOAP::Lite code in order to guess what to do is a red
flag.  The possible highest priority for SOAP::Lite development is
not more cool features but a comprehensive usage guide that covers
major distributed programming patterns.  Byrne's site has several
Perls which need to be edited and collected into a volume.  Ideally,
one should be able to design and implement a Web service (with
components in different languages/frameworks) without having to view
SOAP messages or the SOAP::Lite code.  The sooner SOAP becomes a
hidden implementation detail, the more productive we'll all be.
>
> Now back to your regularly scheduled hacking.
>
> TW

#3263 From: "deepblah" <deepblah@...>
Date: Mon Jan 5, 2004 4:13 am
Subject: Re: trace always on, even when I don't ask for it
deepblah
Send Email Send Email
 
Byrne,

That was it! I am using SOAP::Data::Builder, and it has 'use
SOAP::Lite ( +trace => all, maptype => {});' defined in
.../SOAP/Data/Builder.pm.

I should've known. Thanks a lot for the pointer.

-SK.

--- In soaplite@yahoogroups.com, "Byrne Reese" <byrne@m...> wrote:
> That is very odd behavior. Are you using/requiring any Perl libraries
> which might also 'use SOAP::Lite'? I ask because if a library turns on
> debugging, then it will turn it on for all other scripts also using
> SOAP::Lite.
>
>
> > Folks,
> >
> > I've tried this on different machines (WinXP w/ ActivePerl 8xx; Linux
> > w/ Perl 5.8.2; WinXP w/ cygwin perl 5.8.2) with the same result.
> >
> > Whether I just do 'use SOAP::Lite;' or 'use SOAP::Lite +trace =< [qw
> > (fault)];' or any other way... it traces 'all' calls.
> >
> > It's getting annoying now -- my script is almost done, and yet I
> > can't seem to be able to turn off the debugging output. And if I
> > redirect STDERR to /dev/null, I will not be able to use any 'warns'
> > or 'dies' -- at least, they won't be very useful. Redirecting STDERR
> > to a logfile doesn't help much, as it grows rather rapidly.
> >
> > I am using v 0.55 on WinXP ActivePerl and v 0.60 on the other two
> > machines. Any ideas as to how I can silent the trace to only what I
> > want?
> >
> > -SK.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Sponsor
> >
> >
> >   ADVERTISEMENT
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 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
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> >
> >
> >
> >
> >
> >
> >
>
>
> ^byrne :/

#3264 From: "Byrne Reese" <byrne@...>
Date: Mon Jan 5, 2004 5:31 am
Subject: Re: Need Suggestions To Pull Data From Active Process
byrnereese
Send Email Send Email
 
I might suggest, although I would appreciate other ideas and/or feedback,
to have the running process open up a socket that it listens on. This
socket could be used in conjunction with SOAP::Transport::TCP, or you
could spawn an HTTP daemon...

In any event, this port would be your mechanism for sharing data between
different perl processes. The other process would obviously be the client
to the process running the daemon.

> All:
>
> I have a SOAP client that pulls a hash (hash reference actually) from
> a remote SOAP server.  I can make this work currently if the hash data
> is generated in subroutine being called.  If I want to pull data from
> an already running process I'm assuming that I need to create a new
> SOAP module and pull the data from the already-running process into
> the new SOAP module.  I tried doing this with IPC::Shareable, but it
> appears that the shared memory doesn't like to get manipulated by a
> remote process.  Can somebody suggest the common techniques for
> pullling data from a pre-existing process via SOAP calls?
>
> I appreciate the suggestions.
>
> Steve
>
>
>
>
>
>
>
> 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
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>
>
>
>


^byrne :/

#3265 From: "Byrne Reese" <byrne@...>
Date: Mon Jan 5, 2004 3:22 pm
Subject: Re: Re: Problem with SOAP::Lite and DSML Client
byrnereese
Send Email Send Email
 
I am very surprised by this error. The on_action call should help you
construct whatever SOAP Action header you need.

$soap = SOAP::Lite->proxy(...)->uri(...);
$soap->on_action(sub { return 'oasis:names:tc:DSML:2:0:core' });

Or whatever. But a SOAP Action header must be a URI, so the colons proably
shouldn't be there as you suspect.

I might try something like:
$soap->on_action(sub { return 'oasis.names.tc.DSML.2.0.core#methodname' });

But that too looks like a really weird SOAP Action. I would expect you to
reference a java package name or something. 'oasis.names.tc.DSML.2.0.core'
seems too clunky.

>
>
>
>
> Using
>
>   -< on_action(sub{return})
>
> does not solve my problem, although I get a different error:
>
> javax.naming.CommunicationException: [SOAP: fault code SOAP-ENV:Client -
> Failed
> to access class (oasis:names:tc:DSML:2:0:core): syntax error at (eval
> 86) line 1, near "require oasis:"
> ]; remaining name 'objectclass=*'
>         at
>
com.sun.jndi.dsmlv2.soap.DsmlSoapClnt.mapSoapFaultToException(DsmlSoapClnt.java:\
505)
> .
> .
> .
>
> I guess this error has to do with the colons in the namespace
> (>batchRequest xmlns="urn:oasis:names:tc:DSML:2:0:core"?xml
> version='1.0' encoding='UTF-8'?soap-env:Envelope
>     xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"soap-env:BodybatchRequest
> xmlns="urn:oasis:names:tc:DSML:2:0:core"searchRequest
> dn="ou=hermes,o=gc,c=ca" scope="singleLevel"
>     derefAliases="neverDerefAliases" timeLimit="3600"
> sizeLimit="2000"
>     typesOnly="false"filterpresent
>
name="objectClass"//filter/searchRequest/batchRequest/soap-env:Body/soap-env:Env\
elope
>
>
>
>
> To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>
>
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>
>


^byrne :/

#3266 From: "Christopher Parker" <cparker@...>
Date: Mon Jan 5, 2004 3:42 pm
Subject: Complicated Web Service Solution
cparker15
Send Email Send Email
 
Hello all,

I was hoping maybe I would find some guidance on this list.

I'm building a Web service solution centered around SOAP::Lite. My
server is going to be an interface between the Web service's clients
and a SQL database and is written in Perl.

I am going to have one client also written in Perl that will be
consuming this Web service.

The rest of the clients are going to be written in Visual
Basic .NET... However, this aspect is not in the scope of this
message (or this group), so I won't be bugging you folks about this.

I'm still fairly new to SOAP, and perhaps some guidance of what my
first steps should be would be helpful.

I'm trying to make some custom classes (Project::Client and
Project::Server) to be self-contained. The less interfacing with
SOAP::Lite my actual client and server perl scripts do, the better.

Example client_test.pl:

my $cl = new Project::Client;
$cl->server("http://localhost/server.cgi");
$content = $cl->draw();
$cl->show($content);

My Project::Client would set up my SOAP::Lite object, my "server"
method in Project::Client would establish the connection to my SOAP
server using any necessary SOAP::Lite methods, etc... I've tried to
inherit SOAP::Lite in my sample class, and have been unsuccessful.

Example server.cgi:

my $srv = new Project::Server;
$srv->dbh
("localhost", "test_db", "test_tbl", "test_usr", "test_pass") or
die "Could not make database connection.";
$srv->dispatch();

Should I be going about this differently?

Thanks for your time.

--
Christopher Parker
cparker@...

#3267 From: "jpeyser" <jpeyser@...>
Date: Mon Jan 5, 2004 8:06 pm
Subject: Re: new to soap, cant seem to get it right
jpeyser
Send Email Send Email
 
Here are some methods that will help to generate the desired XML.

$soap
	 ->uri('urn:schemas-xmlsoap-org:soap:vl')
	 ->on_action(sub { return 'urn:schemas-xmlsoap-org:soap:vl' })
	 ->proxy('https://www.mywebsite.com/secure/SOAP.asp')
	 -> maptype({`elig' => 'www.mywebsite.com/secure/'})
	 -> autotype(0)
	 -> envprefix('SOAP')

However, there are a number of issues.

First, there are predefined schemas in SOAP::Lite that are placed in
the envelope; urn:schemas-xmlsoap-org:v1 is not one of them. So,
there is no way to put it in the envelope without hacking (See
SOAP::Constants)

Second, there is no reason to put it in the envelope as it will be
the default namespace for the method.

	 <namesp1:Batch xmlns:namesp1="urn:schemas-xmlsoap-
org:soap:vl">

Third, I have encountered ASP SOAP servers that do not like namespace
prefixes. The above line would have to be generated as

	 < Batch xmlns="urn:schemas-xmlsoap-org:soap:vl">

This can be accomplished by redefining SOAP::Serializer::gen_ns (THIS
IS A HACK)

BEGIN {
	 # no warnings 'redefine';
	 local($^W) = 0;
	 *SOAP::Serializer::gen_ns = sub {};
}

However, prefixes in SOAP::Lite are an important part of namespace
mapping as can be seen from the next issue. Suppressing the prefixes
will interfere with some mappings.

Lastly, the method maptype will add the namespace definition to the
envelope, provided that it is referenced in the XML. There is no
prefix `elig' for any method or element.

Jonathan

--- In soaplite@yahoogroups.com, "opus23k" <nihal@e...> wrote:
>
> So you can see the XML I'm trying to generate at the bottom of this
> message, but here's as close as I can get to that:
>
> <?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:Batch xmlns:namesp1="urn:schemas-xmlsoap-org:soap:vl">
>     <Transaction>
>       <MultipleRequestFlag xsi:type="xsd:string"/>
>     </Transaction>
>     <Transaction>

#3268 From: "nib000" <mwatson@...>
Date: Tue Jan 6, 2004 5:16 am
Subject: Problems getting envelope correct
nib000
Send Email Send Email
 
Heya.

  Having issues with a service, which requires the envelope to look like.

<soapenv:Envelope
	 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
	 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


The closest I can get is

<soapenv:Envelope
	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
	 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">


So the question really is, how can I suppress the entries for
  soapenv:encodingStyle
and
  xmlns:SOAP-ENC

here is the code I'm using at the moment.

my $soap = new SOAP::Lite()
       ->readable(1)
       ->xmlschema('http://www.w3.org/2001/XMLSchema')
       ->envprefix('soapenv')
       ->proxy($proxy,cookie_jar => $cookie_jar)
       ->uri($uri)
      ;

Any help on this would be greatly appreciated.

Regards
Matt Watson.

#3269 From: grant beattie <yahoo@...>
Date: Tue Jan 6, 2004 7:00 am
Subject: bidirectional over TCP/SSL?
gruntaaaa
Send Email Send Email
 
hi,

I'm new to SOAP::Lite, so far it looks nice ;) I do have a couple of
questions, however..

is it possible to have two-way communication over a single TCP
connection? are persistent TCP connections supported? and
non-blocking TCP in a single process?

are there any examples of using SSL with TCP clients? the very simple
server I have so far runs fine, but I can't seem to convince the
client to connect with SSL.

a related problem is that the server bombs when an SSL server accepts
a non-SSL connection, because the connection is torn down by the time
TCP.pm calls read(). this diff fixes it for me, but is probably not
the real fix:

--- TCP.pm.orig 2002-04-16 14:43:22.000000000 +1000
+++ TCP.pm 2004-01-06 17:55:14.000000000 +1100
@@ -206,6 +206,7 @@
    while (1) {
      my @ready = $session_set->wait($sock->timeout);
      for my $session (@ready) {
+      next if !$session;
        my $data;
        if (my $rc = $session->read($data, 4096)) {
          $data{$session} .= $data if $rc > 0;


any advice would be appreciated.

thanks,
grant.

#3270 From: Bruno Grossmann <samnrv@...>
Date: Tue Jan 6, 2004 1:26 pm
Subject: Re: Re: Problem with SOAP::Lite and DSML Client
samnrv
Send Email Send Email
 
Byrne,
Thanks for the feedback.
According to the DSML v2 documentation, the base URN
for DSMLv2 is oasis:names:tc:DSML:2:0:core; an example
request should look like

<batchRequest xmlns="oasis:names:tc:DSML:2:0:core">
<searchRequest>...</searchRequest>
</batchRequest>

Now, the presence of colons in the namespace is what
is causing problems to Lite.pm, in the subroutine
find_target at line

eval 'local $^W; ' . "require $class";

I temporarily modified the Lite.pm module to deal with
the colons in my particular case. However, if
namespaces with colons are valid (and if I am not
doing anything wrong), Lite.pm may have to be modified
to deal with these particular cases


  --- Byrne Reese <byrne@...> a écrit :
> I am very surprised by this error. The on_action
> call should help you
> construct whatever SOAP Action header you need.
>
> $soap = SOAP::Lite->proxy(...)->uri(...);
> $soap->on_action(sub { return
> 'oasis:names:tc:DSML:2:0:core' });
>
> Or whatever. But a SOAP Action header must be a URI,
> so the colons proably
> shouldn't be there as you suspect.
>
> I might try something like:
> $soap->on_action(sub { return
> 'oasis.names.tc.DSML.2.0.core#methodname' });
>
> But that too looks like a really weird SOAP Action.
> I would expect you to
> reference a java package name or something.
> 'oasis.names.tc.DSML.2.0.core'
> seems too clunky.
>
> >
> >
> >
> >
> > Using
> >
> >   -< on_action(sub{return})
> >
> > does not solve my problem, although I get a
> different error:
> >
> > javax.naming.CommunicationException: [SOAP: fault
> code SOAP-ENV:Client -
> > Failed
> > to access class (oasis:names:tc:DSML:2:0:core):
> syntax error at (eval
> > 86) line 1, near "require oasis:"
> > ]; remaining name 'objectclass=*'
> >         at
> >
>
com.sun.jndi.dsmlv2.soap.DsmlSoapClnt.mapSoapFaultToException(DsmlSoapClnt.java:\
505)
> > .
> > .
> > .
> >
> > I guess this error has to do with the colons in
> the namespace
> > (>batchRequest
> xmlns="urn:oasis:names:tc:DSML:2:0:core"?xml
> > version='1.0' encoding='UTF-8'?soap-env:Envelope
> >
>
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
> >
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >
>
xmlns:xsd="http://www.w3.org/2001/XMLSchema"soap-env:BodybatchRequest
> >
>
xmlns="urn:oasis:names:tc:DSML:2:0:core"searchRequest
> > dn="ou=hermes,o=gc,c=ca" scope="singleLevel"
> >     derefAliases="neverDerefAliases"
> timeLimit="3600"
> > sizeLimit="2000"
> >     typesOnly="false"filterpresent
> >
>
name="objectClass"//filter/searchRequest/batchRequest/soap-env:Body/soap-env:Env\
elope
> >
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > soaplite-unsubscribe@yahoogroups.com
> >
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to the Yahoo!
> Terms of Service.
> >
> >
> >
> >
> >
>
>
> ^byrne :/

__________________________________________________________
Lèche-vitrine ou lèche-écran ?
magasinage.yahoo.ca

#3271 From: "Byrne Reese" <byrne@...>
Date: Tue Jan 6, 2004 2:36 pm
Subject: Re: Re: new to soap, cant seem to get it right
byrnereese
Send Email Send Email
 
In the upcoming release of SOAP::Lite, one will be able to
programmatically turn namespace prefixing on/off. .NET for example wants
default namespaces to be used, as opposed to prefixes. In any event, this
capability is forthcoming.

>
>
>
>
> Here are some methods that will help to generate the desired XML.
>
> $soap
>       -
>
>
>
>
> 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
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>
>
>
>


^byrne :/

#3272 From: "Byrne Reese" <byrne@...>
Date: Tue Jan 6, 2004 2:59 pm
Subject: Re: Problems getting envelope correct
byrnereese
Send Email Send Email
 
I am not sure why you need to suppress these fields. If you are
calling a standard Web service, these values should be correct, and
furthermore, the precense of additional XML attributes should not
hurt anything at all.

--- In soaplite@yahoogroups.com, "nib000" <mwatson@p...> wrote:
> Heya.
>
>  Having issues with a service, which requires the envelope to look
like.
>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
>
> The closest I can get is
>
> <soapenv:Envelope
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>
	 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encodin
g/"
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>
>
> So the question really is, how can I suppress the entries for
>  soapenv:encodingStyle
> and
>  xmlns:SOAP-ENC
>
> here is the code I'm using at the moment.
>
> my $soap = new SOAP::Lite()
>       ->readable(1)
>       ->xmlschema('http://www.w3.org/2001/XMLSchema')
>       ->envprefix('soapenv')
>       ->proxy($proxy,cookie_jar => $cookie_jar)
>       ->uri($uri)
>      ;
>
> Any help on this would be greatly appreciated.
>
> Regards
> Matt Watson.

#3273 From: "Vimalan" <vimal_me@...>
Date: Thu Jan 8, 2004 1:35 pm
Subject: Webservice Security in SOAP::LITE
vimal_me
Send Email Send Email
 
hi all,
    i am new to web-services. I want to know that,
does soap::Lite supports XKMS(Xml based Key Management Specification).

It comes under the security issues to web-services. please help me to
find this. Apache releases Java based APIs for XML based signature
and Encryption, but my current system is in perl. so i need to do
that in perl. If any do this thing already in perl , please let me
know how to do that?

I need to return X509 certificate and CRLs to the clients.

-thanx
Vimal

#3274 From: Alex Dalitz <alexdalitz@...>
Date: Thu Jan 8, 2004 4:30 pm
Subject: Namespace differences on different platforms
alexdalitz
Send Email Send Email
 
Hello -

I have a Java server, with some Perl client code,
using the SOAP::Lite library. Running this code works
fine on Windows, but produces a different SOAP packet
from Solaris. I have the same SOAP::Lite version
(0.55) running on each, and am very surprised to get
the following differences :

DOS :
[SOAP, tcpConnection-8082-261, 01:08:04 09:57:55]
request for /MslTestWrapper
   <?xml version='1.0' encoding='UTF-8'?>
   <SOAP-ENV:Envelope
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/1999/XMLSchema'>
     <SOAP-ENV:Body>
       <namesp6:returnToken xmlns:namesp6='x'>
         <arg0
xmlns:ns='http://www.w3.org/2001/XMLSchema'
xsi:type='ns:string'>FU6Pf9asAvszlJJRLSeByfJ2Z0I=</arg0>
         <arg1
xmlns:ns='http://www.themindelectric.com/package/uk.nominet.msl.util/'
xsi:type='ns:SecurityToken'>
           <hash
xsi:type='xsd:string'>perlTestHash</hash>
         </arg1>
       </namesp6:returnToken>
     </SOAP-ENV:Body>
   </SOAP-ENV:Envelope>



Solaris:
[SOAP, tcpConnection-8082-265, 01:08:04 09:58:58]
request for /MslTestWrapper
   <?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>
       <namesp6:returnToken xmlns:namesp6='x'>
         <arg0
xsi:type='xsd:string'>/yuPKaiZZie9pr370SGt7HGxtMQ=</arg0>
         <arg1 xsi:type='n13:SecurityToken'>
           <hash
xsi:type='xsd:string'>perlTestHash</hash>
         </arg1>
       </namesp6:returnToken>
     </SOAP-ENV:Body>
   </SOAP-ENV:Envelope>


The difference is in the way that the argument types
are referenced.

Does anybody know why I get different results on
different platforms?

Are both the generated SOAP packets legal? [my Glue
server dies with NullPointerException on the Solaris
packet]

Does anyone know what I can do to get the same (legal)
behaviour?

Thanks loads for your help, in advance!



Alex.

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html

#3275 From: "norbu09" <lenz@...>
Date: Thu Jan 8, 2004 5:08 pm
Subject: soap call - fire and forget
norbu09
Send Email Send Email
 
hi,

is there any possibility to fire a soap call which returns immediatly,
a kind of fire an forget. the point is to trigger an other daemon to
do something, but if the daemon does not respond or is down or feels
somehow unconvenient the call has to return right in the moment to the
caller. some kind of UDP connection therefor would be perfect or is
there any other aproach to do that?

thanks for your input
lenz

#3276 From: Tim Wood <timwood0@...>
Date: Thu Jan 8, 2004 5:55 pm
Subject: Re: soap call - fire and forget
timwood0@...
Send Email Send Email
 
At 09:08 AM 01/08/04, you wrote:
>hi,
>
>is there any possibility to fire a soap call which returns immediatly,
>a kind of fire an forget. the point is to trigger an other daemon to
>do something, but if the daemon does not respond or is down or feels
>somehow unconvenient the call has to return right in the moment to the
>caller. some kind of UDP connection therefor would be perfect or is
>there any other aproach to do that?

This is done at the level of the remote API, by designating it a "notification"
rather than an RPC.  How you do that designation at deployment time (in the
WSDL) or at runtime is package-dependent and I have no idea how to in
SOAP::Lite.  But basically, it's a property of your API, not network level 4.
HTH,
TW

#3277 From: "techrg99" <bhess@...>
Date: Thu Jan 8, 2004 10:22 pm
Subject: Re: soap call - fire and forget
techrg99
Send Email Send Email
 
I have been trying to do something similar - in my case I want the end
user (thru a GUI) to be able to cancel the SOAP call - or at least
ignore what the call returns...  I think the issue is that since
SOAP::Lite is using LWP to perform the HTTP communication, the process
waits until a return or timeout.  Perhaps there is a way to configure
this???  I am experiementing with Perl 5.8.2 and using a separate
thread to make the SOAP call.  I have also seen ways to spawn another
process to make the call so the main process is not stuck waiting
around - for Win32 there is a good example in the O'reilly Programming
Perl/Tk Book that goes out and gets comics and displays them back in
the TK UI - this does not use SOAP, but does use LWP and the concepts
work the same...

#3278 From: Scott Ellsworth <scott@...>
Date: Fri Jan 9, 2004 12:13 am
Subject: How do I get the URI in a SOAP::Lite dispatcher?
scottalodar
Send Email Send Email
 
Hi, all,

How do I get to the URI in a handler method called from a mod_perl
server doing static dispatch to external classes?

I have a mod_perl-based SOAP server that calls some of my methods in a
few classes using SOAP::Lite 0.55.  It is working well, at least for
SOAP callers calling from Perl.  Unfortunately, every call requires the
user to send in a config_name parameter to tell it database passwords
and the like.  Since the config_name is determined entirely by the URI,
I want to remove it.  (Example: feature.alodar.com has the config_name
'feature', while client.foobar.com has the config_name 'client'.)

The problem?  I cannot figure out how to get the URI in my handler
method.

This is mod_perl based, and so in my httpd.conf, I have:
<Location /gbib-soap>
      SetHandler perl-script
      PerlHandler Alodar::GBIB::SOAPUtils
</Location>

Here is the complete Alodar::GBIB::SOAPUtils implementation.

package Alodar::GBIB::SOAPUtils;

require Exporter;

use strict;
use SOAP::Transport::HTTP;

our @ISA = qw(Exporter);

our @EXPORT_OK = qw(
      handler
);

sub handler {
    SOAP::Transport::HTTP::Apache -> dispatch_to(
        qw(
            Alodar::GBIB::ListUtils::get_public_lists
            Alodar::GBIB::UserUtils::get_user_ids_by_name
        )
    ) ->handler(@_)
}

1;

This works just great.

Once the config name is tweedled, the handler would then look something
like:

sub handler {
      my $hostname = something from the uri
      my $uri = something from the uri
      my %args = (
          config_name => get_configname_from_url(hostname => $hostname,
uri => $uri)
          @_, # push key-value pairs into args
      );

    SOAP::Transport::HTTP::Apache -> dispatch_to(
        qw(
            Alodar::GBIB::ListUtils::get_public_lists
            Alodar::GBIB::UserUtils::get_user_ids_by_name
        )
    ) ->handler(%args)
}

The problem?  I cannot figure out how to get the URI at this point.  Is
it available?  (Help that includes the proper perldoc to have figured
it out myself greatly appreciated - I am still learning this.)

Scott

#3279 From: "Byrne Reese" <byrne@...>
Date: Fri Jan 9, 2004 6:32 am
Subject: Re: Re: soap call - fire and forget
byrnereese
Send Email Send Email
 
I apologize to spam the group with something vaguely commercial, but I
feel this thread warrants it.

Grand Central is a Web Services network (technically, we call ourselves a
"Business Services Network" - but I am not going to mince words) - in any
event, Grand Central offers the ability to turn any SOAP call into an
asynchronous non-blocking one.

Most SOAP calls are synchronous in nature: socket opens, request is sent,
message is processes, response returned, socket closes. However, as this
threads suggests, not all SOAP calls follow this pattern. Sometimes you
just want to fire off a notification. Sometimes, the SOAP call is likely
to take a long time and hanging up a thread, or socket for that long is
impractical, sometimes you just want to fire and forget... Grand Central's
asynchronous messaging protocol can be used with any service deployed on
the network.

In a very small way you can think of GC as a proxy. In an asynchronous
scenario a message is posted to a service. The network accepts the
messages, and immediately returns a tracking number (used for the response
correlation later) to the sender. Mean while the message traverses the
system and is delivered to the utlimate destination (in some cases the
message is sent to multiple services when the service you are sending a
message to invokes a business process - we all heard of SOAP
intermediaries, Grand Central actually uses them!). When the response is
returned, it is held by Grand Central, and the user then polls for it,
much like you poll a POP3 mail server for email.

Grand Central is free as long as your bandwidth is less than 25MB per
month. And you have me as an excellent support resource. I have made sure
there are lots of Perl/SOAP::Lite examples on the GC developer site. :)

http://www.grandcentral.com/developers/

> I have been trying to do something similar - in my case I want the end
> user (thru a GUI) to be able to cancel the SOAP call - or at least
> ignore what the call returns...  I think the issue is that since
> SOAP::Lite is using LWP to perform the HTTP communication, the process
> waits until a return or timeout.  Perhaps there is a way to configure
> this???  I am experiementing with Perl 5.8.2 and using a separate
> thread to make the SOAP call.  I have also seen ways to spawn another
> process to make the call so the main process is not stuck waiting
> around - for Win32 there is a good example in the O'reilly Programming
> Perl/Tk Book that goes out and gets comics and displays them back in
> the TK UI - this does not use SOAP, but does use LWP and the concepts
> work the same...
>
>
>
>
>
>
>
> 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
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>
>
>
>


^byrne :/

#3280 From: Lenz Gschwendtner <gschwendtner@...>
Date: Fri Jan 9, 2004 9:33 am
Subject: Re: Re: soap call - fire and forget
norbu09
Send Email Send Email
 
Byrne Reese wrote:

>Grand Central is free as long as your bandwidth is less than 25MB per
>month. And you have me as an excellent support resource. I have made sure
>there are lots of Perl/SOAP::Lite examples on the GC developer site. :)
>
>
>

thanks for that but we are programming a time critical high volume
service so working with grand central in this place is not the thing
planned. i know grand central already but in our situation in the moment
there is no plan to use the services provided.

thanks for the info, but it is more essential for us in the moment to
know how to implement a "notification" in SOAP::Lite

lenz

--
~
~
~
~
".signature" [New] 4L, 8C [w]

#3281 From: Aaron Trevena <teejay@...>
Date: Fri Jan 9, 2004 9:53 am
Subject: Re: Re: soap call - fire and forget
ajt_stc
Send Email Send Email
 
On Fri, 9 Jan 2004, Lenz Gschwendtner wrote:
> thanks for that but we are programming a time critical high volume
> service so working with grand central in this place is not the thing
> planned. i know grand central already but in our situation in the moment
> there is no plan to use the services provided.
>
> thanks for the info, but it is more essential for us in the moment to
> know how to implement a "notification" in SOAP::Lite

It sounds like you need ebXML rather than plain SOAP.

ebXML Messaging (usually) runs on top of SOAP with Attachments - it
supports synchronous and asynchronous messaging, provides Reliability and
lots of powerful features that allow it to replace EDI.

It is a bit heavyweight, but if you are building an application that needs
those kind of features then it is justified and unavoidable.

as a side note (who on the list doesn't have something to plug?) :
I am looking for other perl developers interested in ebXML, we (a company
I won't name yet) have some perl modules / classes that implement enough
ebXML to hold brief (and often broken) conversations with the Hermes
(free) ebXML MSH (a free, compliant ebXML MSH implementation written in
Java) and hope to collaborate with others on getting it working better,
sooner.

cheers,

A.

--
Aaron J Trevena - Perl Hacker, Kung Fu Geek, Internet Consultant
AutoDia --- Automatic UML and HTML Specifications from Perl, C++
and Any Datasource with a Handler.     http://droogs.org/autodia

#3282 From: Alasdair Allan <aa@...>
Date: Fri Jan 9, 2004 11:33 am
Subject: Re: Re: soap call - fire and forget
dr_aallan
Send Email Send Email
 
> thanks for the info, but it is more essential for us in the moment to
> know how to implement a "notification" in SOAP::Lite

Well Grand Central is (just?) a broker implementating of something called
Contextual Web Services, the project I'm currently working on also makes
extensive use of them.

You should probably look at the WS-Coordination and WS-Transaction specs,
to see how transaction contexts are use to establish the scope of a
transaction within an operation is executed.

Al.

#3283 From: Bill Hess <bhess@...>
Date: Fri Jan 9, 2004 1:01 pm
Subject: Re: Re: soap call - fire and forget
techrg99
Send Email Send Email
 
Is SOAP::Lite capable of perform asynchronous messages by itself.  I
assume the default is synchronous?  And is this because of the way LWP
works?

One thing I notice in a system we have recently developed is that when
using is over a LAN it works great, except for the synchronous
interaction.  But when I run the system over a corporate VPN the
interaction is "choppy" - slower and not as consistent, but any
transaction always seems to finish OK.  Could this be a result of
SOAP::Lite or do you think it is the VPN?  I have used other commercial
client/sever type programs on this same VPN and some work fine (same as
being on the LAN) and others are "choppy" and some are downright
unreliable and fail.  Could this be a result of some of these systems
are synchronous/asynchronous?



Byrne Reese wrote:
> I apologize to spam the group with something vaguely commercial, but I
> feel this thread warrants it.
>
> Grand Central is a Web Services network (technically, we call ourselves a
> "Business Services Network" - but I am not going to mince words) - in any
> event, Grand Central offers the ability to turn any SOAP call into an
> asynchronous non-blocking one.
>
> Most SOAP calls are synchronous in nature: socket opens, request is sent,
> message is processes, response returned, socket closes. However, as this
> threads suggests, not all SOAP calls follow this pattern. Sometimes you
> just want to fire off a notification. Sometimes, the SOAP call is likely
> to take a long time and hanging up a thread, or socket for that long is
> impractical, sometimes you just want to fire and forget... Grand Central's
> asynchronous messaging protocol can be used with any service deployed on
> the network.
>
> In a very small way you can think of GC as a proxy. In an asynchronous
> scenario a message is posted to a service. The network accepts the
> messages, and immediately returns a tracking number (used for the response
> correlation later) to the sender. Mean while the message traverses the
> system and is delivered to the utlimate destination (in some cases the
> message is sent to multiple services when the service you are sending a
> message to invokes a business process - we all heard of SOAP
> intermediaries, Grand Central actually uses them!). When the response is
> returned, it is held by Grand Central, and the user then polls for it,
> much like you poll a POP3 mail server for email.
>
> Grand Central is free as long as your bandwidth is less than 25MB per
> month. And you have me as an excellent support resource. I have made sure
> there are lots of Perl/SOAP::Lite examples on the GC developer site. :)
>
> http://www.grandcentral.com/developers/
>
>
>>I have been trying to do something similar - in my case I want the end
>>user (thru a GUI) to be able to cancel the SOAP call - or at least
>>ignore what the call returns...  I think the issue is that since
>>SOAP::Lite is using LWP to perform the HTTP communication, the process
>>waits until a return or timeout.  Perhaps there is a way to configure
>>this???  I am experiementing with Perl 5.8.2 and using a separate
>>thread to make the SOAP call.  I have also seen ways to spawn another
>>process to make the call so the main process is not stuck waiting
>>around - for Win32 there is a good example in the O'reilly Programming
>>Perl/Tk Book that goes out and gets comics and displays them back in
>>the TK UI - this does not use SOAP, but does use LWP and the concepts
>>work the same...
>>
>>
>>
>>
>>
>>
>>
>>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
>>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>>
>>
>>
>>
>>
>>
>>
>
>
>
> ^byrne :/
>

#3284 From: "javasteve2002" <duncan.morton@...>
Date: Fri Jan 9, 2004 1:28 pm
Subject: Passing Perl complex types to java server
javasteve2002
Send Email Send Email
 
I am trying to pass a complex data type from a perl soap client to a
java soap server. It appears from past discussions on this topic that
the utility wsdl2perl is not complete, so the alternative is to
generate the datatype to match the wsdl.


Does anybody of an example of how the datatype is generated and how
it is passed to the server?

So far, I have created the datatype but I do not know how to pass
this to the server.


my $params =
SOAP::Data
->type('ns1:Person')
->name('id0' =>
\SOAP::Data->value(
SOAP::Data->name('firstname' => 'Duncan')->type('xsd:string'),
));

#3285 From: "Byrne Reese" <byrne@...>
Date: Fri Jan 9, 2004 2:50 pm
Subject: Re: Re: soap call - fire and forget
byrnereese
Send Email Send Email
 
Ok, so the million dollar question is:

"Is SOAP::Lite capable of performing asynchronous messaging by itself?"

The answer is yes, but not natively. There are two forms of asynchronous
messaging that I have seen:

1) A sends message to B. A transmits to B a port/socket (that A opens) for
the response to be sent to. When B is done processing the message, they
post their response to the port A designated. This port is the means of
correlating the response with the initial request. (BEA does something
similar to this I believe, but they also use a Conversation ID for
correlation as well, and if I am not mistaken, .NET does something like
this as well.)

This is known as a callback style of asynchronous messaging.

2) A sends message to B. B returns to A a Correlation ID. B polls A for
response using Correlation ID. (Of course this is the scenario that Grand
Central implements through its network because it's implementation it
doesn't depend upon the endpoint to actually comprehend ANY asynchronous
protocol.)

This is known as poll-based style of asynchronous messaging.

Here is the problem with 1) both asynch implementations that I know of are
proprietary protocols. It therefore requires that the server and client
both understand how to exchange messages, and correlate in this manner.

If I wanted to implement something like this in SOAP::Lite, I would
suggest implementing a CGI that could process returned responses. The
client would have to be able to generate a unique ID and trasmit it along
with the URL the CGI listens on to the service being called. The service
would then have to persist and return the correlation id provided by the
client, and post the response to the CGI/port designated by A.

I have actually implemented something like this, but again - it is highly
proprietary and therefore not very portable.

Asynchronous messaging is a highly desired feature enhancement for
SOAP::Lite, but I am not sure which standard to turn to for a COMPLETE
answer to the problem. WS-Correlation is only part of the problem - what
is the HTTP protocol?

As you


> Is SOAP::Lite capable of perform asynchronous messages by itself.  I
> assume the default is synchronous?  And is this because of the way LWP
> works?
>
> One thing I notice in a system we have recently developed is that when
> using is over a LAN it works great, except for the synchronous
> interaction.  But when I run the system over a corporate VPN the
> interaction is "choppy" - slower and not as consistent, but any
> transaction always seems to finish OK.  Could this be a result of
> SOAP::Lite or do you think it is the VPN?  I have used other commercial
> client/sever type programs on this same VPN and some work fine (same as
> being on the LAN) and others are "choppy" and some are downright
> unreliable and fail.  Could this be a result of some of these systems
> are synchronous/asynchronous?
>
>
>
> Byrne Reese wrote:
>> I apologize to spam the group with something vaguely commercial, but I
>> feel this thread warrants it.
>>
>> Grand Central is a Web Services network (technically, we call ourselves
>> a
>> "Business Services Network" - but I am not going to mince words) - in
>> any
>> event, Grand Central offers the ability to turn any SOAP call into an
>> asynchronous non-blocking one.
>>
>> Most SOAP calls are synchronous in nature: socket opens, request is
>> sent,
>> message is processes, response returned, socket closes. However, as this
>> threads suggests, not all SOAP calls follow this pattern. Sometimes you
>> just want to fire off a notification. Sometimes, the SOAP call is likely
>> to take a long time and hanging up a thread, or socket for that long is
>> impractical, sometimes you just want to fire and forget... Grand
>> Central's
>> asynchronous messaging protocol can be used with any service deployed on
>> the network.
>>
>> In a very small way you can think of GC as a proxy. In an asynchronous
>> scenario a message is posted to a service. The network accepts the
>> messages, and immediately returns a tracking number (used for the
>> response
>> correlation later) to the sender. Mean while the message traverses the
>> system and is delivered to the utlimate destination (in some cases the
>> message is sent to multiple services when the service you are sending a
>> message to invokes a business process - we all heard of SOAP
>> intermediaries, Grand Central actually uses them!). When the response is
>> returned, it is held by Grand Central, and the user then polls for it,
>> much like you poll a POP3 mail server for email.
>>
>> Grand Central is free as long as your bandwidth is less than 25MB per
>> month. And you have me as an excellent support resource. I have made
>> sure
>> there are lots of Perl/SOAP::Lite examples on the GC developer site. :)
>>
>> http://www.grandcentral.com/developers/
>>
>>
>>>I have been trying to do something similar - in my case I want the end
>>>user (thru a GUI) to be able to cancel the SOAP call - or at least
>>>ignore what the call returns...  I think the issue is that since
>>>SOAP::Lite is using LWP to perform the HTTP communication, the process
>>>waits until a return or timeout.  Perhaps there is a way to configure
>>>this???  I am experiementing with Perl 5.8.2 and using a separate
>>>thread to make the SOAP call.  I have also seen ways to spawn another
>>>process to make the call so the main process is not stuck waiting
>>>around - for Win32 there is a good example in the O'reilly Programming
>>>Perl/Tk Book that goes out and gets comics and displays them back in
>>>the TK UI - this does not use SOAP, but does use LWP and the concepts
>>>work the same...
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>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
>>>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> ^byrne :/
>>
>
>


^byrne :/

#3286 From: Bruno Grossmann <samnrv@...>
Date: Fri Jan 9, 2004 3:51 pm
Subject: Re: Problem with SOAP::Lite and DSML Client
samnrv
Send Email Send Email
 
Here is another solution I came up with to solve my
problem. The advantage of this one is that I can use
my script with the original Lite.pm module. However,
it is really cludgy, so I would appreciate any
comments on making it more robust.

#!/usr/bin/perl
use SOAP::Transport::HTTP;
#use MonSerialiseur;

SOAP::Transport::HTTP::CGI
# specify path to My/Examples.pm here
   -> deserializer(MonDeserialiseur->new)
   -> serializer(MonSerialiseur->new)
   -> dispatch_to('oasis')
   -> on_action(sub{return})
   -> handle();


BEGIN
{
   package MonSerialiseur;
   @MonSerialiseur::ISA='SOAP::Serializer';
   sub envelope
   {
     @bla=@_;

$bla[2]=SOAP::Data->name('batchResponse')->prefix('')->uri('urn:oasis:names:tc:D\
SML:2:0:core')
if $_[1] =~ /^(?:method|response)$/;
     @_=@bla;
     shift->SUPER::envelope(@_)
   }
   package MonDeserialiseur;
   @MonDeserialiseur::ISA='SOAP::Deserializer';
   sub decode_object
   {
     @bla=@_;
     if ((ref $bla[1] eq 'ARRAY')&&(${$bla[1]}[0] =~
/\w*:+batchRequest/))
     {
       foreach my $key (%{${$bla[1]}[1]})
       {
         ${${$bla[1]}[1]}{$key} =~
s/urn:oasis:names:tc:DSML:2:0:core/oasis/;
       }
     }
     @_=@bla;
     shift->SUPER::decode_object(@_)
   }
}

__________________________________________________________
Lèche-vitrine ou lèche-écran ?
magasinage.yahoo.ca

#3287 From: Scott Ellsworth <scott@...>
Date: Fri Jan 9, 2004 11:39 pm
Subject: Re: Re: Soaplite server, Axis client, no deserializer for SoapStruct
scottalodar
Send Email Send Email
 
Hi, Jonathan.

Thank you for the help.  I got a chance to try this again.  Your hint,
and a bit of mucking about, made things work the way I wanted them to.

The code:
      my %users = %{get_user_ids_by_name(config_name => $config_name)};

      my @entries = ();
      foreach my $username (sort keys %users){
          my $entry =
              SOAP::Data->name('mapItem' =>
                  \SOAP::Data->value(
                      SOAP::Data->name('key' => $username),
                      SOAP::Data->name('value' => $users{$username}),
                  )
              );
          $entries[$#entries+1]=$entry;
      }

      return SOAP::Data->value(
          SOAP::Data->name('map' =>
              \SOAP::Data->value(
                  @entries
              ),
          )->type('gbibns:map')->attr( { 'xmlns:gbibns' =>
'http://feature.alodar.com/Alodar/GBIB/' } ),
      );

successfully returns the XML:

<?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:typed_get_user_ids_by_nameResponse
xmlns:namesp1="http://feature.alodar.com/Alodar/GBIB/SOAPUtils">
			 <map xsi:type="gbibns:map"
xmlns:gbibns="http://feature.alodar.com/Alodar/GBIB/">
				 <mapItem>
					 <key xsi:type="xsd:string">
						 admin
					 </key>
					 <value xsi:type="xsd:int">
						 1
					 </value>
				 </mapItem>
				 <mapItem>
					 <key xsi:type="xsd:string">
						 guest
					 </key>
					 <value xsi:type="xsd:int">
						 2
					 </value>
				 </mapItem>
			 </map>
		 </namesp1:typed_get_user_ids_by_nameResponse>
	 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

required by the wsdl

	 <types>
		 <schema
			 xmlns="http://www.w3.org/2001/XMLSchema"
			 targetNamespace="http://feature.alodar.com/Alodar/GBIB/"
		 >
			 <!-- import namespace="http://schemas.xmlsoap.org/soap/encoding/" /
-->

			 <complexType name="mapItem">
				 <sequence>
					 <element name="key" nillable="true" type="anyType" />
					 <element name="value" nillable="true" type="anyType" />
				 </sequence>
			 </complexType>

			 <complexType name="map">
				 <sequence>
					 <element maxOccurs="unbounded" minOccurs="0" name="mapItem"
type="tns:mapItem" />
				 </sequence>
			 </complexType>
		 </schema>
	 </types>

I still have a number of issues to figure out, such as how to get a
perl example that can use this wsdl and the like, but this solves the
main problem I was running into.

Scott

#3288 From: "Jason" <jason@...>
Date: Mon Jan 12, 2004 4:24 pm
Subject: Perl client to Java web service
jcn37203
Send Email Send Email
 
I'm having a hard time writing a Perl client to my Java web service.

So far I've been able to access the service fine, the problem is when
one of my methods on the service requires a complex Java class as a
paramater. I have no idea how to go about passing something like that
via SOAP. Can someone point me to a tutorial, or even better, perhaps
show me what the SOAP request would look like? I'll include a very
simple Java class. If I could just see one good example of a Java
class represented in SOAP, using complex object types, I could figure
out my problem.


---

package my.java.package;

import java.util.Date;

public class ComplexClass
{
   private int intProperty = 0;
   private String stringProperty = null;
   private Date dateProperty = null;

   public void setIntProperty(int inInt)
   {
     intProperty = inInt;
   }

   public int getIntProperty()
   {
     return intProperty;
   }

   public void setStringProperty(String inString)
   {
     stringProperty = inString;
   }

   public String getStringProperty()
   {
     return stringProperty;
   }

   public void setDateProperty(Date inDate)
   {
     dateProperty = inDate
   }

   public Date getDate()
   {
     return dateProperty;
   }

}

Messages 3259 - 3288 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