SOAP::Lite issues

exeunt on 2002-08-20T22:21:12

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"

Test

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

Hello

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

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



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

string

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

On the other hand, according to this other page, it is wanting , 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.


xmlns

darobin on 2002-08-21T09:28:44

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).

Re:xmlns

exeunt on 2002-08-21T15:00:26

I thought it should set the namespace automaticly. Is there a way I can hard code it, to test it?

Re:xmlns

darobin on 2002-08-21T20:17:33

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.