Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. XML Request rejected
Qt 6.11 is out! See what's new in the release blog

XML Request rejected

Scheduled Pinned Locked Moved Unsolved Language Bindings
2 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nitoman
    wrote on last edited by
    #1

    Hi.

    I´m trying to use a webservice soap. I have not problem with other libraries with http but if i try to send a xml to other https i don´t receive a good response. I receive "The requested URL was rejected. Please consult with your administrator.<br><br>Your Suppoer ID is: xxxxxxxxx

    It´s my code:

    QNetworkAccessManager *AccessManager=new QNetworkAccessManager(this);
    connect(AccessManager,SIGNAL(finished(QNetworkReply*)),this,SLOT(FileIsReady(QNetworkReply*)));
    
    QFile CurrentFile("/home/odroid/validar.xml");
    CurrentFile.open(QIODevice::ReadOnly);
    QByteArray Buffer= CurrentFile.readAll();
    
    QSslConfiguration Config = QSslConfiguration::defaultConfiguration();
    Config.setProtocol(QSsl::TlsV1_2);
    
    QNetworkRequest *Request=new QNetworkRequest();
    Request->setUrl(QUrl("https://xxxxxxxxxxxx/servicefront.svc"));
    Request->setSslConfiguration(Config);
    Request->setHeader(QNetworkRequest::ContentTypeHeader,"Accept-Encoding");
    
    AccessManager->post(*Request, Buffer);
    

    Can you help me?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What version of Qt are you using ?
      What Linux distribution are you running ?
      What versions of OpenSSL do you have installed ?

      You are not connecting the error related signals anywhere, you should so you'll have more information about what is going wrong.

      On a side note, there's no need to create your QNetworkRequest on the the heap as shown in the QNetworkAccessManager documentation.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved