Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

exeunt (319)

  reversethis-{} {ta} {izaguf}

My perlmonks Personal Node []

Journal of exeunt (319)

Tuesday August 20, 2002
05:21 PM

SOAP::Lite issues

[ #7202 ]
I don't know much about SOAP, other then it's on my list of things to play with in the future.

Recently I was asked to "test" a WebService with perl, it was pretty simple.

use SOAP::Lite;
print SOAP::Lite->service('http://webserver/Hello/Service1.asmx?WSDL')->Hello("test");

It should print out "Hello test", but all it prints out is just "Hello".

Putting trace => qw(debug) into the use statement provides some nifty output.

(xml formatting done by me)

SOAP::Transport::HTTP::Client::send_receive: POST http://webserver/Hello/Service1.asmx
Accept: text/xml
Accept: multipart/*
Content-Length: 445
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://webserver/webservices/Hello"

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC=""
        <Hello xmlns="">

SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Connection: close
Date: Tue, 20 Aug 2002 21:51:25 GMT
Server: Microsoft-IIS/5.0
Content-Length: 349
Content-Type: text/xml; charset=utf-8
Client-Date: Tue, 20 Aug 2002 21:50:05 GMT
Client-Response-Num: 1

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap=""
        <HelloResponse xmlns="http://webserver/webservices">
            <HelloResult>Hello </HelloResult>

It appears it is missing the xmlns in the <Hello> tag, but nothing major.

From the actual WSDL file, the appropriate spots for SOAP requests (regular SOAP and GET ones)

<message name="HelloSoapIn">
    <part name="parameters" element="s0:Hello" />
<message name="HelloHttpGetIn">
    <part name="sender" type="s:string" />
<message name="HelloHttpPostIn">
    <part name="sender" type="s:string" />

And according to the "sample" ones, this is how it should be formatted for SOAP requests.

    <Hello xmlns="http://webserver/webservices">

To me it appears it contradicts itself, in the WSDL file, it wants <parameters>, which SOAP::Lite is doing.

On the other hand, according to this other page, it is wanting <sender>, which is for GET, not SOAP requests.

If anyone has any solutions, or pointers, let me know!

Of, and if it helps, the webservice is running off some .NET implimentation, I can get more details about any of this if needed.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • It doesn't look to me at all that it wants parameters. That's just to say that that part comes from one of the params.

    However you found the most likely answer for yourself: the xmlns is undefined! You're not at all sending what the other end is expecting, you're sending a completely different set of elements (they have no namespace).


    -- Robin Berjon []

    • I thought it should set the namespace automaticly. Is there a way I can hard code it, to test it?
      • I'm sorry but I have no idea, I haven't used SOAP in ages... it may be a bug, or you may need to set an option. Perhaps that posting to the perl-xml list would yield some answers there.


        -- Robin Berjon []