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 932035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:35:51+00:00 2026-05-15T20:35:51+00:00

I am trying to build a C++ app to access a XML resource. Using

  • 0

I am trying to build a C++ app to access a XML resource. Using http the code works fine, from what I can tell from the docs, all I need to do to for the https to work is to make sure ssl is install (yes the dev edition is installed), and change the StreamFactory to HTTPSStreamFactory.

Here is the code that works :

Poco::Net::HTTPStreamFactory::registerFactory();
Poco::URI uri(argv[1]);

std::auto_ptr<std::istream> pStr(Poco::URIStreamOpener::defaultOpener().open(uri));
std::string str;      
StreamCopier::copyToString(*pStr.get(), str);

Here is the code that fails
Poco::Net::HTTPSStreamFactory::registerFactory();
Poco::URI uri(argv[1]);

std::auto_ptr<std::istream> pStr(Poco::URIStreamOpener::defaultOpener().open(uri));
std::string str;      
StreamCopier::copyToString(*pStr.get(), str);

When I make a request w/ HTTPSStreamFactory this is the error message I get :

NULL pointer: _pInstance [in file
“/home/chpick/poco-1.3.6p2/Util/include/Poco/Util/Application.h”,
line 422]

I have attached the Application.h

inline Application& Application::instance()
{
    poco_check_ptr (_pInstance);
    return *_pInstance;
}

Any help would be great. Thanks

  • 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-05-15T20:35:52+00:00Added an answer on May 15, 2026 at 8:35 pm

    I ended up going about it a different way : Here is what I did.

        const Poco::URI uri(xmlParams.restURI);
        std::string path(argv[1]);
        const Poco::Net::Context::Ptr context = new Context(Context::CLIENT_USE, "", "", "", Context::VERIFY_NONE, 9, false, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
        Poco::Net::HTTPSClientSession session(uri.getHost(), uri.getPort(), context );
        Poco::Net::HTTPRequest req(Poco::Net::HTTPRequest::HTTP_GET, argv[1] );
        req.setKeepAlive(false);
    
      std::string strToSend = "/";
        session.sendRequest(req) << strToSend;
        Poco::Net::HTTPResponse res;
        std::istream& rs = session.receiveResponse(res);    // typedef std::istream XMLCharInputStream;
    
        std::string str;    
        StreamCopier::copyToString(rs, str);
    
        std::istringstream istr(str);
        InputSource source(istr);
        parser.parse(&source);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build an app that gets JSON from server and then shows
I'm trying to build an app using Sinatra, Ruby, rack, haml, pony and SendGrid,
I am trying to build an app that only works for landscape device orientations
I'm trying to test my grails app using integration test that makes http requests.
I'm trying build an App Engine connected Android application and am having some problems
I am trying to build an app which has lot of content to be
I'm trying to build my app on my iPhone 4 but i keep getting
I am trying to build an app in which I want to trigger a
I'm trying to build an app where I have a TabBarController with 4 entries.
I am trying to build an app with backend on Google App engine. It

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.