WSDL2PERL(1p)
π NAME π
wsdl2perl β create perl bindings for SOAP webservices.
Okay so real talk: this page is WSDL2PERL(1p), straight out of the User Contributed Perl Documentation, and it's here to turn your big scary WSDL into actual perl classes you can justβ¦ use. No cap. π«Ά
β¨ SYNOPSIS β¨
wsdl2perl -t TYPE_PREFIX -e ELEMENT_PREFIX -m TYPEMAP_PREFIX \
-i INTERFACE_PREFIX -b BASE_DIR URL
That's the whole vibe. Options first, URL last, slay. π
π OPTIONS π
The original lays these out in a cute little NAME / SHORT / DESCRIPTION table, but bestie we're doing bullets because bullets just hit different. Every single one is here, promise. πΈ
-p,--prefixβ the prefix for all those generated classes. Like if you set-p=Foo, you're gettingFooAttributes,FooTypes,FooElementsand so on. It's giving main character naming energy. π-a,--attribute_prefixβ prefix for the XML attribute classes. Default:MyAttributes-t,--type_prefixβ prefix for the type classes. Default:MyTypes-e,--element_prefixβ prefix for the element classes. Default:MyElements-m,--typemap_prefixβ prefix for the typemap classes. Default:MyTypemaps-i,--interface_prefixβ prefix for the interface classes. Default:MyInterfaces-sp,--server_prefixβ prefix for the server classes. Default:MyServer-b,--base_pathβ the path where classes get created. Default:.(aka right here, right now, no thoughts head empty π )-mi,--typemap_includeβ a file to include in the typemap. It musteval()to a valid perl hash β and that's a hash, not a hash ref, bestie, don't do it, I'm begging π-x,--proxyβ HTTP(S) proxy to use (if any). Also FYIwsdl2perlwill lowkey use the proxy settings you've got set via theHTTP_PROXYandHTTPS_PROXYenvironment variables. Sneaky but helpful. π--keep_aliveβ use http keep_alive.--userβ username, for HTTP authentication.--passwordβ the password. And if you don't hand one over,wsdl2perlwill straight up prompt you for it. π-g,--generatorβ which generator to use. Default:XSD-s,--serverβ generate a server interface (currently only CGI is supported).-h,--helpβ show help content. Self care is asking for help. π§
π¦ DESCRIPTION π¦
Generates a interface class for a SOAP web service described by a WSDL definition. That's the whole job. Simple on the tin, iconic in practice. β¨
The following classes are created:
- A interface class for every SOAP port in service
Interface classes are what you will mainly deal with: They provide a method for accessing every web service method.
If you chose to generate Server interfaces, a class for every SOAP port in every Web service.
You'll have to implement a method for each of the implemented methods. You may implement these methods in the CGI script / handler, or in any class to dispatch calls to.
- A typemap for every service
Typemaps are used internally by SOAP::WSDL for parsing the SOAP message into object trees.
If the WSDL definition is incomplete, you may need to add some lines to your typemap. Especially definitions for faults are sometimes left out.
Additional typemap content may be included by passing a file name as typemap_include (mi) option.
- A type class for every element, complexType or simpleType definition
You may need to write additional type classes if your WSDL is incomplete.
For writing your own lib classes, see SOAP::WSDL::XSD::Typelib::Element, SOAP::WSDL::XSD::Typelib::ComplexType and SOAP::WSDL::XSD::Typelib::SimpleType.
π§ TROUBLESHOOTING π§
π Accessing HTTPS URLs
You need Crypt::SSLeay installed for accessing HTTPS URLs. That's it, that's the requirement. Go install it, bestie. π
π Accessing protected documents
Use the -u option for specifying the user name. You will be prompted for a password.
Alternatively, you may specify a password with --password on the command line.
π§© Accessing documents protected by NTLM authentication
Set the --keep_alive option.
Note that accessing documents protected by NTLM authentication is currently untested, because I have no access to a system using NTLM authentication. If you try it, I would be glad if you could just drop me a note about success or failure. π
π LICENSE π
Copyright 2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself
π AUTHOR π
Martin Kutter <martin.kutter fen-net.de>
And that's the page!! perl v5.36.0, dated 2022-10-14 β shoutout to the WSDL2PERL(1p) era, we love a classic. Go forth and generate, you've absolutely got this. πβ¨ππ¦πΈπ
π¦ where this page comes from
- ubuntu noble: libsoap-wsdl-perl 3.004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsoap-wsdl-perl 3.004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsoap-wsdl-perl 3.004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms