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 3616 - 3645 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#3616 From: "arhofs" <arhofs@...>
Date: Fri May 28, 2004 1:31 pm
Subject: Problems with '#' in SOAPAction - http header.
arhofs
Send Email Send Email
 
I'm having trouble understanding why I get a '#' in my SOAPACtion in
the http header ?

I use this code (yes, it's awful..) to call the webservice:

#!/bin/perl -w

use SOAP::Lite(
        trace => qw(debug),
             readable => 1,
            );

$myURI = 'http://canaldigital/ListCategories';
$myPROXY = 'http://62.92.49.6:80/TVGuide.asmx';

my $soap = SOAP::Lite
-> uri($myURI)
-> proxy($myPROXY);

$soap->readable(1);

$soap->envprefix('soap');

my $result = $soap->call(SOAP::Data
                     ->uri ('http://canaldigital/')
                     -> name('q1:ListCategories') =>
                     (SOAP::Data
                         -> name('SMSid')
                         -> value('3')
                     ),
                 );


if($result->fault)
{
print "\nSOAP Fault occurred:" .
"\n\tCode = " . $result->faultcode .
"\n\tString = " . $result->faultstring .
"\n";
} else {
print "\nCall result is \"" . $result->result() . "\".";
}


The trace shows:
SOAP::Transport::HTTP::Client::send_receive: POST
http://62.92.49.6:80/TVGuide.asmx
Accept: text/xml
Accept: multipart/*
Content-Length: 506
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://canaldigital/#ListCategories"

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
   <soap:Body>
     <q1:ListCategories xmlns:q1="http://canaldigital/">
       <SMSid xsi:type="xsd:int">3</SMSid>
     </q1:ListCategories>
   </soap:Body>
</soap:Envelope>

The response from the server is:
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 (Internal
Server Error) Internal Server Error.
Cache-Control: private
Connection: close
Date: Fri, 28 May 2004 13:26:46 GMT
Server: Microsoft-IIS/5.0
Content-Length: 488
Content-Type: text/xml; charset=utf-8
Client-Date: Fri, 28 May 2004 13:26:47 GMT
Client-Response-Num: 1
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:Client</faultcode>
       <faultstring>Server did not recognize the value of HTTP Header
SOAPAction: http://canaldigital/#ListCategories.</faultstring>
       <detail />
     </soap:Fault>
   </soap:Body>
</soap:Envelope>



What I want to send to the service is:

POST /TVGuide.asmx HTTP/1.1
Host: 62.92.49.6
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://canaldigital/ListChannels"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
     <ListChannels xmlns="http://canaldigital">
       <SMSid>int</SMSid>
     </ListChannels>
   </soap:Body>
</soap:Envelope>




What do I have to do to remove the #  in SOAPAction ?

Thanks

AH

#3617 From: "Mitchell, Louise M" <Louise.Mitchell@...>
Date: Fri May 28, 2004 1:56 pm
Subject: RE: Problems with '#' in SOAPAction - http header.
d3j051
Send Email Send Email
 
Read this article....  it shows how to change the # to a / as well as
other good info about calling a MS .NET web service from Soap::Lite
perl...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsoap/
html/soapliteperl.asp

-----Original Message-----
From: arhofs [mailto:arhofs@...]
Sent: Friday, May 28, 2004 6:31 AM
To: soaplite@yahoogroups.com
Subject: [soaplite] Problems with '#' in SOAPAction - http header.


I'm having trouble understanding why I get a '#' in my SOAPACtion in
the http header ?

I use this code (yes, it's awful..) to call the webservice:

#!/bin/perl -w

use SOAP::Lite(
        trace => qw(debug),
             readable => 1,
            );

$myURI = 'http://canaldigital/ListCategories';
$myPROXY = 'http://62.92.49.6:80/TVGuide.asmx';

my $soap = SOAP::Lite
-> uri($myURI)
-> proxy($myPROXY);

$soap->readable(1);

$soap->envprefix('soap');

my $result = $soap->call(SOAP::Data
                     ->uri ('http://canaldigital/')
                     -> name('q1:ListCategories') =>
                     (SOAP::Data
                         -> name('SMSid')
                         -> value('3')
                     ),
                 );


if($result->fault)
{
print "\nSOAP Fault occurred:" .
"\n\tCode = " . $result->faultcode .
"\n\tString = " . $result->faultstring .
"\n";
} else {
print "\nCall result is \"" . $result->result() . "\".";
}


The trace shows:
SOAP::Transport::HTTP::Client::send_receive: POST
http://62.92.49.6:80/TVGuide.asmx
Accept: text/xml
Accept: multipart/*
Content-Length: 506
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://canaldigital/#ListCategories"

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
   <soap:Body>
     <q1:ListCategories xmlns:q1="http://canaldigital/">
       <SMSid xsi:type="xsd:int">3</SMSid>
     </q1:ListCategories>
   </soap:Body>
</soap:Envelope>

The response from the server is:
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 (Internal
Server Error) Internal Server Error.
Cache-Control: private
Connection: close
Date: Fri, 28 May 2004 13:26:46 GMT
Server: Microsoft-IIS/5.0
Content-Length: 488
Content-Type: text/xml; charset=utf-8
Client-Date: Fri, 28 May 2004 13:26:47 GMT
Client-Response-Num: 1
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:Client</faultcode>
       <faultstring>Server did not recognize the value of HTTP Header
SOAPAction: http://canaldigital/#ListCategories.</faultstring>
       <detail />
     </soap:Fault>
   </soap:Body>
</soap:Envelope>



What I want to send to the service is:

POST /TVGuide.asmx HTTP/1.1
Host: 62.92.49.6
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://canaldigital/ListChannels"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
     <ListChannels xmlns="http://canaldigital">
       <SMSid>int</SMSid>
     </ListChannels>
   </soap:Body>
</soap:Envelope>




What do I have to do to remove the #  in SOAPAction ?

Thanks

AH





Yahoo! Groups Links

#3618 From: "Mitchell, Louise M" <Louise.Mitchell@...>
Date: Fri May 28, 2004 2:12 pm
Subject: RE: namesp1
d3j051
Send Email Send Email
 
I think this is how you do it... somoeone correct me if I'm wrong, since
I'm fairly new to this:

my $method =
SOAP::Data->name('yourmethodname')->attr({xmlns=>'http://yournamespace.o
rg/'});

my $param = SOAP::Data->type('xml' => $xml);

my $response = $soap->call($method=>$param);

-----Original Message-----
From: alcurry22 [mailto:andrew.curry@...]
Sent: Friday, May 28, 2004 2:09 AM
To: soaplite@yahoogroups.com
Subject: [soaplite] namesp1


Is it possible to change namesp1 to a specified string when the soap
message is created? I have typed xml i.e. xsi:type="Namespace::Element"
which cries with namesp1. Thanks Andrew





Yahoo! Groups Links

#3619 From: Andrew Curry <andrew.curry@...>
Date: Fri May 28, 2004 2:19 pm
Subject: RE: namesp1
alcurry22
Send Email Send Email
 
cheers,
did this in the end which worked out, took me long enough mind you:o)
ok

  my @templates = @{ $method{parameters} };

     my @temp= (map { @templates ? shift (@templates)->value($_) : $_ } @_);

     my $som       =
       $self->endpoint( $method{endpoint} )->outputxml('true')
       ->on_action( sub {qq!"$method{soapaction}"!} )
       ->call(SOAP::Data->name($method)
       ->prefix($method{namespace})
       ->uri($method{uri})
       ->attr({xmlns => $method{namespace}})
       , @temp
       );
where %methods was a lookup hash.

-----Original Message-----
From: Mitchell, Louise M [mailto:Louise.Mitchell@...]
Sent: 28 May 2004 15:12
To: alcurry22; soaplite@yahoogroups.com
Subject: RE: [soaplite] namesp1


I think this is how you do it... somoeone correct me if I'm wrong, since
I'm fairly new to this:

my $method =
SOAP::Data->name('yourmethodname')->attr({xmlns=>'http://yournamespace.o
rg/'});

my $param = SOAP::Data->type('xml' => $xml);

my $response = $soap->call($method=>$param);

-----Original Message-----
From: alcurry22 [mailto:andrew.curry@...]
Sent: Friday, May 28, 2004 2:09 AM
To: soaplite@yahoogroups.com
Subject: [soaplite] namesp1


Is it possible to change namesp1 to a specified string when the soap
message is created? I have typed xml i.e. xsi:type="Namespace::Element"
which cries with namesp1. Thanks Andrew





Yahoo! Groups Links

#3620 From: "Mitchell, Louise M" <Louise.Mitchell@...>
Date: Fri May 28, 2004 2:55 pm
Subject: 'Element' is an invalid node type - .NET WebService, SOAP::Lite client
d3j051
Send Email Send Email
 

All,

I'm getting an error message:  'Element' is an invalid node type

The web service is .NET, calling from SOAP::Lite perl script.... the perl code, .NET soap template, my soap envelope, and my soap response are all below...

I've googled this error string... seems to indicate some bug if using an xsd and some nested elements, but I'm not using any schema with this...

I've also tried to follow the instructions on the microsoft site for calling a .NET web service from SOAP::Lite... there ARE differences between my SOAP envelope and the SOAP envelope template provided by the .NET web service...like the SOAP-ENV namespace used by SOAP::Lite....also, the 1999 Schema reference, vs. the 2001 Schema reference... I'm just not sure which ones matter... or if that's the issue at all...

Any help is appreciated...

thanks,
L
***********************
perl code
***********************
#!d:/apps/perl/bin/perl.exe
use SOAP::Lite ( +trace => all, maptype => {} );
  select STDOUT; $|=1;
  select STDERR; $|=1;
my $soap = SOAP::Lite
           ->uri('http://tempuri.org')
           ->on_action( sub { join '/', 'http://tempuri.org', $_[1] } )
           ->proxy('http://ppsdev.pnl.gov/rateestimator/rateestimator.asmx');
sub SOAP::Transport::HTTP::Client::get_basic_credentials {
  return '****' => '****'; }         
$xml = q%<sXML><rate_estimator_trans>
        <send_title_sw>Y</send_title_sw>
        <short_record_sw>Y</short_record_sw>
        <remove_non_orig_base_trans_sw>Y</remove_non_orig_base_trans_sw>
        <rate_eff_date></rate_eff_date>
        <material_travel_estimate_date></material_travel_estimate_date>
        <acctg_trans>
        <acctg_tran units="56" cost_bypass_sw="N" change_sw="N" id="7" emplid="" parent_id="6" fy="2003" alc_grp_id="" rcvr_subacct="6378" cost_sheet_no="6378" revision_no="0" rcvr_acct="25110" toe="117" sndr_acct="" sndr_subacct="" cor_cd="71" resource_type="117 - Regular Labor"        tos="" task_midpoint_date="08/31/2003" pre_escalate_sw="Y" amt="4218.80" bld_cd="E" cost_cd="D9T97" trav_type="" resource_category="Labor"/>

        <acctg_tran units="56" cost_bypass_sw="N" change_sw="N" id="7" emplid="" parent_id="6" fy="2003" alc_grp_id="" rcvr_subacct="6378" cost_sheet_no="6378" revision_no="0" rcvr_acct="25110" toe="233" sndr_acct="" sndr_subacct="" cor_cd="71" resource_type="Acquisition Service Charge" tos="" task_midpoint_date="08/31/2003" pre_escalate_sw="Y" amt="250"     bld_cd="E" cost_cd="D9T97" trav_type="" resource_category="Materials"/>

        </acctg_trans>
        <alcs>
        <alc alc_grp_id="" rcvr_subacct="6378" cost_sheet_no="6378" revision_no="0" alc_toe="980" rate="12.00" subacct_ovr="" wp_no_ovr=""/>

        </alcs>
      </rate_estimator_trans></sXML>%;


my $method = SOAP::Data->name('BurdenTransaction')->attr({xmlns=>'http://tempuri.org/'});
my $param = SOAP::Data->type('xml' => $xml);
my $response = $soap->call($method=>$param);
if ($response->fault)
  {
    die $response->faultstring;
  }
else
  {
    my %result = %{$response->result};
    print map("$_: @{[$result{$_} || '']}\n", keys %result), "\n";
  }
****************************************
MS.NET soap envelope template
****************************************
POST /rateestimator/rateestimator.asmx HTTP/1.1
Host: ppsdev.pnl.gov
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/BurdenTransaction"

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

  <soap:Body>
    <BurdenTransaction xmlns="http://tempuri.org/">
      <sXML>string</sXML>
    </BurdenTransaction>
  </soap:Body>
</soap:Envelope>
****************************************
my soap envelope
****************************************
POST http://ppsdev.pnl.gov/rateestimator/rateestimator.asmx
Accept: text/xml
Accept: multipart/*
Content-Length: 1818
Content-Type: text/xml; charset=utf-8
SOAPAction: http://tempuri.org/BurdenTransaction

<?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>
      <BurdenTransaction xmlns="http://tempuri.org/">
       <sXML>
       <rate_estimator_trans>
        <send_title_sw>Y</send_title_sw>
        <short_record_sw>Y</short_record_sw>
        <remove_non_orig_base_trans_sw>Y</remove_non_orig_base_trans_sw>
        <rate_eff_date>04/30/2004</rate_eff_date>
        <material_travel_estimate_date>04/30/2004</material_travel_estimate_date>
        <acctg_trans>
        <acctg_tran units="56" cost_bypass_sw="N" change_sw="N" id="7" emplid="" parent_id="6" fy="2003" alc_grp_id="" rcvr_subacct="6378" cost_sheet_no="6378" revision_no="0" rcvr_acct="25110" toe="117" sndr_acct="" sndr_subacct="" cor_cd="71" resource_type="117 - Regular Labor"        tos="" task_midpoint_date="08/31/2003" pre_escalate_sw="Y" amt="4218.80" bld_cd="E" cost_cd="D9T97" trav_type="" resource_category="Labor"/>

        <acctg_tran units="56" cost_bypass_sw="N" change_sw="N" id="7" emplid="" parent_id="6" fy="2003" alc_grp_id="" rcvr_subacct="6378" cost_sheet_no="6378" revision_no="0" rcvr_acct="25110" toe="233" sndr_acct="" sndr_subacct="" cor_cd="71" resource_type="Acquisition Service Charge" tos="" task_midpoint_date="08/31/2003" pre_escalate_sw="Y" amt="250"     bld_cd="E" cost_cd="D9T97" trav_type="" resource_category="Materials"/>

        </acctg_trans>
        <alcs>
        <alc alc_grp_id="" rcvr_subacct="6378" cost_sheet_no="6378" revision_no="0" alc_toe="980" rate="12.00" subacct_ovr="" wp_no_ovr=""/>

        </alcs>
      </rate_estimator_trans>
      </sXML>
     </BurdenTransaction>
    </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>
***************************************
my soap response
***************************************
<?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:Client</faultcode>
            <faultstring>Server was unable to read request.
                         --&gt; There is an error in XML document (2, 3). --&gt;
                         'Element' is an invalid node type. Line 2, position 3.
            </faultstring>
            <detail />
          </soap:Fault>
        </soap:Body>
</soap:Envelope>


#3621 From: "Paul Cowan" <pwc21@...>
Date: Fri May 28, 2004 5:21 pm
Subject: Help: www.w3.org/2003/05/soap-envelope
pwc21
Send Email Send Email
 
When I specify "-> soapversion(1.2)", SOAP::Lite puts:

xmlns:soap="http://www.w3.org/2001/06/soap-envelope"

..in my Envelope tag.  Anyone know how I can make it use:

www.w3.org/2003/05/soap-envelope

...instead?

My server requires that I use the SOAP 1.2, 2003 spec!  Looking at
the source, I see 2001/06 is hardcoded into a hash for Soap version
1.2!

Thanks!
Paul

#3622 From: "iperlscript" <iperlscript@...>
Date: Fri May 28, 2004 6:43 pm
Subject: Re: NuSOAP interop - method 'foo' not defined in service
iperlscript
Send Email Send Email
 
Please disregard, this was my error.

Thanks,

Solomon

--- In soaplite@yahoogroups.com, "iperlscript" <iperlscript@y...>
wrote:
> Hello all--
>
> I'm running into an interesting issue...  Server is NuSOAP v1.75,
> client is SOAP::Lite v1.47.
>
> When I try to call a server method vi a NuSOAP client, it works as
> expected.  Trying to call the same method from the SOAP::Lite
client
> gives me a "method 'foo' not defined in service" message.
>
> Anyone seen this before?
>
> Thanks,
>
> Solomon

#3623 From: "ahk2811" <ahk2811@...>
Date: Sun May 30, 2004 9:29 am
Subject: Good reference tool
ahk2811
Send Email Send Email
 
I'm quite new to your group but I wanted to pass on a helpful hint
to help find info online without searching through a million search
links. Its a great online reference tool at
www.gurunet.com ....also, they used to charge a fee, but they are
now offering for FREE...don't know for how long.
Let me know what you guys think…
Y.

#3624 From: "estace" <estace@...>
Date: Mon May 31, 2004 10:28 pm
Subject: (No subject)
estace
Send Email Send Email
 
I have a super simple .net (.asmx) web service that exposes one
method:

int Add (int x, int x)

I have downloaded and installed SOAP::Lite and it appeasrs to work
fine when I point it at other SOAP::Lite services.  When I point it
at my own service it fails with a return code of 0.

perl "-MSOAP::Lite service=>'http://localhost/calculator.asmx?
wsdl'" -le "print Add(45,55)"

Any help would be greatly appreciated.

Thanks

#3625 From: "Dianne Van Dulken" <Dianne.VanDulken@...>
Date: Tue Jun 1, 2004 1:42 am
Subject: Security tutorial
dogmac.rm
Send Email Send Email
 
Hi,

I've again been looking but haven't been able to find a tutorial for
soap::lite that shows how to use digital certificates.  I know that the
original Soap didn't include security with it, and that you have to use
it in conjunction with SSL, but I'm hoping to find a tutorial which will
help me work out exactly what I put where, as I'm not sure if I should
be using the ENV variables or using the soap-dsig extension, and if the
latter how to use it.

Could anyone point me to a tutorial on this?

Thankyou

Dianne

#3626 From: "devil_kazuya99" <devil_kazuya99@...>
Date: Tue Jun 1, 2004 2:19 am
Subject: Servlet Client
devil_kazuya99
Send Email Send Email
 
Any one got examples of using a Java Servlet Client to use the Perl
web service.

Thank You.

#3627 From: "Huebner, Malte" <malte.huebner@...>
Date: Tue Jun 1, 2004 1:03 pm
Subject: Notice: perl -W
mrcake77
Send Email Send Email
 

Hi,

i've had a problem with getting no responses from my SOAP::Lite Server. This "error" was due
to the fact that i used "perl -W" in the first line of my server-script. I have not found
a notice to this problem in the documentation. I know that this is not a bug of SOAP::Lite but
would propose that someone puts this notice into the Cookbook or the users-guide as other
persons could have similar trouble if they try to use perl -W.

Best Regards,
Malte



#3628 From: Víctor A. Rodríguez <victor@...>
Date: Tue Jun 1, 2004 7:30 pm
Subject: Re: Notice: perl -W
bitman09
Send Email Send Email
 
Hi Malte,

> i've had a problem with getting no responses from my SOAP::Lite Server.
> This "error" was due
> to the fact that i used "perl -W" in the first line of my server-script.
> I have not found
> a notice to this problem in the documentation. I know that this is not a
> bug of SOAP::Lite but
> would propose that someone puts this notice into the Cookbook or the
> users-guide as other
> persons could have similar trouble if they try to use perl -W.

I think I had the same problem some time ago. When using perl -w and a
Pure Perl XML::Parser it becomes soooo sloooooooow.

Take a look at http://trex.sourceforge.net/users/en/first.html#require

Cheers.
--
Víctor A. Rodríguez (http://www.bit-man.com.ar)
El bit Fantasma (bit-man)
Life hacker

#3629 From: Phil Franklin <pwf_cf@...>
Date: Wed Jun 2, 2004 7:34 am
Subject: Re: Notice: perl -W
pwf_cf
Send Email Send Email
 
 
Dear all:
 
This is also the answer to my previous post: [soaplite] CGI: IIS 6 behaving differently to IIS 5. Removed the shebang line from the server side script, which contained the -w switch, and hey presto.
 
The script was generating warnings. It seems IIS 5 is a lot more forgiving of this than IIS 6.
 
Thanks for the hint!
Phil

"Víctor_A._Rodríguez" <victor@...> wrote:
Hi Malte,

> i've had a problem with getting no responses from my SOAP::Lite Server.
> This "error" was due
> to the fact that i used "perl -W" in the first line of my server-script.
> I have not found
> a notice to this problem in the documentation. I know that this is not a
> bug of SOAP::Lite but
> would propose that someone puts this notice into the Cookbook or the
> users-guide as other
> persons could have similar trouble if they try to use perl -W.

I think I had the same problem some time ago. When using perl -w and a
Pure Perl XML::Parser it becomes soooo sloooooooow.

Take a look at http://trex.sourceforge.net/users/en/first.html#require

Cheers.
--
Víctor A. Rodríguez (http://www.bit-man.com.ar)
El bit Fantasma (bit-man)
Life hacker


Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

#3630 From: "Huebner, Malte" <malte.huebner@...>
Date: Wed Jun 2, 2004 8:07 am
Subject: AW: Notice: perl -W
mrcake77
Send Email Send Email
 
Hi,
 
as i can see there are more people having problems with this. I think there should really
be a note on the soap-lite site for other developers.
 
Btw: I only had trouble with -W (upper case), not with -w .
 
Question: is this a bug?
 
BR,
Malte
 
 
-----Ursprüngliche Nachricht-----
Von: Phil Franklin [mailto:pwf_cf@...]
Gesendet: Mittwoch, 2. Juni 2004 09:35
An: soaplite@yahoogroups.com
Betreff: Re: [soaplite] Notice: perl -W

 
Dear all:
 
This is also the answer to my previous post: [soaplite] CGI: IIS 6 behaving differently to IIS 5. Removed the shebang line from the server side script, which contained the -w switch, and hey presto.
 
The script was generating warnings. It seems IIS 5 is a lot more forgiving of this than IIS 6.
 
Thanks for the hint!
Phil

"Víctor_A._Rodríguez" <victor@...> wrote:
Hi Malte,

> i've had a problem with getting no responses from my SOAP::Lite Server.
> This "error" was due
> to the fact that i used "perl -W" in the first line of my server-script.
> I have not found
> a notice to this problem in the documentation. I know that this is not a
> bug of SOAP::Lite but
> would propose that someone puts this notice into the Cookbook or the
> users-guide as other
> persons could have similar trouble if they try to use perl -W.

I think I had the same problem some time ago. When using perl -w and a
Pure Perl XML::Parser it becomes soooo sloooooooow.

Take a look at http://trex.sourceforge.net/users/en/first.html#require

Cheers.
--
Víctor A. Rodríguez (http://www.bit-man.com.ar)
El bit Fantasma (bit-man)
Life hacker

-----Ursprüngliche Nachricht-----
Von: Phil Franklin [mailto:pwf_cf@...]
Gesendet: Mittwoch, 2. Juni 2004 09:35
An: soaplite@yahoogroups.com
Betreff: Re: [soaplite] Notice: perl -W

 
Dear all:
 
This is also the answer to my previous post: [soaplite] CGI: IIS 6 behaving differently to IIS 5. Removed the shebang line from the server side script, which contained the -w switch, and hey presto.
 
The script was generating warnings. It seems IIS 5 is a lot more forgiving of this than IIS 6.
 
Thanks for the hint!
Phil

"Víctor_A._Rodríguez" <victor@...> wrote:
Hi Malte,

> i've had a problem with getting no responses from my SOAP::Lite Server.
> This "error" was due
> to the fact that i used "perl -W" in the first line of my server-script.
> I have not found
> a notice to this problem in the documentation. I know that this is not a
> bug of SOAP::Lite but
> would propose that someone puts this notice into the Cookbook or the
> users-guide as other
> persons could have similar trouble if they try to use perl -W.

I think I had the same problem some time ago. When using perl -w and a
Pure Perl XML::Parser it becomes soooo sloooooooow.

Take a look at http://trex.sourceforge.net/users/en/first.html#require

Cheers.
--
Víctor A. Rodríguez (http://www.bit-man.com.ar)
El bit Fantasma (bit-man)
Life hacker



#3631 From: "Duncan Cameron" <duncan_cameron2002@...>
Date: Wed Jun 2, 2004 11:01 am
Subject: Re: Notice: perl -W
duncan_camer...
Send Email Send Email
 
Huebner, Malte wrote:
>Hi,
>
>as i can see there are more people having problems with this. I think there
should really
>be a note on the soap-lite site for other developers.
>
>Btw: I only had trouble with -W (upper case), not with -w .
>
>Question: is this a bug?
>
Internally SOAP::Lite does turn off warnings at various points because of
deliberate coding techniques that would otherwise cause warnings to be issued.
Using -W has the effect of always issuing the warnings.
Whether this is a problem may depend on the environment in which you are
running.
Using -W is not a problem when using an HTTP daemon; I get lots of warnings but
it still works.
You didn't say what your environment is. If there is a clearly repeatable
problem then it does deserve a note in the documentation. Please can you clarify
what you are doing?

Regards
Duncan

#3632 From: "alcurry22" <andrew.curry@...>
Date: Wed Jun 2, 2004 11:59 am
Subject: Serialization
alcurry22
Send Email Send Email
 
I have 1gb documents to be passed around using the soap protocol.
is it possible to just send the xml as is with out serialization??
The only way i can see to do it is SOAP::Data as without this i get
rubbish sent, sadly that leaves me with <DATA><DATA></DATA></DATA>
which is invalid to the wsdl. Can i just send the xml inside the
envelope??
  Cheers

#3633 From: herbert.melcher@...
Date: Wed Jun 2, 2004 2:10 pm
Subject: sysread hangs
herbertmelcher
Send Email Send Email
 

Hi,

I have a soap lite client at a customer, which hangs sometimes, the sysread function doesn't come back. I suppose this is caused by a transparent proxy. But nevertheless the client has to finish itself after some timeout. I tried to wrap every soap call within a $SIG{ALRM} handler to force the sysread to finish, but with no success. The client is running on Win NT, Win2000 and WINXP. Any help would be appreciated.

Herbert


#3634 From: "Mitchell, Louise M" <Louise.Mitchell@...>
Date: Wed Jun 2, 2004 7:21 pm
Subject: RE: Serialization
d3j051
Send Email Send Email
 
Here's how I did it... it works... if it's incorrect, someone can
comment... 'sXML' is the root tag of my xml... $xml is the inner xml...

sub call_via_soap
{
   my $xml = shift;

   my $soap = SOAP::Lite
            ->soapversion('1.1')
            ->uri('http://tempuri.org')
            ->on_action( sub { join '/', 'http://tempuri.org', $_[1] } )

->proxy('http://ppsdev.pnl.gov/rateestimator/rateestimator.asmx');

   my $method =
SOAP::Data->name('BurdenTransaction')->attr{xmlns=>'http://tempuri.org/'
});

   my $param = SOAP::Data->name(sXML => SOAP::Data->type('string' =>
$xml) );

   my $response = $soap->call($method=>$param);

if ($response->fault)
   {
     die $response->faultstring;
   }
else
   {
     my $result = $response->result;
     return $result;
     #my %result = %{$response->result};
     #print map("$_: @{[$result{$_} || '']}\n", keys %result), "\n";
   }

}

-----Original Message-----
From: alcurry22 [mailto:andrew.curry@...]
Sent: Wednesday, June 02, 2004 4:59 AM
To: soaplite@yahoogroups.com
Subject: [soaplite] Serialization


I have 1gb documents to be passed around using the soap protocol.
is it possible to just send the xml as is with out serialization??
The only way i can see to do it is SOAP::Data as without this i get
rubbish sent, sadly that leaves me with <DATA><DATA></DATA></DATA>
which is invalid to the wsdl. Can i just send the xml inside the
envelope??
  Cheers





Yahoo! Groups Links

#3635 From: Andrew Dolbey <Andrew.Dolbey@...>
Date: Wed Jun 2, 2004 8:32 pm
Subject: hyphens in service function names
adolbey2004
Send Email Send Email
 
Hi all,
 
Has anyone here tried to make use of a web service where the function name for calling the service has a hyphen in it?  Some languages (e.g., Lisp) allow the developer to use hyphens pretty much everywhere.  But in Perl, we get for a run on code like this:


  my $service = SOAP::Lite
           -> service('file:/net/freddy/data/descriptron_1.1/src/descriptron.wsdl');

  my $func = 'd-mapper-request';

   my $res = $service->$func;



this sort of response:


   Bad stub: Bareword "d" not allowed while "strict subs" in use at (eval 86) line 6.
   Bareword "mapper" not allowed while "strict subs" in use at (eval 86) line 6.
    at /usr/local/share/perl/5.8.3/SOAP/Lite.pm line 2773


I was hoping that having the function name be the value of a scalar variable would keep this from happening.  But those hopes were dashed.

Anybody have any ideas?

Andy

#3636 From: eric-amick@...
Date: Thu Jun 3, 2004 2:09 pm
Subject: Re: hyphens in service function names
eamick
Send Email Send Email
 
> Has anyone here tried to make use of a web service where the function
> name for calling the service has a hyphen in it?  Some languages (e.g.,
> Lisp) allow the developer to use hyphens pretty much everywhere.  But in
> Perl, we get for a run on code like this:
>
>
>   my $service = SOAP::Lite
>            ->
> service('file:/net/freddy/data/descriptron_1.1/src/descriptron.wsdl');
>
>   my $func = 'd-mapper-request';
>
>    my $res = $service->$func;

I believe you can use something like

my $res = $service->call($func);

or maybe

my $res = $service->call($func => ());

It depends on whether the call() method requires both the name of the method to
call and an argument list. You may also need to put $func in double quotes--try
it without the quotes first.

--
Eric Amick
Columbia, MD


>
> There are 2 messages in this issue.
>
> Topics in this digest:
>
>       1. RE: Serialization
>            From: "Mitchell, Louise M" <Louise.Mitchell@...>
>       2. hyphens in service function names
>            From: Andrew Dolbey <Andrew.Dolbey@...>
>
>
> ________________________________________________________________________
> ________________________________________________________________________
>
> Message: 1
>    Date: Wed, 02 Jun 2004 12:21:25 -0700
>    From: "Mitchell, Louise M" <Louise.Mitchell@...>
> Subject: RE: Serialization
>
> Here's how I did it... it works... if it's incorrect, someone can
> comment... 'sXML' is the root tag of my xml... $xml is the inner xml...
>
> sub call_via_soap
> {
>   my $xml = shift;
>
>   my $soap = SOAP::Lite
>            ->soapversion('1.1')
>            ->uri('http://tempuri.org')
>            ->on_action( sub { join '/', 'http://tempuri.org', $_[1] } )
>
> ->proxy('http://ppsdev.pnl.gov/rateestimator/rateestimator.asmx');
>
>   my $method =
> SOAP::Data->name('BurdenTransaction')->attr{xmlns=>'http://tempuri.org/'
> });
>
>   my $param = SOAP::Data->name(sXML => SOAP::Data->type('string' =>
> $xml) );
>
>   my $response = $soap->call($method=>$param);
>
> if ($response->fault)
>   {
>     die $response->faultstring;
>   }
> else
>   {
>     my $result = $response->result;
>     return $result;
>     #my %result = %{$response->result};
>     #print map("$_: @{[$result{$_} || '']}\n", keys %result), "\n";
>   }
>
> }
>
> -----Original Message-----
> From: alcurry22 [mailto:andrew.curry@...]
> Sent: Wednesday, June 02, 2004 4:59 AM
> To: soaplite@yahoogroups.com
> Subject: [soaplite] Serialization
>
>
> I have 1gb documents to be passed around using the soap protocol.
> is it possible to just send the xml as is with out serialization??
> The only way i can see to do it is SOAP::Data as without this i get
> rubbish sent, sadly that leaves me with <DATA><DATA></DATA></DATA>
> which is invalid to the wsdl. Can i just send the xml inside the
> envelope??
>  Cheers
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
> ________________________________________________________________________
> ________________________________________________________________________
>
> Message: 2
>    Date: Wed, 02 Jun 2004 14:32:22 -0600
>    From: Andrew Dolbey <Andrew.Dolbey@...>
> Subject: hyphens in service function names
>
> Hi all,
>
> Has anyone here tried to make use of a web service where the function
> name for calling the service has a hyphen in it?  Some languages (e.g.,
> Lisp) allow the developer to use hyphens pretty much everywhere.  But in
> Perl, we get for a run on code like this:
>
>
>   my $service = SOAP::Lite
>            ->
> service('file:/net/freddy/data/descriptron_1.1/src/descriptron.wsdl');
>
>   my $func = 'd-mapper-request';
>
>    my $res = $service->$func;
>
>
>
> this sort of response:
>
>
>    Bad stub: Bareword "d" not allowed while "strict subs" in use at
> (eval 86) line 6.
>    Bareword "mapper" not allowed while "strict subs" in use at (eval 86)
> line 6.
>     at /usr/local/share/perl/5.8.3/SOAP/Lite.pm line 2773
>
>
> I was hoping that having the function name be the value of a scalar
> variable would keep this from happening.  But those hopes were dashed.
>
> Anybody have any ideas?
>
> Andy
>
>
> [This message contained attachments]
>
>
>
> ________________________________________________________________________
> ________________________________________________________________________
>
>
>
> ------------------------------------------------------------------------
> Yahoo! Groups Links
>
>
>
>
> ------------------------------------------------------------------------
>
>

#3637 From: "sidd_c8304" <sidd_p@...>
Date: Fri Jun 4, 2004 6:27 am
Subject: Help on Complex Structures with wsdl
sidd_c8304
Send Email Send Email
 
Hello All,
           I am a complete newbie to both SOAP::Lite and perl.I
haveinstalled Soap::Lite and also managed to write a simple client
andserver program.Its perfectly ok.
          But my requirement is bit complex structure.Basically i
wantto know how to go about creating a structure like the below:-
<MyExample>
      <MyID> xyz </MyID>
      <Passwd> iop </Passwd>
      <Info>
            <Addr> #402 </Addr>
            <City> abc   </City>
     </Info>
</MyExample>

  Correct me if am wrong.

The steps involved are:1) Firstly the server needs to create
<MyExample>, <MyID>...etc tags(Iam trying to create a wsdl, by passing
"?wsdl" as parameter in theclient)

2) So now client needs to send the values, by filling the tags
,xyz,iop,abc...etc( say by making a call to a service)        If a
call has to be made then how would i be able to send parameters inthe
call itself.

Pls excuse if i sound stupid., but cant help.I'll be grateful if
anyone can help me out

ThankYou.
--Siddarth

#3638 From: "Huebner, Malte" <malte.huebner@...>
Date: Fri Jun 4, 2004 7:25 am
Subject: AW: Notice: perl -W
mrcake77
Send Email Send Email
 
> >as i can see there are more people having problems with
> this. I think
> >there should really be a note on the soap-lite site for other
> >developers.
> >
> >Btw: I only had trouble with -W (upper case), not with -w .
> >
> >Question: is this a bug?
> >
> Internally SOAP::Lite does turn off warnings at various
> points because of deliberate coding techniques that would
> otherwise cause warnings to be issued. Using -W has the
> effect of always issuing the warnings. Whether this is a
> problem may depend on the environment in which you are
> running. Using -W is not a problem when using an HTTP daemon;
> I get lots of warnings but it still works. You didn't say
> what your environment is. If there is a clearly repeatable
> problem then it does deserve a note in the documentation.
> Please can you clarify what you are doing?

Well, I am using a CGI-Server - no daemon. When starting a request,
nothing happens, the client is waiting for a response. A couple of
Minutes later, the client is aborting the request with a timeout.

BR,
Malte

#3639 From: "Madhukar Sinha" <madhukar.sinha@...>
Date: Fri Jun 4, 2004 2:17 pm
Subject: soaplite and SSL
madhukar_sinha
Send Email Send Email
 
Group-

I have to migrate my perl/soaplite based webservices (accessed by
apache soap clients) and also my perl/soaplite clients which access
java based webservices.

What do i need to do on Perl side. ? I saw in archives that people
have tried using Crypt::SSLeay . has it worked?

how do we supply client certificates ?

Also are there in links of docs where i could find useful info about
this.

What is the performance degardation from perl side? If i make
multiple SOAP calls in same script and i dont use cookies to track
session, then SSL auth will be done everytime (cert verification).
This would considerably slow each call.

Is there a way around this? Can session tracking avoid repeat
verification (only once done at beginning of session).

Please advise me

thanks
Madhukar

#3640 From: Mike Schroeder <MikeSchroeder@...>
Date: Fri Jun 4, 2004 3:09 pm
Subject: Possible to ovrride LWP::UserAgent?
MikeSchroeder@...
Send Email Send Email
 
Adding an environment variable for HTTP_proxy on my client wxPerl app
worked great to get around proxy firewalls - you gotta love when Perl
makes hard things easy.

Is it possible to override the LWP::UserAgent used by
SOAP::Transport::HTTP to use something like LWP::UserAgent::ProxyAny --
it has the feature of checking a Win32 client's Internet Explorer
settings for proxy settings in addition to checking the environment
variable - useless for my GTK or OS X clients, but would be very handy
for the majority of Win32 clients.  I couldn't find anything in the docs
or the mailing list about this - unless I just missed it.

Thanks in advance for any ideas.

#3641 From: Tilman Baumann <Tilman.Baumann@...>
Date: Fri Jun 4, 2004 3:41 pm
Subject: Re: soaplite and SSL
Tilman.Baumann@...
Send Email Send Email
 
For ssl usage at the server side, i used mod_proxy from apache.

In an ssl activatet apache location:
ProxyPass /proxy-url http://127.0.0.1:10000/

So you can access the locally running http daemon on proxy url
https://server/proxy-url

Of course thats not hat you are looking for.
Bu i think maybe this would be interesting for the group. Because i
found no way to make a https SOAP::Lite server as a daemon.
Alternatively you could use a LD_PRELOAD hack to use ssl socket instead
of normal sockets, but his is a uglu hack. More ugly than my. ;)

But to answer your request.
You have of just to build the perl module with ssl support and you will
be able to connect to a https webservice. (that schould be the way, dit
not test.)


Madhukar Sinha wrote:

>Group-
>
>I have to migrate my perl/soaplite based webservices (accessed by
>apache soap clients) and also my perl/soaplite clients which access
>java based webservices.
>
>What do i need to do on Perl side. ? I saw in archives that people
>have tried using Crypt::SSLeay . has it worked?
>
>how do we supply client certificates ?
>
>Also are there in links of docs where i could find useful info about
>this.
>
>What is the performance degardation from perl side? If i make
>multiple SOAP calls in same script and i dont use cookies to track
>session, then SSL auth will be done everytime (cert verification).
>This would considerably slow each call.
>
>Is there a way around this? Can session tracking avoid repeat
>verification (only once done at beginning of session).
>
>Please advise me
>
>thanks
>Madhukar
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>


--
Tilman Baumann

pyramid computer GmbH
Boetzinger Strasse 60 D-79111 Freiburg

----------------------------------
They who would give up an essential liberty for temporary security, deserve
neither liberty or security
- Benjamin Franklin

#3642 From: "chenlyc7" <chenl@...>
Date: Fri Jun 4, 2004 6:08 pm
Subject: Quick question -- Simple Fault handling
chenlyc7
Send Email Send Email
 
Hi,
    I'm trying to get our perl client to handle a very simple Fault
message from the server that has the following format:


<?xml version="1.0" encoding="UTF-8"?>
<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">
  <soapenv:Body>
   <soapenv:Fault>
    <faultcode>soapenv:Server.generalException</faultcode>
    <faultstring>A sample fault message here...</faultstring>
    <detail>
     <string>A sample fault message here...</string>
    </detail>
   </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>

how would one be able to retrieve the strings in faultstring and
detail tags if the hypothetical client had the following code:

$soap_response= SOAP::Lite
     -> uri('<URI of the service>')
     -> proxy('http://address_here')
     -> methodName(SOAP::Data->name(arg0 => \@arg0stuff),
SOAP::Data->name(arg1 => \@arg1stuff), SOAP::Data->name(arg2
=>\@arg2stuff))
     -> result;

? I am new to this and would like to quickly setup an example for perl
to handle simple faults as described above.

Thanks in advance!

#3643 From: "Sinha, Madhukar [IT]" <madhukar.sinha@...>
Date: Fri Jun 4, 2004 6:29 pm
Subject: RE: soaplite and SSL
madhukar_sinha
Send Email Send Email
 
thanks..  You last suggestion was very high level. Could you let me how to build
with SSL support. what extra things i need?

also how do i supply certificates?



-----Original Message-----
From: Tilman Baumann [mailto:tilman.baumann@...]
Sent: Friday, June 04, 2004 11:41 AM
To: Sinha, Madhukar [IT]
Cc: soaplite@yahoogroups.com
Subject: Re: [soaplite] soaplite and SSL


For ssl usage at the server side, i used mod_proxy from apache.

In an ssl activatet apache location:
ProxyPass /proxy-url http://127.0.0.1:10000/

So you can access the locally running http daemon on proxy url
https://server/proxy-url

Of course thats not hat you are looking for.
Bu i think maybe this would be interesting for the group. Because i
found no way to make a https SOAP::Lite server as a daemon.
Alternatively you could use a LD_PRELOAD hack to use ssl socket instead
of normal sockets, but his is a uglu hack. More ugly than my. ;)

But to answer your request.
You have of just to build the perl module with ssl support and you will
be able to connect to a https webservice. (that schould be the way, dit
not test.)


Madhukar Sinha wrote:

>Group-
>
>I have to migrate my perl/soaplite based webservices (accessed by
>apache soap clients) and also my perl/soaplite clients which access
>java based webservices.
>
>What do i need to do on Perl side. ? I saw in archives that people
>have tried using Crypt::SSLeay . has it worked?
>
>how do we supply client certificates ?
>
>Also are there in links of docs where i could find useful info about
>this.
>
>What is the performance degardation from perl side? If i make
>multiple SOAP calls in same script and i dont use cookies to track
>session, then SSL auth will be done everytime (cert verification).
>This would considerably slow each call.
>
>Is there a way around this? Can session tracking avoid repeat
>verification (only once done at beginning of session).
>
>Please advise me
>
>thanks
>Madhukar
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>


--
Tilman Baumann

pyramid computer GmbH
Boetzinger Strasse 60 D-79111 Freiburg

----------------------------------
They who would give up an essential liberty for temporary security, deserve
neither liberty or security
- Benjamin Franklin

#3644 From: "Mitchell, Louise M" <Louise.Mitchell@...>
Date: Fri Jun 4, 2004 7:26 pm
Subject: RE: Quick question -- Simple Fault handling
d3j051
Send Email Send Email
 
if ($response->fault)
   {
     die $response->faultstring;
   }
else
   {
     my $result = $response->result;
     return $result;
     #my %result = %{$response->result};
     #print map("$_: @{[$result{$_} || '']}\n", keys %result), "\n";
   }

-----Original Message-----
From: chenlyc7 [mailto:chenl@...]
Sent: Friday, June 04, 2004 11:08 AM
To: soaplite@yahoogroups.com
Subject: [soaplite] Quick question -- Simple Fault handling


Hi,
    I'm trying to get our perl client to handle a very simple Fault
message from the server that has the following format:


<?xml version="1.0" encoding="UTF-8"?>
<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">
  <soapenv:Body>
   <soapenv:Fault>
    <faultcode>soapenv:Server.generalException</faultcode>
    <faultstring>A sample fault message here...</faultstring>
    <detail>
     <string>A sample fault message here...</string>
    </detail>
   </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>

how would one be able to retrieve the strings in faultstring and detail
tags if the hypothetical client had the following code:

$soap_response= SOAP::Lite
     -> uri('<URI of the service>')
     -> proxy('http://address_here')
     -> methodName(SOAP::Data->name(arg0 => \@arg0stuff),
SOAP::Data->name(arg1 => \@arg1stuff), SOAP::Data->name(arg2
=>\@arg2stuff))
     -> result;

? I am new to this and would like to quickly setup an example for perl
to handle simple faults as described above.

Thanks in advance!





Yahoo! Groups Links

#3645 From: YU Fan <fanyu_ca@...>
Date: Sun Jun 6, 2004 1:24 am
Subject: RE: Quick question -- Simple Fault handling
fanyu_ca
Send Email Send Email
 
A simpler way:

$soap_response= SOAP::Lite
     -> uri('<URI of the service>')
     -> proxy('http://address_here')
     -> methodName()
     -> result
     -> on_fault(sub { my($soap, $res) = @_;
          die ref $res ? $res->faultstring :
$soap->transport->status, "\n";
        });


-Yu


--- "Mitchell, Louise M" <Louise.Mitchell@...>
wrote:
> if ($response->fault)
>   {
>     die $response->faultstring;
>   }
> else
>   {
>     my $result = $response->result;
>     return $result;
>     #my %result = %{$response->result};
>     #print map("$_: @{[$result{$_} || '']}\n", keys
> %result), "\n";
>   }
>
> -----Original Message-----
> From: chenlyc7 [mailto:chenl@...]
> Sent: Friday, June 04, 2004 11:08 AM
> To: soaplite@yahoogroups.com
> Subject: [soaplite] Quick question -- Simple Fault
> handling
>
>
> Hi,
>    I'm trying to get our perl client to handle a
> very simple Fault
> message from the server that has the following
> format:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <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">
>  <soapenv:Body>
>   <soapenv:Fault>
>
>
<faultcode>soapenv:Server.generalException</faultcode>
>    <faultstring>A sample fault message
> here...</faultstring>
>    <detail>
>     <string>A sample fault message here...</string>
>    </detail>
>   </soapenv:Fault>
>  </soapenv:Body>
> </soapenv:Envelope>
>
> how would one be able to retrieve the strings in
> faultstring and detail
> tags if the hypothetical client had the following
> code:
>
> $soap_response= SOAP::Lite
>     -> uri('<URI of the service>')
>     -> proxy('http://address_here')
>     -> methodName(SOAP::Data->name(arg0 =>
> \@arg0stuff),
> SOAP::Data->name(arg1 => \@arg1stuff),
> SOAP::Data->name(arg2
> =>\@arg2stuff))
>     -> result;
>
> ? I am new to this and would like to quickly setup
> an example for perl
> to handle simple faults as described above.
>
> Thanks in advance!
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>





__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/

Messages 3616 - 3645 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