On Wed, Aug 20, 2014 at 02:59:29PM +0300, eran meiri wrote:
> http protocol


No it probably is NOT http output 

and there is a print STDERR, you have to use it.  You ADD it to your
code so you can see what the responses are.  This is debugging with
pearl level #1

But from what I'm reading, there is no way in hell your gonna get 
responses from LWP that are helpful.  LWP is not your web browser

It looks like a xen problem


http://www.gossamer-threads.com/lists/xen/api/261767
http://community.citrix.com/citrixready/product/activestate+active+perl+5+8+8
http://blogs.citrix.com/2013/08/27/xendesktop-7-monitor-service-what-data-is-available/

http://blogs.citrix.com/2013/08/27/xendesktop-7-monitor-service-what-data-is-available/


~~~~~~~~~~~~~~~~

When developing these API’s – we discovered that a web browser is
initially the easiest way to view the output of the query.  In order to
actually work with the data, you’ll quickly want move to something else
like Microsoft Excel PowerPivot, LinqPad or programmatic access.

Chrome has an extension called the Advanced REST Client that we found
useful.  If you choose to view these URL’s in Internet Explorer, you
should make sure to disable Feed reading view.  This can be changed in
Internet Options -> Content -> Feeds and Web Slices -> Settings.  Once
in that dialog, uncheck the Turn on feed reading view checkbox and once
you save those settings by clicking OK, you’ll need to restart IE.

The documentation describes how to access the URL’s a few different ways
here:
http://support.citrix.com/proddocs/topic/xendesktop-7/cds-ms-odata-example.html



 
> 
> there is no STDERR output. I used the 2>&1 at the end of the perl command
> to make sure.
> 
> 
> 
> 
> On Wed, Aug 20, 2014 at 2:56 PM, Ruben Safir <[email protected]> wrote:
> 
> > BTW - what is Critrix using for its user/pass access?  Is that a http
> > prootocal?  Or is it some java/javasrcipt garbage?
> >
> >
> >
> >
> > On Wed, Aug 20, 2014 at 02:30:41PM +0300, eran meiri wrote:
> > > Hello everyone.
> > > I have a problem and I am seeking for help.
> > >
> > > I need to access Citrix Odata api and for some reason I can't.
> > > when I try to access the URL with my browser I get a prompt to the
> > > domain\user an password.
> > > when I enter them I get the data I need but it doesn't work with the Perl
> > > script.
> > >
> > > I have tried it with LWP:
> > > my $url = "http://192.168.100.41/Citrix/Monitor/OData/v1/Methods/";;
> > > my $req = HTTP::Request->new(GET => $url );
> > > my $ua = LWP::UserAgent->new(keep_alive=>1);
> > > $ua->credentials("192.168.100.41:80", "<REAL-M>","lyncent.com\\Citrix"
> > =>
print STDERR $ua;

> > > 'Rel0aded1');
> > >
> > > my $response = $ua->request( $req );


print STDERR $response;

etc...

is that so hard to do?


> > >
> > > if ($response->is_success) {
> > >     print $response->content;
> > > }
> > > else {
> > >     print $response->status_line, "\n";
> > > }
> > >
> > > and I have tried it with SOAP:
> > >
> > > my $api_host = "
> > > http://192.168.100.41/Citrix/Monitor/OData/v1/Methods/Catalogs";;
> > > my $api_user = "lyncent.com\\Citrix";
> > > my $api_pass = "Rel0aded1";
> > > my $authClient = SOAP::Lite->service($api_host );
> > > my $result2 = $authClient->performLogin($api_user, $api_pass);
> > > print $result2->{result};
> > >
> > > or again with soap :
> > > my $service = SOAP::Lite
> > >               -> service('
> > > http://192.168.100.41/Citrix/Monitor/OData/v1/Methods/Catalogs');
> > > my $AuthHeader = SOAP::Header->new(
> > >   name =>'AuthenticationHeader',
> > >   attr => { xmlns => "192.168.100.41" },
> > >   value => {username => 'lyncent.com\Citrix', password => 'Rel0aded1' },
> > > );
> > > my $result = $service->GetIt($AuthHeader);
> > >
> > >
> > > all of these options give me the same result : 401 unauthorized
> > > the domain , user and password are all correct since I can access the URL
> > > from the browser.
> > >
> > > H E L P
> >
> > > _______________________________________________
> > > Perl mailing list
> > > [email protected]
> > > http://mail.perl.org.il/mailman/listinfo/perl
> >
> >
> > --
> > So many immigrant groups have swept through our town
> > that Brooklyn, like Atlantis, reaches mythological
> > proportions in the mind of the world - RI Safir 1998
> > http://www.mrbrklyn.com
> >
> > DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
> > http://www.nylxs.com - Leadership Development in Free Software
> > http://www2.mrbrklyn.com/resources - Unpublished Archive
> > http://www.coinhangout.com - coins!
> > http://www.brooklyn-living.com
> >
> > Being so tracked is for FARM ANIMALS and and extermination camps,
> > but incompatible with living as a free human being. -RI Safir 2013
> >
> > _______________________________________________
> > Perl mailing list
> > [email protected]
> > http://mail.perl.org.il/mailman/listinfo/perl
> >

> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl


-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com 

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive 
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com 

Being so tracked is for FARM ANIMALS and and extermination camps, 
but incompatible with living as a free human being. -RI Safir 2013

_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to