NAME
Bio::DB::ESoap::WSDL - WSDL parsing for Entrez SOAP EUtilities
SYNOPSIS
Used by Bio::DB::ESoap
# url$wsdl = Bio::DB::ESoap::WSDL->new(-url => "http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/eutils.wsdl");# local copy$wsdl = Bio::DB::ESoap::WSDL->new(-wsdl => "local/eutils.wsdl");%opns = %{ $wsdl->operations };
DESCRIPTION
This module is a lightweight parser and container for WSDL XML files associated with the NCBI EUtilities SOAP server. XML facilities are provided by XML::Twig.
The following accessors provide names and structures useful for creating SOAP messages using SOAP::Lite (e.g.):
service() : the URL of the SOAP serviceoperations() : hashref of the form {.., $operation_name => $soapAction, ...}request_parameters($operation) :request field names and namelists as an array of hashesresult_parameters($operation) :result field names and namelists as an array of hashes
The following accessors provide XML::Twig::Elt objects pointing at key locations in the WSDL:
root : the root of the WSDL docment_types_elt : the <types> element_portType_elt : the <portType> element_binding_elt : the <binding> element_service_elt : the <service> element_message_elts : an array of all top-level <message> elements_operation_elts : an array of all <operation> elements contained in <binding>
Parsing occurs lazily (on first read, not on construction); all information is cached. To clear the cache and force re-parsing, run
$wsdl->clear_cache;
The globals $NCBI_BASEURL, $NCBI_ADAPTOR, and %WSDL are exported.
$NCBI_ADAPTOR : the soap service cgi
To construct a URL for a WSDL:
$wsdl_eutils = $NCBI_BASEURL.$WSDL{'eutils'}$wsdl_efetch_omim = $NCBI_BASEURL.$WSDL{'f_omim'}# etc.
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:
http://redmine.open-bio.org/projects/bioperl/
AUTHOR - Mark A. Jensen
Email maj -at- fortinbras -dot- us
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : my $obj = new Bio::DB::ESoap::WSDL();Function: Builds a new Bio::DB::ESoap::WSDL objectReturns : an instance of Bio::DB::ESoap::WSDLArgs : named args:-URL => $url_of_desired_wsdl -OR--WSDL => $filename_of_local_wsdl_copy( -WSDL will take precedence if both specified )
Getters
request_parameters()
Title : request_parametersUsage : @params = $wsdl->request_parameters($operation_name)Function: get array of request (input) fields required byspecified operation, according to the WSDLReturns : hash of arrays of hashes...Args : scalar string (operation or action name)
result_parameters()
Title : result_parametersUsage : $result_hash = $wsdl->result_parametersFunction: retrieve a hash structure describing theresult of running the specified operationaccording to the WSDLReturns : hash of arrays of hashes...Args : operation (scalar string)
operations()
Title : operationsUsage : @opns = $wsdl->operations;Function: get a hashref with elts ( $operation_name => $soapAction )for all operations defined by this WSDLReturns : array of scalar stringsArgs : none
service()
Title : serviceUsage : $wsdl->serviceFunction: gets the SOAP service url associated with this WSDLReturns : scalar stringArgs : none
db()
Title : dbUsage :Function: If this is an efetch WSDL, returns the db nameassociated with itReturns : scalar string or undefArgs : none
Internals
_operation_bookmarks()
Title : _operation_bookmarksUsage :Function: find useful WSDL elements associated with the specifiedoperation; return a hashref of the form{ $key => $XML_Twig_Elt_obj, }Returns : hashref with keys:portType namespace schemai_msg_type i_msg_elto_msg_type o_msg_eltArgs : operation name (scalar string)Note : will import schema if necessary
_parse()
Title : _parseUsage : $wsdl->_parseFunction: parse the wsdl at url and create accessors forsection twig eltsReturns : selfArgs :
root()
Title : rootUsage : $obj->root($newval)Function: holds the root Twig elt of the parsed WSDLExample :Returns : value of root (an XML::Twig::Elt)Args : on set, new value (an XML::Twig::Elt or undef, optional)
url()
Title : urlUsage : $obj->url($newval)Function: get/set the WSDL urlExample :Returns : value of url (a scalar string)Args : on set, new value (a scalar or undef, optional)
wsdl()
Title : wsdlUsage : $obj->wsdl($newval)Function: get/set wsdl XML filenameExample :Returns : value of wsdl (a scalar string)Args : on set, new value (a scalar string or undef, optional)
_twig()
Title : _twigUsage : $obj->_twig($newval)Function: XML::Twig object for handling the wsdlExample :Returns : value of _twig (a scalar)Args : on set, new value (a scalar or undef, optional)
_sections()
Title : _sectionsUsage : $obj->_sections($newval)Function: holds hashref of twigs corresponding to main wsdlelements; filled by _parse()Example :Returns : value of _sections (a scalar)Args : on set, new value (a scalar or undef, optional)
_cache()
Title : _cacheUsage : $wsdl->_cache($newval)Function: holds the wsdl info cacheExample :Returns : value of _cache (a scalar)Args : on set, new value (a scalar or undef, optional)
_parsed()
Title : _parsedUsage : $obj->_parsed($newval)Function: flag to indicate wsdl already parsedExample :Returns : value of _parsed (a scalar)Args : on set, new value (a scalar or undef, optional)