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...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 2913 - 2942 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#2913 From: Eric Just <ejust@...>
Date: Wed Aug 13, 2003 10:57 pm
Subject: Exponentially slow with large messages
lonesome_sha...
Send Email Send Email
 
Hi,
Has anyone had any problesm with SOAP::lite transport
being excessively slow for large files (>~2M)?  I have
programmed both a server and a client transporting
over http using apache, and have run into this
problem.

Thanks
eric

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

#2914 From: Manessinger Andreas <man@...>
Date: Thu Aug 14, 2003 7:30 am
Subject: AW: how to turn off autogenerated namesp1 and namesp2?
andreas_mane...
Send Email Send Email
 
> This is what I'm seeing in the soap body and I'm not sure how to turn that off
> <SOAP-ENV:Body>
>     <namesp2:request xmlns:namesp2="http://app.mycompany.com/webservices/"/>
> </SOAP-ENV:Body>
>
> Please help

Just use the following stanza at the begin of your program.

    use SOAP::Lite;

    BEGIN {
       package SOAP::Serializer;
       sub gen_ns { '' }
    }

This means patching SOAP::Lite at runtime which is not software engineerically
correct, but it's a common technique and necessary with the current SOAP::Lite
for many tasks (.NET interoperability, ...) anyway.

Hope that helps

----
  Dipl.Ing. Andreas Manessinger  -  CCT / Competence Center Telematik
  Magistrat der Stadt Wien, Magistratsabteilung 14 - ADV,
  Rathausstr. 1, A-1082 Wien
  E-Mail: man@...
  Tel: (+43 1) 4000-91176
  Fax: (+43 1) 4000-99-91176
  WWW: http://service.wien.gv.at/

#2915 From: Kristian Rink <afterimage@...>
Date: Thu Aug 14, 2003 9:08 am
Subject: SOAP::SOM in servers...
afterimage@...
Send Email Send Email
 
Hi all,...

...just a short question: Writing a client using SOAP::Lite, I am
able to access a server SOAP answer using something like

my $soapsrv=SOAP::Lite
	 ->uri...
	 ...;

my $som=$soapsrv->functioncall();

Is there a similar way to, inside a SOAP::Transport::HTTP::CGI, to
access an incoming function call as a SOAP::SOM object and parse
through it?

TIA, have a nice day...
Cheers,
Kris


--
unschuldig? nicht verdächtig? unbeobachtet? vergiß es ...

gegen eine gesellschaft der totalen überwachung - aufwachen
und mitmachen:  http://www.stop1984.org

#2916 From: "Byrne Reese" <byrne@...>
Date: Thu Aug 14, 2003 10:40 pm
Subject: Re: SOAP::SOM in servers...
byrnereese
Send Email Send Email
 
I should point you at an article that I think will help:

http://builder.com.com/5100-6389-1052448.html

There is a section about accessing an element by name. You can also see
another sample in the following sample code:

sub search {
     my $self = shift;
     my $envelope = pop;
     my $associates_id = $envelope->dataof("//search/associates_id")
       or die SOAP::Fault->faultcode("Client")
                         ->faultstring("associates_id not specified")
                         ->faultactor($ACTOR);
     my $product       = $envelope->dataof("//search/product_group")
       or die SOAP::Fault->faultcode("Client")
                         ->faultstring("product_group not specified")
                         ->faultactor($ACTOR);
     my $keywords      = $envelope->dataof("//search/keywords")
       or die SOAP::Fault->faultcode("Client")
                         ->faultstring("keywords not specified")
                         ->faultactor($ACTOR);
...
}

Full source for above at:
http://majordojo.com/amazon_query/amazon_query.txt

>
> Hi all,...
>
> ...just a short question: Writing a client using SOAP::Lite, I am
> able to access a server SOAP answer using something like
>
> my $soapsrv=SOAP::Lite
>  ->uri...
>  ...;
>
> my $som=$soapsrv->functioncall();
>
> Is there a similar way to, inside a SOAP::Transport::HTTP::CGI, to
> access an incoming function call as a SOAP::SOM object and parse
> through it?
>
> TIA, have a nice day...
> Cheers,
> Kris
>
>
> --
> unschuldig? nicht verdächtig? unbeobachtet? vergiß es ...
>
> gegen eine gesellschaft der totalen überwachung - aufwachen
> und mitmachen:  http://www.stop1984.org
>
>
> To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


^byrne :/

#2917 From: Kristian Rink <afterimage@...>
Date: Fri Aug 15, 2003 7:08 am
Subject: Re: SOAP::SOM in servers...
afterimage@...
Send Email Send Email
 
Hi Byrne, all...


On Thu, 14 Aug 2003 15:40:58 -0700 (PDT)
"Byrne Reese" <byrne@...> wrote:

> I should point you at an article that I think will help:
>
> http://builder.com.com/5100-6389-1052448.html
>
> There is a section about accessing an element by name. You can
> also see another sample in the following sample code:
>


Hmmm... Why doesn't google show me results like that? _Very_
helpful indeed, thanks a lot for this!!!! :))

Cheers, have a nice weekend everyone...
Kris


--
unschuldig? nicht verdächtig? unbeobachtet? vergiß es ...

gegen eine gesellschaft der totalen überwachung - aufwachen
und mitmachen:  http://www.stop1984.org

#2918 From: "cwinters56" <cwinters56@...>
Date: Fri Aug 15, 2003 4:30 pm
Subject: Inserting XML data into SOAP wrapper
cwinters56
Send Email Send Email
 
What would be a good way to insert an snippet of existing XML
(generated by a non-perl application from a database) into a SOAP
created XML?

#2919 From: "bridg_addikt" <unixrulez@...>
Date: Fri Aug 15, 2003 7:18 pm
Subject: Help parsing soap response
bridg_addikt
Send Email Send Email
 
I am trying to parse the soap response that I received and having
trouble doing that. I am trying to extract the "code" from the
response below.

$code = $res->{createResponse}->{createResult}->{error}->{code};
print "$code\n";

I'm ending up with  "Use of uninitialized value in print at ..."
What am I doing wrong?

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
<createResponse xmlns="http://proctor.nasd.com/webservices/">
<createResult>

<error>
<severity>HIGH</severity>
<type>DATA_ERR</type>
<code>VENDOR_NOT_VALID</code>
<description>VENDOR_NOT_VALID: ERROR CODE MESSAGE NOT AVAILABLE!!
(Vendor id sub
mitted with the request is not valid or does not exist.)</description>
</error>

<submitter>TRACER</submitter>
<submitterTransactionId>1000</submitterTransactionId>
</createResult>
</createResponse>  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

#2920 From: "irixphule" <irix@...>
Date: Fri Aug 15, 2003 7:47 pm
Subject: Quick compatibility question
irixphule
Send Email Send Email
 
I wrote a simple soap client in python using SoapPY.py, and I attempt
to contact a daemon listening on port 81, and written in Perl using
Soap::Lite. The connection attempt times out. However if I point the
python script at a cgi written in perl, it works without a problem. I
know this isn't the python list, and I apologize, but I thought that
I would check here first.

thanks,
Steve.

#2921 From: "Duncan Cameron" <duncan_cameron2002@...>
Date: Fri Aug 15, 2003 8:55 pm
Subject: Re: Help parsing soap response
duncan_camer...
Send Email Send Email
 
On  2003-08-15 19:18:00  bridg_addikt <unixrulez@...> wrote:

>I am trying to parse the soap response that I received and having
>trouble doing that. I am trying to extract the "code" from the
>response below.
>
>$code = $res->{createResponse}->{createResult}->{error}->{code};
>print "$code\n";
>
>I'm ending up with  "Use of uninitialized value in print at ..."
>What am I doing wrong?
You have one too many levels of hash references. You don't want to reference
createResponse as that is what SOAP::Lite returns.

Try running under debug and dump $res

Regards
Duncan

#2922 From: Byrne Reese <byrne@...>
Date: Sat Aug 16, 2003 12:17 am
Subject: Re: Inserting XML data into SOAP wrapper
byrnereese
Send Email Send Email
 
Check out the following resource:

http://www.majordojo.com/archives/2003_05.html#000017

On Fri, 2003-08-15 at 09:30, cwinters56 wrote:
> What would be a good way to insert an snippet of existing XML
> (generated by a non-perl application from a database) into a SOAP
> created XML?
>
>
>                         Yahoo! Groups Sponsor
>                                           ADVERTISEMENT
>                                              click here
>
> 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 Reese <byrne@...>

#2923 From: "netaust1n" <austin@...>
Date: Sat Aug 16, 2003 3:32 am
Subject: supress "arrayType"
netaust1n
Send Email Send Email
 
My trouble is this:

my $encoded_order =
SOAP::Data->name('orderLine')->type('SOAPStruct')->attr({'xmlns:t' =>
'http:/xxx.xxx.xxx'})->value(\@order_array);

each individual member of @order_array is a SOAP-string with a name
and a value. when the server parses it though, it says "Can't coerce
an array into a hash" to which i say, "it shouldn't be an array."

i've tried specifying the type as a SOAPStruct, but SOAP-Lite
interprets it like this:

<orderHeader xsi:type="namesp4:SOAPStruct"
SOAP-ENC:arrayType="xsd:anyType[12]">

long story short, i need to convince SOAP-Lite that this isn't really
an array. the guys who wrote the server say it would be fine if it
didn't have a type OR an arrayType, but no matter what i try, it still
comes out with arrayType="xsd:anyType[12]"

any assistance would be much appreciated.

#2924 From: "jcraig949" <jcraig949@...>
Date: Mon Aug 18, 2003 2:35 am
Subject: Accessing Array in result
jcraig949
Send Email Send Email
 
New to both SOAP and perl and having trouble getting the array
values out of the below result (and dump).  Could someone show me
the syntax for getting the two items into an array variable?

  <soapenv:Body>
   <ns1:sayHelloResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:Hello">
    <ns1:sayHelloReturn xsi:type="soapenc:Array"
soapenc:arrayType="ns2:string[2]"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://www.w3.org/2001/XMLSchema">
     <item>Hell</item>
     <item>Watches</item>
    </ns1:sayHelloReturn>
   </ns1:sayHelloResponse>
  </soapenv:Body>


Here's what the dump reveals :

$VAR1 = bless( {
                  '_content' => [
                                  'soapenv:Envelope',
                                  {
                                    'xmlns:xsi'
=> 'http://www.w3.org/1999/XMLSchema-instance',
                                    'xmlns:xsd'
=> 'http://www.w3.org/1999/XMLSchema',
                                    'xmlns:soapenv'
=> 'http://schemas.xmlsoap.org/soap/envelope/'
                                  },
                                  [
                                    [
                                      'soapenv:Body',
                                      {},
                                      [
                                        [
                                          'ns1:sayHelloResponse',
                                          {
                                            'xmlns:ns1'
=> 'urn:Hello',
                                            'soapenv:encodingStyle'
=> 'http://schemas.xmlsoap.org/soap/encoding/'
                                          },
                                          [
                                            [
                                              'ns1:sayHelloReturn',
                                              {
                                                'soapenc:arrayType'
=> 'ns2:string[2]',
                                                'xmlns:soapenc'
=> 'http://schemas.xmlsoap.org/soap/encoding/',
                                                'xmlns:ns2'
=> 'http://www.w3.org/2001/XMLSchema',
                                                'xmlns:xsi'
=> 'http://www.w3.org/2001/XMLSchema-instance',
                                                'xsi:type'
=> 'soapenc:Array'
                                              },
                                              [
                                                [
                                                  'item',
                                                  {},
                                                  'Hell',
                                                  undef,
                                                  'Hell',
                                                  'item',
                                                  {}
                                                ],
                                                [
                                                  'item',
                                                  {},
                                                  'Watches',
                                                  undef,
                                                  'Watches',
                                                  'item',
                                                  {}
                                                ]
                                              ],
                                              undef,
                                              [
                                                'Hell',
                                                'Watches'
                                              ],
                                              '{urn:Hello}
sayHelloReturn',
                                              {
                                                '{http://www.w3.org/20
01/XMLSchema-instance}type'
=> '{http://schemas.xmlsoap.org/soap/encoding/}Array',
                                                '{http://schemas.xmlso
ap.org/soap/encoding/}arrayType'
=> '{http://www.w3.org/2001/XMLSchema}string[2]',
                                                'soapenc:arrayType'
=> 'ns2:string[2]',
                                                'xsi:type'
=> 'soapenc:Array'
                                              }
                                            ]
                                          ],
                                          undef,
                                          {
                                            'sayHelloReturn' => $VAR1-
>{'_content'}[2][0][2][0][2][0][4]
                                          },
                                          '{urn:Hello}
sayHelloResponse',
                                          {
                                            '{http://schemas.xmlsoap.o
rg/soap/envelope/}encodingStyle'
=> 'http://schemas.xmlsoap.org/soap/encoding/',
                                            'soapenv:encodingStyle'
=> 'http://schemas.xmlsoap.org/soap/encoding/'
                                          }
                                        ]
                                      ],
                                      undef,
                                      {
                                        'sayHelloResponse' => $VAR1->
{'_content'}[2][0][2][0][4]
                                      },
                                      '{http://schemas.xmlsoap.org/soa
p/envelope/}Body',
                                      {}
                                    ]
                                  ],
                                  undef,
                                  {
                                    'Body' => $VAR1->{'_content'}[2]
[0][4]
                                  },
                                  '{http://schemas.xmlsoap.org/soap/en
velope/}Envelope',
                                  {}
                                ],
                  '_current' => [
                                  $VAR1->{'_content'}
                                ]
                }, 'SOAP::SOM' );

#2925 From: "joycecho1121" <joycecho1121@...>
Date: Mon Aug 18, 2003 3:55 pm
Subject: SOAP::Fault
joycecho1121
Send Email Send Email
 
I'm returning a simple string when an error occurs in my server, but
I want to return an object with Error message and parameters
indicating which parameters are passed and so forth.  Is this
possible?  Does anyone have any idea?


sub find {

  my $me = shift;

  my ($owner) = Joyce-> search (me => $me);

  if (!$owner)
  {
   die  "$me does not exist";

  }

}

#2926 From: "Duncan Cameron" <duncan_cameron2002@...>
Date: Mon Aug 18, 2003 9:00 pm
Subject: Re: SOAP::Fault
duncan_camer...
Send Email Send Email
 
At 15:55:00 on 2003-08-18 joycecho1121 <joycecho1121@...> wrote:

>I'm returning a simple string when an error occurs in my server, but
>I want to return an object with Error message and parameters
>indicating which parameters are passed and so forth.  Is this
>possible?  Does anyone have any idea?
>
>
>sub find {
>
> my $me = shift;
>
> my ($owner) = Joyce-> search (me => $me);
>
> if (!$owner)
> {
>  die  "$me does not exist";
>
> }
>
>}

die() with a SOAP::Fault object, and pass your object as the faultdetail.

see http://cookbook.soaplite.com/#soap faults

Regards
Duncan

#2927 From: "Duncan Cameron" <duncan_cameron2002@...>
Date: Mon Aug 18, 2003 9:09 pm
Subject: Re: Accessing Array in result
duncan_camer...
Send Email Send Email
 
At 02:35:00 on 2003-08-18 jcraig949 <jcraig949@...> wrote:

>New to both SOAP and perl and having trouble getting the array
>values out of the below result (and dump).  Could someone show me
>the syntax for getting the two items into an array variable?
>
> <soapenv:Body>
>  <ns1:sayHelloResponse
>soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:ns1="urn:Hello">
>   <ns1:sayHelloReturn xsi:type="soapenc:Array"
>soapenc:arrayType="ns2:string[2]"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:ns2="http://www.w3.org/2001/XMLSchema">
>    <item>Hell</item>
>    <item>Watches</item>
>   </ns1:sayHelloReturn>
>  </ns1:sayHelloResponse>
> </soapenv:Body>
>

It's usually useful to provide an example of what you've tried already.
I don't know how you're accessing SOAP::Lite but something like this
should work:

my $s = SOAP::Lite->proxy(...) etc.

my $r = $s->somesub();

my @items = @{$r->result};

Regards
Duncan

#2928 From: Mental Patient <mental@...>
Date: Tue Aug 19, 2003 1:41 pm
Subject: Re: Accessing Array in result
mental@...
Send Email Send Email
 
Duncan Cameron wrote:
> At 02:35:00 on 2003-08-18 jcraig949 <jcraig949@...> wrote:
>
>
>>New to both SOAP and perl and having trouble getting the array
>>values out of the below result (and dump).  Could someone show me
>>the syntax for getting the two items into an array variable?
>>
>><soapenv:Body>
>> <ns1:sayHelloResponse
>>soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>>xmlns:ns1="urn:Hello">
>>  <ns1:sayHelloReturn xsi:type="soapenc:Array"
>>soapenc:arrayType="ns2:string[2]"
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>>xmlns:ns2="http://www.w3.org/2001/XMLSchema">
>>   <item>Hell</item>
>>   <item>Watches</item>
>>  </ns1:sayHelloReturn>
>> </ns1:sayHelloResponse>
>></soapenv:Body>
>>
>
> It's usually useful to provide an example of what you've tried already.
> I don't know how you're accessing SOAP::Lite but something like this
> should work:
>
> my $s = SOAP::Lite->proxy(...) etc.
>
> my $r = $s->somesub();
>
> my @items = @{$r->result};
>
>

Actually, depending on how things are encoded, he may need
$r->paramsout or maybe $r->paramsall. It depends on how the
result(s) are being returned. The perldoc has a fairly decent
explanation once you know where to look.

--

Mental (Mental@...)

"The Torah...  The Gospels...  The Koran...
Each claimed as the infallible word of GOD.
Misquoted, misinterpreted, misunderstood, and misapplied.
Maybe that's why he doesn't do any more interviews." - sinfest.net

CARPE NOCTEM, QUAM MINIMUM CREDULA POSTERO.

GPG public key: http://www.neverlight.com/pas/Mental.asc

#2929 From: "ctsomewhere" <edminer@...>
Date: Wed Aug 20, 2003 12:46 am
Subject: How to craft complex SOAP request with SOAP::Lite
ctsomewhere
Send Email Send Email
 
Hi,

I am new to SOAP::Lite.  I had no trouble with creating simple SOAP
client / server test applications and experimenting with various
options.  But I now have to figure out to write a SOAP client to
create and send the following type of "complex" SOAP request.  I have
not been able to figure out how to do that using the SOAP::Lite
module.  Can it be done?

Thanks,
CT

<SOAP-ENV:Envelope xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<MessageHeader xmlns="http://b2b.att.com/schema/MsgHeader/v1_0">
    <From> <PartyId>0001</PartyId> </From>
    <To> <PartyId>urn:b2b.att.com</PartyId> </To>
    <AgreementId>urn:xgw-Pu5E1koM:GWOD::</AgreementId>
    <Service>Ordering</Service>
    <Action>OrderRequest</Action>
    ...
</MessageHeader>
<Order xmlns="http://b2b.att.com/schema/Ordering/v1_0">
    <ServiceRequestInfo> <BillingInformation>
       <FrameRelay>
          <MCN>123456789</MCN>
          <GRC>GRC</GRC>
          <SOC>99</SOC>
          <BillingName>Acme, Inc.</BillingName>
          <CAPN>12388888</CAPN>
    </ServiceRequestInfo>
    <AddPVCList>
       <PVC>
          <Alias>PVC1</Alias>
          <BillDisplayPort>A-End port</BillDisplayPort>
          ...
       </PVC>
    </AddPVCList>
</Order>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

#2930 From: "sharmila_pillai" <sharmila_pillai@...>
Date: Wed Aug 20, 2003 2:21 pm
Subject: Transport is not specified (using proxy() method or service description)
sharmila_pillai
Send Email Send Email
 
Hi,

  I am trying to send and receive attachments using soaplite. I
followed the examples
in http://www.majordojo.com/SOAP-MIME/samples and I get the above
mentioned
error.
Has anyone got the examples working? This doesn't look like a common
problem.
BTW, am quite new to perl and apologies if I am being daft :-(

TIA,
Sharmila.

#!/usr/bin/perl -w

use SOAP::Lite +trace => qw(debug);
#use SOAP::MIME;
use MIME::Entity;
use Data::Dumper;

$HOST = "http://web3-node3/cgi-bin/sharmila-dev/testattach.cgi";
$NS = "TestAttach";

my $ent = build MIME::Entity
   Type        => "image/gif",
   Encoding    => "base64",
   Path        => "somefile.gif",
   Filename    => "arrowDown.gif",
   Disposition => "attachment";

my @parts = ($ent);

my $soap = SOAP::Lite
   ->readable(1)
   ->uri($NS)
   ->parts(@parts)
   ->proxy($HOST);
my $som = $soap->testattach(SOAP::Data->name("foo" => "bar"));
print Dumper($som);

#2931 From: Duncan Cameron <duncan_cameron2002@...>
Date: Wed Aug 20, 2003 3:02 pm
Subject: Re: Transport is not specified (using proxy() method or service description)
duncan_camer...
Send Email Send Email
 
--- sharmila_pillai <sharmila_pillai@...> wrote: > Hi,
>
>  I am trying to send and receive attachments using soaplite. I
> followed the examples
> in http://www.majordojo.com/SOAP-MIME/samples and I get the above
> mentioned
> error.
> Has anyone got the examples working? This doesn't look like a common
> problem.
> BTW, am quite new to perl and apologies if I am being daft :-(
>
> TIA,
> Sharmila.
>
> #!/usr/bin/perl -w
>
> use SOAP::Lite +trace => qw(debug);
> #use SOAP::MIME;
> use MIME::Entity;
> use Data::Dumper;
>
> $HOST = "http://web3-node3/cgi-bin/sharmila-dev/testattach.cgi";
> $NS = "TestAttach";
>
> my $ent = build MIME::Entity
>   Type        => "image/gif",
>   Encoding    => "base64",
>   Path        => "somefile.gif",
>   Filename    => "arrowDown.gif",
>   Disposition => "attachment";
>
> my @parts = ($ent);
>
> my $soap = SOAP::Lite
>   ->readable(1)
>   ->uri($NS)
>   ->parts(@parts)
>   ->proxy($HOST);
> my $som = $soap->testattach(SOAP::Data->name("foo" => "bar"));
> print Dumper($som);

Two questions.
Why have you commented out "use SOAP::MIME" ?
Is the MIME::Entity being created successfully? i.e does $ent have a
real value?

Regards
Duncan


________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

#2932 From: Lina Alshaal <lina.alchaal@...>
Date: Wed Aug 20, 2003 3:34 pm
Subject: Basic Authentication with SOAP::Lite?
linashaal
Send Email Send Email
 
Hi,

I'm getting an error when I'm trying to use the
Authentication Basic in SOAP::Lite.
I'm using a Soap::Lite based Perl client accessing
Apache Axis based on java service.
I verified if the LWP::Authen::Basic module is well
installed as well as other modules.
I read the http://guide.soaplite.com/ and I tried to
use all the techniques mentioned in the guide to pass
the user and password, they don't seem to work!
Looking at the code, nothing seems to be implemented!

Here's a part of my perl client code:

#! /usr/bin/perl -w

use Data::Dumper;
use Env;
use SOAP::Lite +trace => 'debug',
         on_fault => sub { my($soap, $res) = @_;
                 eval { die ref $res ?
$res->faultstring :
$soap->transport->status };
                 return ref $res ? $res : new
SOAP::SOM;
         };

$HOST="http://quadri:4043/xxxxxxx/HelloIF";
$NS="urn:x-netcelo:xxxxxxxxx.HelloIF";
$PHRASE=shift;

my $soap= SOAP::Lite
         ->readable(1)
         ->uri($NS)
         ->proxy($HOST );

sub
SOAP::Transport::HTTP::Client::get_basic_credentials {
   return 'username' => 'passwd';
        }

my $som=$soap
         ->sayHello(SOAP::Data->name("" => "$PHRASE"));
print "The response from the server was: \n"
.$som->result. "\n";
1;

Here is  a  trace fragment for the call from perl
client:  (I used Dumper method in the method
"send_receive" from /SOAP/Transport/HTTP.pm to dump
the $req (an instance from the  HTTP::Request class) )


  bless( {
                  '_method' => 'POST',
                  '_headers' => bless( {
                                         'soapaction'
=>
'"urn:x-netcelo:webServices.HelloIF#sayHello"',

                                         'content-type'
=> 'text/xml;
charset=utf-8',

'content-length' => 560,
                                         'accept' => [

'text/xml',

'multipart/*'
                                                     ]
                                       },
'HTTP::Headers' ),
                  '_uri' => bless( do{\(my $o =
'http://quadri:4043/wservices/HelloIF')},
'URI::http' ),
                  '_content' => '<?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  >
     <namesp1:sayHello
xmlns:namesp1="urn:x-netcelo:webServices.HelloIF"    >
       <c-gensym4 xsi:type="xsd:string"

>toto</c-gensym4></namesp1:sayHello></SOAP-ENV:Body></SOAP-ENV:Envelope>'

                }, 'HTTP::Request' );

If we modify SOAP/Transport/HTTP.pm (send_recieve) we
can explicitly add the basic_authentication header.
However we have found no correct way of passing the
authentication parameters with the standard SOAP::Lite
interface. The "proxy" method accepts parameters that
are methods from LWP::UserAgent, but they are
not used....

What am I missing?
Thanks for your help..

Best regards,
Lina

#2933 From: "salatfelarov" <peacock117@...>
Date: Wed Aug 20, 2003 6:15 pm
Subject: Setting string types on map name and values
salatfelarov
Send Email Send Email
 
Hi All -

I'm calling an Apache Axis service that takes a HashMap of String
name/value pairs.  It looks like the SOAP::Lite autotyper is helping
me a bit too much since sometimes the values contain numeric values
that get converted to xsd:int.

Here's the Client Code:

my $service = SOAP::Lite
		 -> uri($serviceURI)
		 -> proxy($serviceProxy);

my $results = $service->setAttributeValues(
    SOAP::Data->type(map =>\%nvPairs)->name("attributeNVPairs"));

This generates a request like so, where numeric string values are
autotyped to int - which ends up throwing a ClassCastException when
the underlying EJB hits an Integer in the inbound HashMap instead of
a String like it expects.

<attributeNVPairs xsi:type="apachens:Map>
<item>
    <key xsi:type="xsd:string">String Parameter Key</key>
    <value xsi:type="xsd:string">StringParameter Value</key>
</item>
<item>
    <key xsi:type="xsd:string">Numeric String Parameter Key</key>
    <value xsi:type="xsd:int">1</key>
</item>
</attributeNVPairs>

What I need is to be able to set the type for each key and value in
the map to string.

Any ideas?

Cheers, Michael

#2934 From: Mental Patient <mental@...>
Date: Wed Aug 20, 2003 9:43 pm
Subject: Re: Setting string types on map name and values
mental@...
Send Email Send Email
 
salatfelarov wrote:
> Hi All -
>
> I'm calling an Apache Axis service that takes a HashMap of String
> name/value pairs.  It looks like the SOAP::Lite autotyper is helping
> me a bit too much since sometimes the values contain numeric values
> that get converted to xsd:int.
>
> Here's the Client Code:
>
> my $service = SOAP::Lite
> 	 -> uri($serviceURI)
> 	 -> proxy($serviceProxy);
>
> my $results = $service->setAttributeValues(
>    SOAP::Data->type(map =>\%nvPairs)->name("attributeNVPairs"));
>
> This generates a request like so, where numeric string values are
> autotyped to int - which ends up throwing a ClassCastException when
> the underlying EJB hits an Integer in the inbound HashMap instead of
> a String like it expects.
>
> <attributeNVPairs xsi:type="apachens:Map>
> <item>
>    <key xsi:type="xsd:string">String Parameter Key</key>
>    <value xsi:type="xsd:string">StringParameter Value</key>
> </item>
> <item>
>    <key xsi:type="xsd:string">Numeric String Parameter Key</key>
>    <value xsi:type="xsd:int">1</key>
> </item>
> </attributeNVPairs>
>
> What I need is to be able to set the type for each key and value in
> the map to string.
>
> Any ideas?


Keep going the way you're going.

    my %h;
    $h{'type'}   = SOAP::Data->type('string' => "hms.phone.us");
    $h{'action'} = 'fix';
    $h{'int'}    = SOAP::Data->type('int' => 1);
    $h{'string'} = '1 666 251 4432';
    $hr = $soap->call(one_shot=> SOAP::Data->type(map => \%h) )->result;

that yeilds the xml:

<c-gensym3 xsi:type="apachens:Map">
<item>
    <key xsi:type="xsd:string">int</key>
    <value xsi:type="xsd:int">1</value>
</item>
<item>
    <key xsi:type="xsd:string">action</key>
    <value xsi:type="xsd:string">fix</value>
</item>
<item>
    <key xsi:type="xsd:string">string</key>
    <value xsi:type="xsd:string">1 666 251 4432</value>
</item>
<item>
    <key xsi:type="xsd:string">type</key>
    <value xsi:type="xsd:string">hms.phone.us</value>
</item>
</c-gensym3>

Yes, the first call to SOAP::Data was redundant. I could have just made
the one call to set the int, but you see where I'm going with this, no?

--

Mental (Mental@...)

"The Torah...  The Gospels...  The Koran...
Each claimed as the infallible word of GOD.
Misquoted, misinterpreted, misunderstood, and misapplied.
Maybe that's why he doesn't do any more interviews." - sinfest.net

CARPE NOCTEM, QUAM MINIMUM CREDULA POSTERO.

GPG public key: http://www.neverlight.com/pas/Mental.asc

#2935 From: Lina Alshaal <lina.alchaal@...>
Date: Thu Aug 21, 2003 6:56 am
Subject: Basic Authentication with SOAP::Lite
linashaal
Send Email Send Email
 
Hi,

I'm getting an error when I'm trying to use the
Authentication Basic in SOAP::Lite.
I'm using a Soap::Lite based Perl client accessing
Apache Axis based on java service.
I verified if the LWP::Authen::Basic module is well
installed as well as other modules.
I read the http://guide.soaplite.com/ and I tried to
use all the techniques mentioned in the guide to pass
the user and password, they don't seem to work!
Looking at the code, nothing seems to be implemented!

Here's a part of my perl client code:

#! /usr/bin/perl -w

use Data::Dumper;
use Env;
use SOAP::Lite +trace => 'debug',
         on_fault => sub { my($soap, $res) = @_;
                 eval { die ref $res ?
$res->faultstring :
$soap->transport->status };
                 return ref $res ? $res : new
SOAP::SOM;
         };

$HOST="http://quadri:4043/xxxxxxx/HelloIF";
$NS="urn:x-netcelo:xxxxxxxxx.HelloIF";
$PHRASE=shift;

my $soap= SOAP::Lite
         ->readable(1)
         ->uri($NS)
         ->proxy($HOST );

sub
SOAP::Transport::HTTP::Client::get_basic_credentials {
   return 'username' => 'passwd';
        }

my $som=$soap
         ->sayHello(SOAP::Data->name("" => "$PHRASE"));
print "The response from the server was: \n"
.$som->result. "\n";
1;

Here is  a  trace fragment for the call from perl
client:  (I used Dumper method in the method
"send_receive" from /SOAP/Transport/HTTP.pm to dump
the $req (an instance from the  HTTP::Request class) )


  bless( {
                  '_method' => 'POST',
                  '_headers' => bless( {
                                         'soapaction'
=>
'"urn:x-netcelo:webServices.HelloIF#sayHello"',

                                         'content-type'
=> 'text/xml;
charset=utf-8',

'content-length' => 560,
                                         'accept' => [

'text/xml',

'multipart/*'
                                                     ]
                                       },
'HTTP::Headers' ),
                  '_uri' => bless( do{\(my $o =
'http://quadri:4043/wservices/HelloIF')},
'URI::http' ),
                  '_content' => '<?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  >
     <namesp1:sayHello
xmlns:namesp1="urn:x-netcelo:webServices.HelloIF"    >
       <c-gensym4 xsi:type="xsd:string"

>toto</c-gensym4></namesp1:sayHello></SOAP-ENV:Body></SOAP-ENV:Envelope>'

                }, 'HTTP::Request' );

If we modify SOAP/Transport/HTTP.pm (send_recieve) we
can explicitly add the basic_authentication header.
However we have found no correct way of passing the
authentication parameters with the standard SOAP::Lite
interface. The "proxy" method accepts parameters that
are methods from LWP::UserAgent, but they are
not used....

What am I missing?
Thanks for your help..

Lina

#2936 From: "sharmila_pillai" <sharmila_pillai@...>
Date: Thu Aug 21, 2003 11:08 am
Subject: Re: Transport is not specified (using proxy() method or service description)
sharmila_pillai
Send Email Send Email
 
Uncommenting 'use SOAP::MIME' gives me an error/warning:
Subroutine SOAP::Deserializer::deserialize redefined at
/usr/bin/perl-5.8.0/lib/
site_perl/5.8.0/SOAP/MIME.pm line 20.


I did $ent->print(\*STDOUT); and looks like $ent is created
successfully.

Interestingly, when I change the order of proxy() and parts()
declaration the transport
error seems to disappear as well!
my $soap = SOAP::Lite
  ->readable(1)
  ->uri($NS)
  ->proxy($HOST)
  ->parts(@parts);

Now, I get the following error:
Can't locate object method "testattach" via package "SOAP::SOM" at
testattach_client1.pl line 25.
Any pointers??

TIA,
Sharmila.

> >
> > #!/usr/bin/perl -w
> >
> > use SOAP::Lite +trace => qw(debug);
> > #use SOAP::MIME;
> > use MIME::Entity;
> > use Data::Dumper;
> >
> > $HOST = "http://web3-node3/cgi-bin/sharmila-dev/testattach.cgi";
> > $NS = "TestAttach";
> >
> > my $ent = build MIME::Entity
> >   Type        => "image/gif",
> >   Encoding    => "base64",
> >   Path        => "somefile.gif",
> >   Filename    => "arrowDown.gif",
> >   Disposition => "attachment";
> >
> > my @parts = ($ent);
> >
> > my $soap = SOAP::Lite
> >   ->readable(1)
> >   ->uri($NS)
> >   ->parts(@parts)
> >   ->proxy($HOST);
> > my $som = $soap->testattach(SOAP::Data->name("foo" => "bar"));
> > print Dumper($som);
>
> Two questions.
> Why have you commented out "use SOAP::MIME" ?
> Is the MIME::Entity being created successfully? i.e does $ent have a
> real value?
>
> Regards
> Duncan
>
>
> ________________________________________________
________________________
> Want to chat instantly with your online friends?  Get the FREE
Yahoo!
> Messenger http://uk.messenger.yahoo.com/

#2937 From: "Byrne Reese" <byrne@...>
Date: Thu Aug 21, 2003 1:51 pm
Subject: Announcing SOAP::Lite v0.60
byrnereese
Send Email Send Email
 
After *many* delays, for which Paul and I would like to sincerely
apologize, SOAP::Lite v0.60 is finally available for public download. It
is not available on the website yet. Paul (the author of SOAP::Lite) is
out of town and will release a new version of the website when he returns,
that contains all the new and necessary download links. In the meantime,
you can download 0.60 from sourceforge at the following URL:

https://sourceforge.net/project/showfiles.php?group_id=66000

If you find a bug in using the software, please notify me, or Paul
immediately so that we can address it.

The new website can be viewed here:

http://www.soaplite.com/beta/

There are still a few tweaks that need to be made, but you get the idea.
Hopefully everyone will find the site much easier to navigate, to find
support on, documentation, etc. (feedback and suggestions are always
welcome).

^byrne :/

#2938 From: "Byrne Reese" <byrne@...>
Date: Thu Aug 21, 2003 1:52 pm
Subject: Re: Re: Transport is not specified (using proxy() method or service description)
byrnereese
Send Email Send Email
 
SOAP::MIME is actually a patch to SOAP::Lite... not the best choice for an
implementation I admit, but I wanted to make it easy without forcing the
user to override every single parser/processor in the SOAP::Lite package.
But that is neither here nor there. Bottom line, the warnings are
harmless.

If you comment out SOAP::MIME, the parts subroutine will be undefined, as
it is defined by SOAP::MIME. The SOAP::SOM error is because Perl thinks
you are trying to take action on a SOAP Response returned from parts which
of course does not exist.

Let me encourage you to download the new version of SOAP::Lite 0.60... it
has all of SOAP::MIME's functionality merged into it more seemlessly,
which will eliminate the need for 'use SOAP::MIME' all-together, and will
get rid of those annoying warnings.

http://sourceforge.net/project/showfiles.php?group_id=66000

>
>
>
>
> Uncommenting 'use SOAP::MIME' gives me an error/warning:
> Subroutine SOAP::Deserializer::deserialize redefined at
> /usr/bin/perl-5.8.0/lib/
> site_perl/5.8.0/SOAP/MIME.pm line 20.
>
>
> I did $ent-
> successfully.
>
> Interestingly, when I change the order of proxy() and parts()
> declaration the transport
> error seems to disappear as well!
> my $soap = SOAP::Lite
>  -
>  -
>  -
>  -
>
> Now, I get the following error:
> Can't locate object method "testattach" via package
> "SOAP::SOM" at
> testattach_client1.pl line 25.
> Any pointers??
>
> TIA,
> Sharmila.
>
>
>
>
>
>
>
>
>
> http://web3-node3/cgi-bin/sharmila-dev/testattach.cgi";
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ________________________
>
> Yahoo!
> http://uk.messenger.yahoo.com/
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
>
>   ADVERTISEMENT
>
>
>
>
>
>
>
>
>
> 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 :/

#2939 From: "teden" <the@...>
Date: Thu Aug 21, 2003 3:34 pm
Subject: Sending/Receiving multiple XML docs in SOAP::Lite
teden
Send Email Send Email
 
Folks,

I am building a traffic cop which will take multiple XML docs as
input. The idea is that the server will create calls to different
systems, with each individual XML doc going to each system, gather
the results, then combine them in a result message. Each individual
XMl doc is pretty large, up to about 300 variables each, so I was
thinking that parsing one big document then creating each system doc
individually would be a bear.

I was thinking that the server should capture each doc separately,
since each will have its own xsd.

I was also thinking that this might be accomplished using different
namespaces within the soap envelope.

Am I on the right track? Or have I lost all my marbles?

Thom Eden

#2940 From: "geek_town" <twongkee@...>
Date: Thu Aug 21, 2003 6:21 pm
Subject: $ (dollar) at beginning of type causing Unspecified namespace error
geek_town
Send Email Send Email
 
I have a NON perl soap server/service that returns the "very bad"
snippet:

     <id70 id='id70' soapenc:root='0' xsi:type='ns9:$Proxy6'>
       <h href='#id71'></h>
     </id70>

notice the $ at the beginning of the type name....

This is what the server wants to return... the "object" name is indeed
"$Proxy6"

Have I missed any settings to allow this?

As a workaround I can "hack in" an overide/manual patch to get rid of
the "$" in the "decode_object" method...

but was wondering if this was required?

#2941 From: "mzupan21" <mzupan21@...>
Date: Thu Aug 21, 2003 9:39 pm
Subject: Force 2001 schema
mzupan21
Send Email Send Email
 
I'm using soap lite v0.55 and I'm using a wsdl file iven to me by a
client.

this is part of their xml request

  xmlns:xsd="http://www.w3.org/2001/XMLSchema"

mine is

  xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"

is there anyway for force it to use 2001. It seems to be erroring due
to me requesting 2001. Everything else looks good..

Thanks
Mike

#2942 From: "tdhite" <tdhite@...>
Date: Fri Aug 22, 2003 9:34 pm
Subject: header attribute getting swallowed...
tdhite
Send Email Send Email
 
Hello,

below is a code snippet that I cannot seem to find in error, but
clearly it is. The attribute on the header *never* serializes, so I
end up with the header provided below.

Any suggestions would be greatly appreciated.

Thanks so much.

--- code snippet start ---
my $version     = '1.8';
my $userID      = 'myuserid';
my $sessionID   = 'mysession';

my @headerstruct = (
     SOAP::Header->name('sessionid' => $sessionID),
     SOAP::Header->name('version' => $version)->type('string')
);

my $header = SOAP::Header
     ->name('headerStruct' => \SOAP::Header->value(@headerstruct))
     ->attr({'id' => $userID});

# create the soap object
my $soap = new SOAP::Lite;
$soap->uri($uri);
$soap->proxy(@proxy[2]);

my $response = $soap->logout($header);
--- code snippet end ---

--- header snippet start ---
<SOAP-ENV:Header>
   <headerStruct>
     <sessionid xsi:type="xsd:string">mysession</sessionid>
     <version xsi:type="xsd:string">1.8</version>
   </headerStruct>
</SOAP-ENV:Header>
--- header snippet end ---

Messages 2913 - 2942 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