Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    eBay::API::XML::BaseCall 0.25

    Download button

    No screenshots available
    Downloads: 336  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jeff Nokes | More programs
    Perl Artistic License / FREE
    October 4th, 2007, 22:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    eBay::API::XML::BaseCall description

    A library intended to provide a Perl based interface for the public eBay web services API

    eBay::API::XML::BaseCall is a library intended to provide a Perl based interface for the public eBay web services API.

    Subroutines:

    new()

    reset()

    Description: Use 'reset' method in cases when you want to reuse a Call instance

    execute()

    _getHttpRequestObject()

    getHttpRequestAsString()

    Arguments: 1 [O] - isPrettyPrint - if set then XML is pretty printed

    Returns: string Method returning a textual representation of the request (request type, url, query string, header and content).

    _getRequestHeader()
    getRequestDataType()
    getResponseDataType()
    _setHttpResponseObject()
    _getHttpResponseObject()
    isHttpRequestSubmitted()

    Tells to a programmer whether a request has been submitted or not. This method is mainly used in Session in sequential mode.

    getHttpResponseAsString()
    getResponseRawXml()
    _setXmlSimpleDataStructure()

    Keep XML::Simple data structure after parsing the response XML

    getXmlSimpleDataStructure()

    Returns XML::Simple data structure for a given path. Path is defined as a reference to an array of node names, starting with the top level node and ending with lowest level node.

    Path IS NOT an XPATH string!!!!


    Path examples for VerifyAddItem call: @path = ( 'Fees','Fee' ); # Returns fees as an XML::Simple data structure @path = ( 'Errors' ); # Returns Response errors as an XML::Simple # data structure @path = ( 'Errors-xxxx' ); # Will not find anything

    Notice that root node is not being specified. The reason for that is that we XML::Simple is configured not to put root node into its data structure (that is a default behaviour for XML::Simple).

    If path is not submitted return the whole XML::Simple data structure

    _setResponseValidXml()

    Access: private Sets whether a response is a valid XML document or not.

    isResponseValidXml()

    Access: public Returns: true (1) if a response is a valid XML document or not. false (0) if a response is NOT a valid XML document or not. Note: It allows us to differentiate cases the following cases: a) Response is a valid XML with API errors b) Response is not a valid XML document at all or HTTP connection failed. Most likely it should not be used a lot.

    hasErrors()

    If an API call return errors (API, HTTP connection or XML parsing errors) the application should stop normal processing and return a "system error" message to an application user. The only things that it makes sense to read from ResponseDataType objects are: errors and rawResponse (which in this case might not even be a valid XML document).

    hasWarnings()

    getErrors()

    Returns: a reference to an array of errors (it can retu This method overrides BaseCallGen::getErrors method, while _getResponseErrors is basically the same method that exists in BaseCallGen

    getWarnings()
    _hasErrorsForSeverityCode()
    _getErrorsForSeverityCode()
    getErrorsAndWarnings()

    Returns: reference to an array Array contains all errors returned by API call, regardless of SeverityCode Includes both SeverityCodes: 'Error' and 'Warning'

    hasError()

    Arguments: [0] [R] - errorCode

    Returns: 1 - if an error with the given error code is found 0 - if no error with the given error code is returned

    getResponsErrors()
    getEBayOfficialTime()
    _prettyPrintFormat()

    Arguments: 1 [R] pHttpR - either an HTTP::Request or HTTP:Response object Description: Formats HTTP::Request/HTTP::Response as a string. Includes: header and content. XML content is pretty printed.

    setRequestRawXml()
    getRequestRawXml()
    _initRequest()
    _initResponse()
    forceError()


    Arguments: This method uses named argument calling style that looks like this: $self->forceError ( sErrorCode => '1025', sShortMsg => 'Test API error', ... );

    Required arguments
    1 - sErrorCode - API error code
    2 - sShortMsg - short error message
    3 - sLongMsg - long error message
    Optional arguments
    4 - sSeverityCode - severity code
    default severity code:
    eBay::API::XML::DataType::Enum::SeverityCodeType::Error
    5 - sErrorClassificationCode - error classification code
    default error classification code
    eBay::API::XML::DataType::Enum::ErrorClassificationCodeType::SystemError
    Example: $call->forceError ( 'sErrorCode' => '1025' ,'sShortMsg' => 'Test error short message' ,'sLongMsg' => 'Test error long message' );

    Description: This method is used to force a given error when a call is being executed. If the forced error is set, then that error is being returned by the call without executing the call (sending request to the API Server and receiving the response. This method is used for test purposes when a programmer wants to test how the application handles an API error.

    getApiCallName()

    An abstract method - it has to be implemented in a class extending BaseCall class

    getRequestDataTypeFullPackage()

    An abstract method - it has to be implemented in a class extending BaseCall class

    getResponseDataTypeFullPackage()

    An abstract method - it has to be implemented in a class extending BaseCall class
    processResponse()

    # RESPONSE

    _handleNoResponseContent()
    _handleApiBadGataway()
    _handleResposeParsedButStructureEmpty()
    _addHTTP_XMLParse_Error()
    _populateHTTP_XMLParse_Error()
    _handleIfItIsOldStyle()


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    eBay API | XML parser | Perl module | eBay | API | XML

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM