WSDL2PERL(1p)

πŸ“¦
version 3.004 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 getting FooAttributes, FooTypes, FooElements and 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 must eval() 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 FYI wsdl2perl will lowkey use the proxy settings you've got set via the HTTP_PROXY and HTTPS_PROXY environment 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, wsdl2perl will 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