SOAP::...erator(3pm)

πŸ’– SOAP::...erator πŸ’– β€” the perl manual page, but make it a group chat

okay so bestie, this is the User Contributed Perl Documentation page for SOAP::...erator(3pm) β€” except the full name is SOAP::WSDL::Factory:Generator, and yes that colon situation is giving what it's giving. Sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

SOAP::WSDL::Factory:Generator β€” the Factory for retrieving generator objects. it's literally the matchmaker of your SOAP setup πŸ’…


✨ SYNOPSIS ✨

here's the whole vibe in code form, no cap:

 # from SOAP::WSDL::Client:
 $generator = SOAP::WSDL::Factory::Generator->get_generator({
     soap_version => $soap_version,
 });

 # in generator class:
 package MyWickedGenerator;
 use SOAP::WSDL::Factory::Generator;

 # register as generator for SOAP1.2 messages
 SOAP::WSDL::Factory::Generator->register( '1.2' , __PACKAGE__ );

see how easy that is?? slay. ✨


✨ DESCRIPTION ✨

SOAP::WSDL::Factory::Generator is the factory bestie whose entire job is fetching generator objects for SOAP::WSDL. she does not do the actual work herself β€” that's giving delegation energy, and honestly? iconic. πŸ‘‘

the real hands-on labour is done by specific generator classes. our factory here is just the one making the introductions.

and SOAP::WSDL::Generator will try to load one of the following classes:

  • the class registered for the scheme via register()

that's the list. one item. she has standards. πŸ’…


✨ METHODS ✨

🌸 register

 SOAP::WSDL::Generator->register('Lite', 'MyWickedGenerator');

Globally registers a class for use as generator class. like, worldwide announcement energy. πŸ“’

🌸 get_generator

Returns an object of the generator class for this endpoint. that's it, that's the whole job, and she eats every time 🍽️✨


✨ WRITING YOUR OWN GENERATOR CLASS ✨

diying your own generator?? main character energy fr fr. here's how 🫢

πŸ¦‹ Registering a generator

Generator classes are absolutely allowed to register with SOAP::WSDL::Factory::Generator. it's an open-door policy, we love to see it.

Registering a generator class with SOAP::WSDL::Factory::Generator is done by executing the following code β€” where $version is the SOAP version the class should be used for, and $class is the class name:

 SOAP::WSDL::Factory::Generator->register( $version, $class);

and to auto-register your transport class on loading, just execute register() in your generator class (peep the SYNOPSIS above, bestie, it's all there).

lowkey note the terminology there β€” it does say "your transport class" in this paragraph. keeping it exactly as written, we don't rewrite the lore. πŸ™ˆ

πŸ¦‹ Generator package layout

Generator modules must be named equal to the generator class they contain. and listen β€” there can only be one generator class per generator module. monogamy, but for packages. πŸ’€

πŸ¦‹ Methods to implement

Generator classes must implement the following methods:

  • new β€” the Constructor. every class's origin story.
  • generate β€” Generate SOAP interface ✨

Generators may implement one or more of the following configuration methods. All of them are tried via can() by wsdl2perl. (yes, can() β€” it's checking what you're capable of, very "do you have the range" of it.)

  • set_wsdl β€” Set the raw WSDL XML. Implement this if you have your own WSDL parser. bringing your own parser to the function, respect. 🫑
  • set_definitions β€” Sets the (parsed) SOAP::WSDL::Definitions object.
  • set_type_prefix β€” Sets the prefix for XML Schema type classes.
  • set_element_prefix β€” Sets the prefix for XML Schema element classes.
  • set_typemap_prefix β€” Sets the prefix for typemap classes (class resolvers).
  • set_interface_prefix β€” Sets the prefix for interface classes.
  • set_typemap β€” Set user-defined typemap snippet. customisation queen πŸ‘‘

Copyright 2007 Martin Kutter. All rights reserved.

This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself.

(yes that's the real legal text, we keep legal text untouched β€” do not come for me, I am simply the messenger πŸ’…)


✨ AUTHOR ✨

Martin Kutter <martin.kutter fen-net.de>


✨ REPOSITORY INFORMATION ✨

 $Rev: 176 $
 $LastChangedBy: kutterma $
 $Id: Serializer.pm 176 2007-08-31 15:28:29Z kutterma $
 $HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $

okay that's the entire page, you made it, I'm so proud πŸ₯ΉπŸ’œ

and for the cute sign-off: this whole thing is perl v5.36.0, dated 2022-10-14, and yes bestie β€” the manual page title really does look like SOAP::...erator(3pm) up in that header, that's not a typo, that's just how the truncation ate. periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from