Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

SOAP::WSDL problems

by nyxOne (Initiate)
on Nov 13, 2008 at 21:48 UTC ( #723516=perlquestion: print w/replies, xml ) Need Help??

nyxOne has asked for the wisdom of the Perl Monks concerning the following question:

Hi, my name is Charles and this is my first post here ... although i've been around reading alot.

I'm currently facing a problem I'm not able solve by myself. I'm trying to build a client base on SOAP::WSDL as it seems to be more recommanded than SOAP::LITE; I've done alot of reading here, on the CPAN forum and a few others and I'm still not able to make it through it.

I'm sure one of the post i've read had the answer to my problem but there is so much Technical terms to learn only for SOAP that i end up a bit more confused after each reading.

And so to be brief, Here's the code :

#------------------- my $USER = "evouser" ; my $PASS = "xxxxxxx" ; my $PROTOCOL = "http" ; # http or https my $SERVER = "" ; # IP or hostname of soap adapter my $PORT = 8095 ; # port number SOAP server is run +ning on my $WSDL_LOC = "/evo-soap/services/EvoServerSoapService?wsdl" ; # build the WSDL URL my $WSDL_URL = $PROTOCOL . "://" . $SERVER . ":" . $PORT . $WSDL_LOC ; print "Using SOAP WSDL located at: \n " . $WSDL_URL . "\n" ; print "Creating the SOAP service ....\n" ; my $service = SOAP::WSDL->new( wsdl => $WSDL_URL ) ;
AND BANG : cannot import document for namespace >< without location at /usr/lib/perl5/site_perl/5.8.8/SOAP/WSDL/Expat/ line 84.

I've also tried to make it work as it's seem to be THE recommanded way but it ... didn't work!
perl -b evoapp

No matter what i try it's cannot get SOAP::WSDL to work!

On the good side, i'm able to do whatever i want with SOAP::LITE and SoapUI(not perl related). It's just that i don't really like the approach of SOAP::LITE; The code feels "clunky".

You can try the WSDL here :

Now I'm begging you! Please forgive my ignorance and enlightenment me!! ;)

Charles D.

Replies are listed 'Best First'.
Re: SOAP::WSDL problems
by sm@sh (Acolyte) on Nov 14, 2008 at 00:11 UTC

    I've had some experience using SOAP::WSDL, including bug fixes.

    The message you're getting is just a warning, as the schemaLocation attribute (the URI for the xsd) is missing (it's optional).

    However, I found that wdsl2perl actually bombs with the error:

    "unsupported global type <xsd:string> found in part extID at /usr/local/share/perl/5.8.8/SOAP/WSDL/Generator/Iterator/ line 75."

    This is caused by the WSDL element:

    <wsdl:part name="extID" type="xsd:string">

    This implies document/literal semantics which is not alloed if the WSDL is to meet the WS-I standard. (Hell, I'm bluffing - I can't remember exactly what that means :)

    Anyway, SOAP::WSDL is quite strict about adhering to the WS-I standard. I think this allows it to cover a manageable amount of functionality.

    The WSDL looks like it was auto-generated - can you say which tools were used to generate it?

    Using tools such as Apache Axis will (I believe) generally lead to success as it should produce WS-I compliant WDSL.

    The problem with SOAP::Lite is that it simply doesn't handle complex types.

      Hi sm@sh, The WSDL is auto-generated from Axis2.

      I've tried again today to use wsdl2perl. The manual says "Look what has been generated

      Check the results of the generator. There should be one MyInterfaces/SERVICE_NAME/ file per port (and one directory per service).

      Unfortunately it's not my case and (oh shame) i don't understand why!
      I've looked at wsdl2perl options but there is place to specify a default service_name and/or port_name.

      I feel kind of embarrest as i really don't know what i can do to help myself. I've taken a good look to the exemples given, made a couple of search and well... it's still not working!

      If you have any suggestion, i willing to try it!

Re: SOAP::WSDL problems
by Discipulus (Abbot) on Nov 14, 2008 at 08:21 UTC
    can some very wise monk write a skeleton-like tutorial on this not-so-easy issue of publishing a proper WSDL to make a Perl SOAP to be consumable for everyone ?? I'have used to validate WSDL but until now I cannot serve complex types to .Net clients..

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://723516]
Approved by Fletch
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2020-07-06 02:14 GMT
Find Nodes?
    Voting Booth?

    No recent polls found