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 3395 - 3424 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#3395 From: "Maurice McCabe" <mmccabe@...>
Date: Wed Mar 3, 2004 5:22 am
Subject: RE: Returning a .NET DataSet to a .NET Client
orb_soft
Send Email Send Email
 
I got this working. I created a module I am calling DataSet.pm which
makes this possible. DataSet.pm contains the template for constucting
the XML for a .NET DataSet. It constructs the XML from hashes passed in
as parameters. These hashes were returned from the requested DBI
queries. SOAPLite returns it as a SOAP message. A .NET client displays
each DataSet table in a web page as a DataGrid (for example, using VB
code similar to below).

Anyone interested in this module (and the related WSDL file)?

Maurice


-----Original Message-----
From: Maurice McCabe [mailto:mmccabe@...]
Sent: Friday, February 27, 2004 4:56 PM
To: soaplite@yahoogroups.com
Subject: [soaplite] Returning a .NET DataSet to a .NET Client


Has anyone tried to return a .NET Dataset to a .NET client from a
SOAPLite server?

I want to be able to pass a list of queries from a .NET client and
receive a DataSet of tables for each query which I want to display as a
DataGrid on a web page.

For example, I want the code to look something like the following:

Dim mySOAPLiteServer as SOAPLiteServer = New SOAPLiteServer()
Dim myQueries as New HashTable()
myQueries("Authors") = "select * from Authors"
myQueries("Publishers") = "select * from Publishers"
Dim myDataSet as Dataset = mySOAPLiteServer.GetDataSet(myQueries)
myWebPageAuthorsDataGrid.DataSource =
myDataSet.Tables("Authors").DefaultView
myWebPageAuthorsDataGrid.DataBind()

Any ideas/suggestions?

Maurice




Yahoo! Groups Links

#3396 From: Chetan Lalye <clalye@...>
Date: Wed Mar 3, 2004 6:18 am
Subject: wsdl2perl ?
clalye
Send Email Send Email
 
Hi,
 
Is there is a distributable version of wsdl2perl ? I tried downloading from CVS and got errors that it could not find 'Template.pm'.  I have the beta version of soaplite 0.6 installed.
 
Chetan 

#3397 From: Paul Harman <paul.harman@...>
Date: Wed Mar 3, 2004 5:37 pm
Subject: Slow XPATH loops for parsing array of hashes
seancortan
Send Email Send Email
 
I'm writing a SOAP::Lite client trying to process the following response
"signature". Hopefully the names/types show what is going on:

  <SOAP-ENV:Body>
   <gv:getMultiNodeFieldsFromIDsResponse>
    <nodeInfo xsi:type="gv:VectorMapStringString">
     <item xsi:type="gv:MapStringString">
      <item xsi:type="gv:StringPair">
       <name></name>
       <value></value>
      </item>
     </item>
    </nodeInfo>
   </gv:getMultiNodeFieldsFromIDsResponse>
  </SOAP-ENV:Body>

Essentially what this is trying to model on perh terms is an array of
hashes: the "StringPair item" is a single hash entry, the "MapStringString
item" is a single hash, ans the "VectorMapStringString nodeInfo" represents
the array.

Having successfully used the xpath-based parser before, I thught I'd try it
again:

     my %storyFields;
     my $i=0;
     foreach my $a ($res->dataof("//nodeInfo/*"))
     {
         my ($name, $value);
         $i++;
         my $j=0;
         my %fields;
         foreach my $b ($res->dataof("//nodeInfo/[$i]/*"))
         {
             $j++;
             foreach my $c ($res->dataof("//nodeInfo/[$i]/[$j]/*"))
             {
                 $name=$c->value if($c->name eq "name");
                 $value=$c->value if($c->name eq "value");
             }
             $fields{$name}=$value if(defined($name) && defined($value));
         }
         my $id=$fields{id};
         foreach my $f (keys %fields)
         {
             print "->\t\t$id: $f\n";
             next if($f eq "id");
             $storyFields{$id}{$f}=$fields{$f};
         }
     }

...which works, but is *chronically* slow. Sticking "print" statements in
the above, I watch it taking about 2 seconds per item in the array... The
array contains approx 300 items, each hash contains 6 entries, one of which
can be a name-value pair where the value is 2k of text. Net result: one
rather large XML file that takes eons to parse.

I was wondering what optimisations on the above I can bring to bare. Using
trace() seems to show that $res->result is available very quickly, it's
simply going round these XPATH loops that's painfully slow.

Is there anything useful I can do with the $a and $b references that means I
can avoid the inner loops' XPATH expressions: i.e. can I not do something
like:

	 foreach my $a ($res->dataof("//nodeInfo/*"))
		 foreach my $b ($a->children)
			 foreach my $c ($b->children)
				 # add to my own hash here

Thanks for your help,

	 Paul


This E-Mail and any attachment is intended only for the person or entity for
which it is addressed and may contain confidential material. If you are not
the addressee or have received this E-Mail in error, please inform the
sender immediately and delete it from your computer. In addition, if you are
not the addressee or have received this E-Mail in error, any disclosure,
copying, distribution or any action taken or omitted to be taken in reliance
upon it is prohibited and may be unlawful.
If this E-Mail has been transmitted outside the ordinary course of its
business, the company for which the sender works accepts no liability for
any loss or damage suffered by any person arising from any use of or
reliance on information contained in this E-Mail, and any opinion expressed
in this E-Mail is personal to the sender and may not reflect the opinion of
such company. Although the network operator makes every reasonable effort to
keep its network free from viruses, neither the network operator nor the
sender or the company for which the sender works accepts any responsibility
for computer viruses transmitted through this E-Mail or any attachments; it
is your responsibility to virus scan this E-Mail and any attachments. Any
E-Mail reply to this address may be subject to interception or monitoring
for operational reasons or for lawful business practices.

#3398 From: "jozefn777" <jozefn777@...>
Date: Wed Mar 3, 2004 10:24 pm
Subject: Cannot encode '_cgi' element as 'hash'. Will be encoded as 'map' instead
jozefn777
Send Email Send Email
 
I keep getting the error in the subject as a warning. I do not
understand why.  I am returning other hashes within hashes in the
record return.

  '_cgi' => {   '.charset' => 'ISO-8859-1',
                '.parameters' => [],
                '.fieldnames' => ''
             },


Is this because of my .parameters => []?

The message keeps comming up - about 9 times.

Any ideas?  Thanks.

#3399 From: "lucprieur" <luc.prieur@...>
Date: Thu Mar 4, 2004 1:47 am
Subject: Very simple SOAP::Lite question
lucprieur
Send Email Send Email
 
Hi All,

I am trying to do a very simple thing... please help me, I really
don't know how to move forward (I have read all SOAP Lite docs,
guides, and books...with no answers)..

I am building a SOAP client. The client needs to send the following
data:

applicationID -> string
sessionID -> string
event ->
     eventID -> string
     description -> string

I do not know how to specify the "event" data element.. Please help
me!!


what I have now is:

#!perl -w

use SOAP::Lite;

use SOAP::Lite +trace => qw(result);

my $soap = SOAP::Lite
   -> uri('http://somewhere/wsdl/service/1.0')
   -> proxy('https:///somewhere/soap/1.0/');

my $result = $soap->authoriseApplicationEvent(
                      SOAP::Data->name(sessionID => 'rwr4rewr'),
                      SOAP::Data->name(applicationID => '650238'),
               ???       SOAP::Data->name('event')->value(???)
                  );

unless ($result->fault)
{
   print $result->result();
}
else
{
   print join ', ',
   $result->faultcode,
   $result->faultstring;
}


It seems to crap out on the line identified with ????

#3400 From: Todd Tyree <todd@...>
Date: Thu Mar 4, 2004 8:32 am
Subject: Re: Very simple SOAP::Lite question
todd@...
Send Email Send Email
 
Luc,

Try using ->call instead:

<example>
import SOAP::Data 'name';

print SOAP::Lite
     ->uri($endpoint)
     ->proxy($proxy)
     ->call(
            name('authoriseApplicationEvent')
            ->attr({'xmlns' => 'some namespace'}) # Optional
            =>(
               name('sessionID')->value($sessionID),
               name('applicationID')->value($applicationID),
	      '''
              )
           )
     ->result;
</example>

Also, if you're running against a .NET server, you'll almost certainly
have to set ->on_action.

Hope that helps,
Best,
Todd

lucprieur wrote:
> Hi All,
>
> I am trying to do a very simple thing... please help me, I really
> don't know how to move forward (I have read all SOAP Lite docs,
> guides, and books...with no answers)..
>
> I am building a SOAP client. The client needs to send the following
> data:
>
> applicationID -> string
> sessionID -> string
> event ->
>     eventID -> string
>     description -> string
>
> I do not know how to specify the "event" data element.. Please help
> me!!
>
>
> what I have now is:
>
> #!perl -w
>
> use SOAP::Lite;
>
> use SOAP::Lite +trace => qw(result);
>
> my $soap = SOAP::Lite
>   -> uri('http://somewhere/wsdl/service/1.0')
>   -> proxy('https:///somewhere/soap/1.0/');
>
> my $result = $soap->authoriseApplicationEvent(
>                      SOAP::Data->name(sessionID => 'rwr4rewr'),
>                      SOAP::Data->name(applicationID => '650238'),
>               ???       SOAP::Data->name('event')->value(???)
>                  );
>
> unless ($result->fault)
> {
>   print $result->result();
> }
> else
> {
>   print join ', ',
>   $result->faultcode,
>   $result->faultstring;
> }
>
>
> It seems to crap out on the line identified with ????
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

#3401 From: "Duncan Cameron" <duncan_cameron2002@...>
Date: Thu Mar 4, 2004 9:01 am
Subject: Re: Cannot encode '_cgi' element as 'hash'. Will be encoded as 'map' instead
duncan_camer...
Send Email Send Email
 
----- Original Message -----
From: "jozefn777" <jozefn777@...>
To: <soaplite@yahoogroups.com>
Sent: Wednesday, March 03, 2004 10:24 PM
Subject: [soaplite] Cannot encode '_cgi' element as 'hash'. Will be
encoded as 'map' instead


> I keep getting the error in the subject as a warning. I do not
> understand why.  I am returning other hashes within hashes in the
> record return.
>
>  '_cgi' => {   '.charset' => 'ISO-8859-1',
>                '.parameters' => [],
>                '.fieldnames' => ''
>             },
>
>
> Is this because of my .parameters => []?
>
When encoding a field SOAP::Lite uses the field name as the element
name. XML restricts the characters that can comprise an element name and
one rule is that a name
cannot begin with a dot (the initial character must be alphanumeric, _
or :).

Regards
Duncan Cameron

#3402 From: Todd Tyree <todd@...>
Date: Thu Mar 4, 2004 4:22 pm
Subject: Re: Very simple SOAP::Lite question
todd@...
Send Email Send Email
 
Hi Luc,

You're welcome.  Should be exactly like the previous example:

<example>
print SOAP::Lite
      ->uri($endpoint)
      ->proxy($proxy)
      ->call(
	    name('sessionID')->value(somevalue),
	    name('applicationID')->value(somevalue),
             name('event')
             =>(
                name('sessionID')->value(somevalue),
                name('description')->value(somevalue),
             '''
               )
            )
      ->result;
</example>

Turn +trace on to see exactly what you're sending, but I thing that will
do the job.

Best,
Todd

Luc Prieur wrote:
> Hi Todd,
>
>
>
> Thanks for the answer. However, I am still confused on how to specify
> the following data structure (the part in red).
>
>
>
> Many thanks again.
>
>
>
> <example>
>
>
>
> <sessionID>somestring</sessionID>
>
> <applicationID>somestring</applicationID>
>
> <event>
>
>   <eventID>somenumber</eventID>
>
>   <description>sometext</description>
>
> </event>
>
>
>
> </example>
>
>
>
> Luc Prieur
>
> Sales & Technology
>
> PhoneBox Entertainment Inc.
>
> Office: +1-450-979-5209
>
> Mobile: +1-514-994-6191
>
> www.phonebox-e.com
>
>
>
> -----Original Message-----
> *From:* Todd Tyree [mailto:todd@...]
> *Sent:* March 4, 2004 3:32 AM
> *To:* lucprieur
> *Cc:* soaplite@yahoogroups.com
> *Subject:* Re: [soaplite] Very simple SOAP::Lite question
>
>
>
> Luc,
>
> Try using ->call instead:
>
> <example>
> import SOAP::Data 'name';
>
> print SOAP::Lite
>     ->uri($endpoint)
>     ->proxy($proxy)
>     ->call(
>            name('authoriseApplicationEvent')
>            ->attr({'xmlns' => 'some namespace'}) # Optional
>            =>(
>               name('sessionID')->value($sessionID),
>               name('applicationID')->value($applicationID),
>            '''
>              )
>           )
>     ->result;
> </example>
>
> Also, if you're running against a .NET server, you'll almost certainly
> have to set ->on_action.
>
> Hope that helps,
> Best,
> Todd
>
> lucprieur wrote:
>>  Hi All,
>>
>>  I am trying to do a very simple thing... please help me, I really
>>  don't know how to move forward (I have read all SOAP Lite docs,
>>  guides, and books...with no answers)..
>>
>>  I am building a SOAP client. The client needs to send the following
>>  data:
>>
>>  applicationID -> string
>>  sessionID -> string
>>  event ->
>>     eventID -> string
>>     description -> string
>>
>>  I do not know how to specify the "event" data element.. Please help
>>  me!!
>>
>>
>>  what I have now is:
>>
>>  #!perl -w
>>
>>  use SOAP::Lite;
>>
>>  use SOAP::Lite +trace => qw(result);
>>
>>  my $soap = SOAP::Lite
>>   -> uri('http://somewhere/wsdl/service/1.0')
>>   -> proxy('https:///somewhere/soap/1.0/');
> <https://somewhere/soap/1.0/');>
>>
>>  my $result = $soap->authoriseApplicationEvent(
>>                      SOAP::Data->name(sessionID => 'rwr4rewr'),
>>                      SOAP::Data->name(applicationID => '650238'),
>>               ???       SOAP::Data->name('event')->value(???)
>>                  );
>>
>>  unless ($result->fault)
>>  {
>>   print $result->result();
>>  }
>>  else
>>  {
>>   print join ', ',
>>   $result->faultcode,
>>   $result->faultstring;
>>  }
>>
>>
>>  It seems to crap out on the line identified with ????
>>
>>
>>
>>
>>  Yahoo! Groups Links
>>
>>
>>
>>
>>
>
>
>
> ------------------------------------------------------------------------
>
> *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/>.
>
>

#3403 From: Mark Wilkinson <markw@...>
Date: Thu Mar 4, 2004 4:56 pm
Subject: question about base64 encoding
markilluminae
Send Email Send Email
 
Hi all!

Using SOAP::Lite on the client side, I have data which is being passed
to me as:

xsi:type = http://schemas.xmlsoap.org/soap/encoding/base64

and these are decoded automatically by SOAP::Lite.  Wonderful!  However,
when data is passed to me as:

xsi:type = http://www.w3.org/2001/XMLSchema/base64Binary

SOAP::Lite does not automatically decode it.  This is surprising,
because the definition of SOAP-ENC:base64 is:

<xs:simpleType name="base64">
<xs:restriction base="xs:base64Binary"/>
</xs:simpleType>

So the two really should be handled identically (or??).

The same does *not* hold true for strings; data (in particular, escaped
XML) with SOAP-ENC:string are de-escaped by SOAP::Lite on the receiving
end, as are those encoded as xs:string - there is no (visible)
difference in behaviour in these two cases.

Am I missing something, or is this a bug in the way SOAP::Lite handles
base64 data?

Any advice appreciated!

Mark


--
Mark Wilkinson (mwilkinson@...)
University of British Columbia iCAPTURE Centre

#3404 From: "Burno, Pierre" <pierre.burno@...>
Date: Fri Mar 5, 2004 8:03 pm
Subject: Calling a .NET service
soapuserpsb
Send Email Send Email
 

Hello,

 

I am attempting to connect to a .NET service and pass simple parameters, strings and integers.  But I am not having any success. Below is my client code…Any suggestions?

 

 

use SOAP::Lite +autodispatch =>+trace =>qw(all);

 

my $soap = SOAP::Lite

    -> uri('…’)

    -> on_action( sub { join '/', '…’, $_[1] } )

    -> proxy('…')

    -> autotype(0)

    -> soapversion('1.1')

    -> envprefix('soap')

    -> encprefix('soap');

 

my $method = SOAP::Data->name('Echo')

    ->attr({xmlns => '…'});

 

my $response =  SOAP::Data->name(value => 'mystring');

 

print $soap->call($method => $response)->result;

 

 


#3405 From: "korngerd" <korngerd@...>
Date: Mon Mar 8, 2004 5:19 am
Subject: XML-RPC Fault codes
korngerd
Send Email Send Email
 
Hi,

I've been trying to get customized fault codes for XML-RPC using SOAP:
:Lite.  I see from http://groups.yahoo.com/group/soaplite/message/1326
that the XML-RPC fault codes SOAP::Lite returns are a string.  I want
the XML-RPC server to be compatible with as many clients as possible.
Which make_fault method am I supposed to override?  If possible, I'd
appreciate it if someone could post some sample codes.  Thanks ;)

Lewis

#3406 From: Stefan Phacops <phacops@...>
Date: Mon Mar 8, 2004 7:17 am
Subject: how to grab the debug output of a soap lite service
phacops03
Send Email Send Email
 
Hi,

how can I make the output of the debug and trace functions, which goes to
the console, available inside my perl client. In the first instance I want
to write it to a log file. At the moment I can see the output if I run the
client from a shell, but I don't know how to access it inside the client
(e.g. if the client is started by a web forms submit button). I want to
write the output to a log file and send it to a web page in addition.

best wishes,
Stefan

#3407 From: Rutger Wessels <rutger@...>
Date: Mon Mar 8, 2004 9:33 am
Subject: Encoding troubles
rarwes
Send Email Send Email
 
Hi,

Quite new to SOAP::Lite, I encouter problems with encoding.

I need to access a soap object with one method. This method takes a XML
message as argument (which contains request) and returns another XML
message (the response). I access the server by using WSDL. The problem
is that characters in the response XML message are encoded in utf-8 but
the XML declaration of the response doesn't contain an encoding
declaration. The raw HTTP communication tells me that.

And yes, it is XML wrapped in SOAP. Very nice HTTP communication :)


My primary solution is to add that encoding declaration to the response.
However, the Soap server is developed and hosted by a third party and
they are not willing to do that (or it takes some time).

So is there any way to convince SOAP::Lite (or Perl?) to apply correct
decoding?

Maybe this is just a perl problem but I hope more SOAP developer are
dealing with these issues.

rutger

#3408 From: Rutger Wessels <rutger@...>
Date: Mon Mar 8, 2004 4:05 pm
Subject: Encoding troubles
rarwes
Send Email Send Email
 
Hi,

It turns out that there are a lot of encoding issues in the application.

Valfréjus is the example.
the é was encoded as C3 83 C2 A9. This turned out to be twice encoded
utf8. so in perl, I need to decode it twice. This seems to work but not
in all cases. Unfortunately. It is a very confusing situation anyway.

Since this application works in a client / server environment, we need
to see where the problems start.

At the server, we have a database, an XML interface, a webserver. I
don't have access to that part, because it third party software.

At the client, we have Perl, SOAP::Lite.

Now I am wondering, does SOAP::Lite any character conversion? Or just
pass it through without touching the data?

I believe it works that way, because in the HTTP layer, I can see the
wrongly coded parts.

regards,
rutger

#3409 From: Todd Tyree <todd@...>
Date: Mon Mar 8, 2004 8:46 pm
Subject: Re: Calling a .NET service
todd@...
Send Email Send Email
 
Bruno,

Have you had any luck with this yet?  If not, could you send me the
+trace output, and I'll have a look to see if I can help?

Cheers,
Todd

Burno, Pierre wrote:

> Hello,
>
>
>
> I am attempting to connect to a .NET service and pass simple parameters,
> strings and integers.  But I am not having any success. Below is my
> client code…Any suggestions?
>
>
>
>
>
> use SOAP::Lite +autodispatch =>+trace =>qw(all);
>
>
>
> my $soap = SOAP::Lite
>
>     -> uri('…’)
>
>     -> on_action( sub { join '/', '…’, $_[1] } )
>
>     -> proxy('…')
>
>     -> autotype(0)
>
>     -> soapversion('1.1')
>
>     -> envprefix('soap')
>
>     -> encprefix('soap');
>
>
>
> my $method = SOAP::Data->name('Echo')
>
>     ->attr({xmlns => '…'});
>
>
>
> my $response =  SOAP::Data->name(value => 'mystring');
>
>
>
> print $soap->call($method => $response)->result;
>
>
>
>
>
>
> *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
>       <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/>.
>
>

#3410 From: Todd Tyree <todd@...>
Date: Mon Mar 8, 2004 8:50 pm
Subject: Re: how to grab the debug output of a soap lite service
todd@...
Send Email Send Email
 
Stefan,

Use IO::Capture::Stderr to wrap your call and then output the captured
results into your logfile.

Best,
Todd



Stefan Phacops wrote:

> Hi,
>
> how can I make the output of the debug and trace functions, which goes to
> the console, available inside my perl client. In the first instance I want
> to write it to a log file. At the moment I can see the output if I run the
> client from a shell, but I don't know how to access it inside the client
> (e.g. if the client is started by a web forms submit button). I want to
> write the output to a log file and send it to a web page in addition.
>
> best wishes,
> Stefan
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

#3411 From: "drfousth" <yahoo@...>
Date: Tue Mar 9, 2004 1:58 pm
Subject: XMLRPC in daemon mode
drfousth
Send Email Send Email
 
Hi,

I noticed that the XMLRPC daemon does not fork on an incoming request,
it seems to handle anything only serial (where do i find _any_
documentation about the XMLRPC implementation that comes with
SOAP::Lite , and its behaviour? ). We don't want to have a webserver
running for XMLRPC, but we need to handle lots of parallel requests. I
don't know how to get this working. Would be nice to have a transport
module that could be used with inetd, i don't really want to write a
wrapper for that.

Thanks,

Sven

#3412 From: Mark Wilkinson <markw@...>
Date: Tue Mar 9, 2004 3:27 pm
Subject: question about base64 encoding
markilluminae
Send Email Send Email
 
Hi all!

Using SOAP::Lite on the client side, I have data which is being passed
to me as:

xsi:type = http://schemas.xmlsoap.org/soap/encoding/base64

and these are decoded automatically by SOAP::Lite.  Wonderful!  However,
when data is passed to me as:

xsi:type = http://www.w3.org/2001/XMLSchema/base64Binary

SOAP::Lite does not automatically decode it.  This is surprising,
because the definition of SOAP-ENC:base64 is:

<xs:simpleType name="base64">
<xs:restriction base="xs:base64Binary"/>
</xs:simpleType>

So the two really should be handled identically (or??).

The same does *not* hold true for strings; data (in particular, escaped
XML) with SOAP-ENC:string are de-escaped by SOAP::Lite on the receiving
end, as are those encoded as xs:string - there is no (visible)
difference in behaviour in these two cases.

Am I missing something, or is this a bug in the way SOAP::Lite handles
base64 data?

Any advice appreciated!

Mark


--
Mark Wilkinson (mwilkinson@...)
University of British Columbia iCAPTURE Centre

#3413 From: Todd Tyree <todd@...>
Date: Tue Mar 9, 2004 10:41 pm
Subject: Re: Calling a .NET service
todd@...
Send Email Send Email
 
Hi Pierre,

There is nothing obvious.  What should the return value be?
'teststring'?  Hope you don't mind, but I'm posting this back to the
mailing list as well.  I would like to keep it public in case anyone
else has any sudden insights.

Also, I see the version at the bottom of the mesage, but is that the
version you are using? If not, could you attach a sanitized copy of the
code you are using to generate the query?

Here's a quick thought--have you tried setting an explicit type when
building the soap data (try turning +autotyping on).  Also, I assume
you've gone through everything in the manpage regarding .NET
interoperability, right?

Also, what version of perl are you using?

Best,
Todd

Burno, Pierre wrote:

> Todd,
>
> No luck yet.  Below is the trace output.  Thank you for your assistance.
>
>
>
>
> SOAP::Lite::new: ()
> SOAP::Transport::HTTP::Client::new: ()
> SOAP::Data::new: ()
> SOAP::Data::new: ()
> SOAP::Lite::call: ()
> SOAP::Serializer::envelope: ()
> SOAP::Serializer::envelope: SOAP::Data=HASH(0x1b76ab4)
> SOAP::Data=HASH(0x1a3f4d4
> )
> SOAP::Data::new: ()
> SOAP::Data::new: ()
> SOAP::Data::new: ()
> SOAP::Data::new: ()
> SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x1b849f8)
> SOAP::Transport::HTTP::Client::send_receive: POST http://.../test.asmx
> Accept: text/xml
> Accept: multipart/*
> Content-Length: 420
> Content-Type: text/xml; charset=utf-8
> SOAPAction: http://.../Service1/Echo
>
> <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
> xmlns:xsi="http://www.w3.or
> g/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> soap:enc
> odingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:soap="http://schema
> s.xmlsoap.org/soap/envelope/"><soap:Body><Echo
> xmlns="http://.../Service1/"><value>teststring</value></Echo></soap:B
> ody></soap:Envelope>
> SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x1d73f30)
> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
> Cache-Control: private, max-age=0
> Date: Mon, 08 Mar 2004 21:04:18 GMT
> Content-Type: text/xml; charset=utf-8
> Client-Date: Mon, 08 Mar 2004 21:04:46 GMT
> Client-Peer: 216.65.214.219:80
> Client-Response-Num: 1
> Client-Transfer-Encoding: chunked
> 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><EchoResponse
> xmlns="h
> ttp://.../Service1" /></soap:Body></soap:Envelope>
> SOAP::Deserializer::deserialize: ()
> SOAP::Parser::decode: ()
> SOAP::SOM::new: ()
> SOAP::Lite::DESTROY: ()
> SOAP::Serializer::DESTROY: ()
> SOAP::Data::DESTROY: ()
> SOAP::Data::DESTROY: ()
> SOAP::Data::DESTROY: ()
> SOAP::Data::DESTROY: ()
> SOAP::Data::DESTROY: ()
> SOAP::Data::DESTROY: ()
> SOAP::Deserializer::DESTROY: ()
> SOAP::Transport::DESTROY: ()
> SOAP::Transport::HTTP::Client::DESTROY: ()
> SOAP::SOM::DESTROY: ()
> SOAP::Transport::DESTROY: ()
> SOAP::Serializer::DESTROY: ()
> SOAP::Deserializer::DESTROY: ()
> SOAP::Parser::DESTROY: ()
> SOAP::Lite::DESTROY: ()
>
>
> -----Original Message-----
> From: Todd Tyree [mailto:todd@...]
> Sent: Monday, March 08, 2004 3:47 PM
> To: soaplite@yahoogroups.com
> Cc: Burno, Pierre
> Subject: Re: [soaplite] Calling a .NET service
>
> Bruno,
>
> Have you had any luck with this yet?  If not, could you send me the
> +trace output, and I'll have a look to see if I can help?
>
> Cheers,
> Todd
>
> Burno, Pierre wrote:
>
>
>>Hello,
>>
>>
>>
>>I am attempting to connect to a .NET service and pass simple parameters,
>>strings and integers.  But I am not having any success. Below is my
>>client code...Any suggestions?
>>
>>
>>
>>
>>
>>use SOAP::Lite +autodispatch =>+trace =>qw(all);
>>
>>
>>
>>my $soap = SOAP::Lite
>>
>>    -> uri('...')
>>
>>    -> on_action( sub { join '/', '...', $_[1] } )
>>
>>    -> proxy('...')
>>
>>    -> autotype(0)
>>
>>    -> soapversion('1.1')
>>
>>    -> envprefix('soap')
>>
>>    -> encprefix('soap');
>>
>>
>>
>>my $method = SOAP::Data->name('Echo')
>>
>>    ->attr({xmlns => '...'});
>>
>>
>>
>>my $response =  SOAP::Data->name(value => 'mystring');
>>
>>
>>
>>print $soap->call($method => $response)->result;
>>
>>
>>
>>
>>
>>
>>*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
>>      <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/>.
>>
>>

#3414 From: "Randy J. Ray" <rjray@...>
Date: Wed Mar 10, 2004 9:46 am
Subject: Re: XMLRPC in daemon mode
rjray_perl
Send Email Send Email
 
> I noticed that the XMLRPC daemon does not fork on an incoming request,
> it seems to handle anything only serial (where do i find _any_
> documentation about the XMLRPC implementation that comes with
> SOAP::Lite , and its behaviour? ). We don't want to have a webserver
> running for XMLRPC, but we need to handle lots of parallel requests. I
> don't know how to get this working. Would be nice to have a transport
> module that could be used with inetd, i don't really want to write a
> wrapper for that.

The XMLRPC::Lite package is not designed to be a complete daemon/server
solution. Nor is SOAP::Lite. Both are object frameworks around which you can
build a server and/or daemon.

There are examples of doing this, using the XMLRPC::Lite::Transport high-level
driver-class. Look in the "examples/XMLRPC" directory, specifically at the file
"xmlrpc.daemon". This does not fork, either, but it illustrates how one would
write a daemon for XMLRPC::Lite (it uses HTTP::Daemon as the listener). You
will have to provide the forking, either by sub-classing an existing transport
class, or by using something like Net::Server.

Randy
--
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Randy J. Ray        Campbell, CA    http://www.rjray.org   rjray@...

Silicon Valley Scale Modelers: http://www.svsm.org

#3415 From: "xGunneRx" <xgunnerx@...>
Date: Thu Mar 11, 2004 10:47 pm
Subject: How to change the default namespace type?
xGunneRx
Send Email Send Email
 
I'm trying to override the default namespace tag and I could use some
help. My code:

<snip>
$self->{som} = $self->{soap}->SetConfig(

		 # Generate body

		 SOAP::Data->type( 'tns:ConfigData' )->name(
			 'CfgData' => \SOAP::Header->value(

			 SOAP::Data->type( 'string' )->name( 'SessionID' )->value(
$session_id ),

			 SOAP::Data->type( 'long' )->name( 'ConfigID' )->value( $config_id ),

More data stuffs...
);

</snip>

The problem is that it generates this tag:

<namesp3:SetConfig xmlns:namesp3="http://url/to/file.wsdl">

but I want it get ride of the namesp3 and have it as:

<tns:SetConfig>

(ditching the xmlns tag would be nice too)

Any help is greatly appericiated!
TIA! :)

#3416 From: "geoffocallaghan" <geoff@...>
Date: Fri Mar 12, 2004 12:22 pm
Subject: SOAP::Lite and SMTP with attachments
geoffocallaghan
Send Email Send Email
 
Hi,

Is it possible?  Does anyone have some sample code of an attachment
being passed via SOAP over SMTP?

I've done quite a lot of googling... all googled out :-)

Thanks
Geoff

#3417 From: "rajmalli" <rajmalli@...>
Date: Sat Mar 13, 2004 4:16 pm
Subject: Web Service authentication vs Web App authentication
rajmalli
Send Email Send Email
 
Hi

This is not a question specific to SOAP::Lite, so please direct me to
an appropriate forum if necessary.

I have an ASP.NET Web Application which uses authenticated access.
The application folder has Directory security set to Basic
authentication (windows authentication). Now is it true that I can
access any page in this application after being authenticated _just
once per session_ by IIS? My limited experience indicates that this
is the case. I am guessing that IIS uses session ids to decide
whether it should request authentication or not.

Now, the same does not seem true with a Web Service which has its
root folder Directory security set to Basic authentication. I am
required to provide credentials along with _every_ web method call.
How can I make the web service request authentication just once per
session? If this is not possible, why not?

Thanks
Raj

#3418 From: "Steven N. Hirsch" <hirschs@...>
Date: Mon Mar 15, 2004 9:22 pm
Subject: Accepting response w/ literalxml encoding
hirschs@...
Send Email Send Email
 
All,

Is there any low-impact method for getting SOAP::Lite to accept an RPC
response with rpc/literal serialization?  I found that I can override the
default encodingStyle by doing this after instantiating a SOAP object:

$SOAP::Constants::SOAP_VERSIONS{'1.1'}->{NS_ENC} =
     "http://xml.apache.org/xml-soap/literalxml";

But this seems quite brute-force and causes breakage if, e.g. the
conventional "soap/encoded" namespace is declared anywhere else in the
envelope (should be allowable in the header and/or higher-level elements).

This code is tripping it up:

   die "Unrecognized/unsupported value of encodingStyle attribute
'$encodingStyle'\n"
     if defined $encodingStyle &&
        length($encodingStyle) != 0 && # encodingStyle=""
        $encodingStyle !~ /(?:^|\b)$SOAP::Constants::NS_ENC/;
                         # ^^^^^^^^ \b causing problems (!?) on some systems
                         # as reported by David Dyck <dcd@...>
                         # so use (?:^|\b) instead

For reasons I cannot get into, modification of the module is not a viable
option.

Steve

(Speaking on his own behalf - not my employers)

#3419 From: "eparusel" <eparusel@...>
Date: Tue Mar 16, 2004 1:32 am
Subject: *SOAP::Serializer::as_string = \&SOAP::Serializer::as_base64;
eparusel
Send Email Send Email
 
*SOAP::Serializer::as_string = \&SOAP::Serializer::as_base64;

Doesn't work for me, I get this error:

  Type 'base64' can't be found in a schema class 'SOAP::Serializer'

Not sure what the problem is.... any ideas anyone?

Running perl 5.6.1 on FreeBSD...

Thanks,
Eric

#3420 From: Harald Weidner <hweidner-lists@...>
Date: Tue Mar 16, 2004 12:06 pm
Subject: SOAP::Lite and HTTP keep-alive
exc_tronic
Send Email Send Email
 
Hallo,

Is there a way to make use of the HTTP/1.1 keep-alive feature when
calling several methods of a web service within a few seconds? I'd
like to get rid of the SSL handshake delay, but could not find anything
in the manual page.

I am using SOAP::Lite 0.60a from CPAN.

Regards,
Harald

--
Harald Weidner                           hweidner@...

#3421 From: "blairat" <blairat@...>
Date: Wed Mar 17, 2004 6:15 am
Subject: Using HTTPS with Win32 Client
blairat
Send Email Send Email
 
Has anyone successfully written a SOAP::Lite client with ActiveState
5.6 for Win32 that uses HTTPS?

Trying to convert working client to HTTPS but getting numerous "not
found" Perl modules.

#3422 From: "Viner, David" <dviner@...>
Date: Wed Mar 17, 2004 6:04 pm
Subject: SOAP::Lite packaging problem
daveviner
Send Email Send Email
 
Hi,

In looking at the SOAP::Lite CPAN package, it is named 'SOAP-Lite-0.60a',
but when it's unpacked, it creates a directory named 'SOAP-Lite-0.60'.
According to the standard CPAN.pm documentation, these names are supposed to
be identical.  I realize this is a bit nit-picking, but it causes problems
for some automated installation tools that I use.

Can you publish either a SOAP-Lite-0.61 or change the directory name to
match the package name?

thanks
dave

#3423 From: "Jim Lancaster" <jlancaster@...>
Date: Wed Mar 17, 2004 6:30 pm
Subject: XMLRPC-Lite vs. SOAP-Lite
jlancasterus
Send Email Send Email
 
I've been reading 'Programming Web Services w/ Perl', which is a great
book BTW. However, I'm not clear on something: Is XML-RPC limted to
using HTTP as the transport mechanism, or can it also use HTTPS like
SOAP?  If so, I think XML-RPC is all I need.

I'm trying to create a utility that will read log data, parse it into
XML, then send it to a logging server where the data gets stored in a
database.  I've got the read/parse thing working fine, but the
transport/store thing is an issue. <g>  Since I will be sending the log
data from remote servers over the Internet, I assumed I would eventually
want to use the more secure HTTPS protocol.

Thanks,

Jim

#3424 From: "B" <bjorn_svensson@...>
Date: Wed Mar 17, 2004 8:13 pm
Subject: Creating client SOAP request with not too complex structure
bjorn_svensson
Send Email Send Email
 
Hi, how can I create the following request with SOAP::Lite?

...
   <SOAP-ENV:Body>
     <m:getAvailableFieldNames xmlns:m="v2"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
       <reportOptions xsi:type="m0:ReportOptions">
         <dataSource xsi:type="xsd:string">MyDataSourceString</dataSource>
       </reportOptions>
     </m:getAvailableFieldNames>
   </SOAP-ENV:Body>
...

My attempt (that fails) is:
my $fields = SOAP::Lite
-> service ("http://$server/services/v2/$wsdl")
-> getAvailableFieldNames( SOAP::Data->name(dataSource => "$ds") ) ;

which produces:
...
<SOAP-ENV:Body>
<namesp1:getAvailableFieldNames xmlns:namesp1="v2">
<dataSource xsi:type="xsd:string">MyDataSourceString</dataSource>
</namesp1:getAvailableFieldNames>
</SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive:
HTTP::Response=HASH(0x2b0f574)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
Server Error

I've read lots of SOAP::Lite documentation etc, but can't seem to
figure out how to use more complex objects...

Any help appreciated,
Bjorn

Messages 3395 - 3424 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