SOAP::WSDL, wsdl2perl and soap 1.2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi all,
  I am trying to generate access classes for a webservice client using
wsdl2perl and I am encountering some problems:
1) The interface class is not created.
the wsdl I have uses soap1.2 namespace, if I change it to use plain
soap (" /") wsdl2perl manages to
create the interface class but then I get problem number 2

2) When I try to make a call using the autogenerated interface, the
remote server (over which I have no control) responds with:
"Cannot process the message because the content type 'text/xml;
charset=utf-8' was not the expected type 'application/soap+xml;

wsdl2perl also gives me the following warnings:
"XML Schema element <appinfo> is not implemented yet at /usr/share/
perl5/SOAP/WSDL/Expat/ line 254." (I get 4 of these).
"found unrecognised attribute { /
wsdl}Action (ignored) at /usr/share/perl5/SOAP/WSDL/ line 130."
The latter comes from this element in the wsdl: '<wsdl:input
wsaw:Action=" ....'
Apparently it is not allowed to use namespaces for attribute names ?
(wsaw is " " in case that

I believe the server is a .NET thing.

I am quite unexperienced when it comes to XML and SOAP, any pointer
will be appreciated.


Re: SOAP::WSDL, wsdl2perl and soap 1.2

On 08/04/2010 08:15, Me wrote:
Quoted text here. Click to load it

I've not tried wsdl2perl but I have generated Perl clients for non-Perl
SOAP services and .Net clients for Perl SOAP services.

SOAP 1.2 tends to choke a few tools I've tried. I had to resort to trial
and error on one occasion.

Perl modules such as SOAP::Lite are oriented to RPC/encoded style of
SOAP calls whereas .Net is oriented towards Doc/Literal.

RPC/encoded example

         <param xsi:type="xsd:int">123</param>

DOC/Literal example


Doc/Literal/Wrapped is a kind of combination of these two styles.

In past cases I've found the easiest approach is to use a sniffer
(Wireshark is good) on a .Net client and tweak my Perl client until the
on-the-wire packets match those of the .Net client. Obviously you can't
do this if you don't have a sample .Net client (or can't generate one
with .Net tools or mono etc).

There's also a difference in the way the HTTP SOAPAction header is

   $request->header(SOAPAction => qq("$uri#$method")); # perl service
   $request->header(SOAPAction => qq("$uri/$method")); # java service
   $request->header(SOAPAction => qq(""));             # java service

Some services don't care about the SOAPAction header, others do. Experiment.

The *Simple* Object Access Protocol *isn't* simple and real-life
interoperability is disappointing.


Re: SOAP::WSDL, wsdl2perl and soap 1.2

Quoted text here. Click to load it

yep, I am beginning to realise that.

Site Timeline