Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8120673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:13:13+00:00 2026-06-06T05:13:13+00:00

I am using Perl and SOAP::Lite to pull ticket information from a system called

  • 0

I am using Perl and SOAP::Lite to pull ticket information from a system called OTRS.

At the moment we have a web service set up on OTRS called GetTicket.

We’ve managed to get SOAP:Lite to connect to the web service and pull the ticket information. The ticket information comes back as hash reference.

I am not creating a hash reference inside of the code, that is just what is being returned. How do I pull apart that hash reference if I haven’t created it?

At this point we are trying to loop through the hash reference using foreach. I will post my progress as I go through it, but as usual, any advice is appreciated.

Perl Script

#!perl -w

use SOAP::Lite;
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0;

use Data::Dumper;
print Dumper(SOAP::Lite
    -> proxy('https://ost-otrstest.ostusa.com/otrs/nph-genericinterface.pl/Webservice/Test/GetTicket')
    -> GetTicket()
    -> result);

Output

$VAR1 = {
         'ErrorCode' => 'TicketGet.AuthFail'
         'ErrorMessage' => 'TicketGet: Authorization failing!'
        };
Press any key to continue...

EDIT: Added dumper and received an authorization error. We do have a user name and password, at this point I’m just not sure where to put that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:13:15+00:00Added an answer on June 6, 2026 at 5:13 am

    SOAP::Lite relies on LWP::UserAgent for a lot of its http functionality, including the behaviour when authorization is requested.

    The documentation for LWP::UserAgent says this

    [get_basic_credentials] should return a username and password. It
    should return an empty list to abort the authentication resolution
    attempt. Subclasses can override this method to prompt the user for
    the information.

    So you need to overload LWP::UserAgent::get_basic_credentials by writing a new SOAP::Transport::HTTP::Client::get_basic_credentials.

    Overloading this method is described in the SOAP::Transport documentation. You need to write this

    BEGIN {
      sub SOAP::Transport::HTTP::Client::get_basic_credentials {
        return ('username', 'password');
      }
    }
    

    anywhere in your program. At the top is probably tidiest. (The BEGIN block forces the new method definition to be implemented before execution starts, regardless of its position in the program.)

    I hope there is a better solution as I’m not very happy with this solution: it is an ugly piece of Perl programming. You may be better off subclassing SOAP::Lite altogether to make the interface a little tidier.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to consume a .Net Web Service using perl and SOAP Lite. When
I am attempting to access a web service using SOAP through Perl and am
I'm calling a .net webservice from Linux using Perl (5.8.7). I'm using the SOAP::Lite
I am currently dabbling around with perl and SOAP, using SOAP::Lite. I have a
I am using Perl as my web-service. I have my variables stored in pic1
I have a functional SOAP server using Perl and a C# client: SOAP Server
<XmlInfo /> I ran into problem using Perl's popular SOAP::Lite module, where it wouldn't
I'm using Perl to parse the output from objdump . I have the following
Scenario: The client is a Perl script using SOAP::Lite . The server is a
This is the SOAP document I'm trying to model using SOAP::Lite. <SOAP-ENV:Envelope xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/ xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.