Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6780131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:28:10+00:00 2026-05-26T16:28:10+00:00

I have a problem passing a string argument using Perl. The following code #!/usr/bin/perl

  • 0

I have a problem passing a string argument using Perl. The following code

#!/usr/bin/perl -w
use SOAP::Lite;
my $service = SOAP::Lite->service('http://localhost:8080/greeting?wsdl');
print $service->greetClient('perl wooooo'), "\n";

Results in

Greeting null! Have a nice day…

A similar python code

from suds.client import Client
client = Client('http://localhost:8080/greeting?wsdl')
print client.service.greetClient('python wooooo')

works perfectly

Greeting python wooooo! Have a nice day…

I tried to set different encodings

print $service->encoding('utf-8')->greetClient("perl wooooo"), "\n";

with the same result.

A SOAP Monitor shows that there is no arg0 in a case of Perl

<greetClient xsi:nil="true"  xsi:type="tns:greetClient" />

which is present in a case of Python

<ns0:greetClient>
  <arg0>python wooooo</arg0>
</ns0:greetClient>

What can be a problem?

Why it’s so complicated to implement a SOAP client with Perl compared to Python?

EDIT:
SOLUTION

Finally the following solution is working

#!/usr/bin/perl -w
use strict;
use warnings;
use XML::Compile::SOAP11;
use XML::Compile::WSDL11;
use XML::Compile::Transport::SOAPHTTP;

my $soap = XML::Compile::WSDL11->new('c:/temp/greeting.wsdl');
my $call = $soap->compileClient('greetClient');
print $call->(arg0 => 'perl wooooo'){'greetClientResponse'}{'return'}, "\n";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:28:10+00:00Added an answer on May 26, 2026 at 4:28 pm

    SOAP::Lite can be infuriatingly bad. You might give XML::Compile::SOAP a try:

    use strict;
    use warnings;
    use XML::Compile::SOAP11;
    use XML::Compile::WSDL11;
    use XML::Compile::Transport::SOAPHTTP;
    
    my $soap = XML::Compile::WSDL11->new(
        'http://localhost:8080/greeting?wsdl',
        schema_dirs => [
            'c:/soft/Perl/site/lib/XML/Compile/SOAP11/xsd'
            'c:/soft/Perl/site/lib/XML/Compile/XOP/xsd'
            'c:/soft/Perl/site/lib/XML/Compile/xsd'
        ]
    );
    $soap->compileCalls;
    my ( $response, $trace ) = $soap->call( 'greetClient', arg0 => 'perl wooooo' );
    $trace->printResponse;
    

    $response will be the call response converted to a hashref via XML::Simple, which may be all you need. The $trace object is handy to see what the raw XML response looks like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

m having problem in passing parameter to controller action, i have done the following
I have a problem passing by reference int or string variables to C++ ActiveX
I'm experimenting with WCF Services, and have come across a problem with passing Interfaces.
My problem is similar to Django Passing Custom Form Parameters to Formset Ive have
I am having a problem with views. I have a view and am passing
I have a problem while pasting my contents (or text) generated by Java code
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I am having a problem passing a json string back to a php script
I have some problem with passing a WebView from the first activity to the
In my MVC application I have a problem with passing data from view to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.