XML login

Started by velgames, July 14, 2014, 03:29:20 AM

Previous topic - Next topic

velgames

Hi, i try to login via network to NicTool server using this xml code
       <?xml version="1.0" encoding="utf-8" ?>
- <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
- <soap:Body>
- <login xmlns="http://192.168.1.43:8082/SOAP">
- <struct>
  <username>root</username>
  <password>1234</password>
  </struct>
  </login>
  </soap:Body>
  </soap:Envelope>

but as answer receive that :

error_msgYour session has expired. Please login againerror_code403
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



May be my xml bad? Or else? In old versions it worked, but now - no.
Using CentOS 6.5 nictool v2.23

matt

Hello velgames,

What version of NicTool are you running now (that doesn't work)?  Did you also run the sql/upgrade script after updating?

Also, check in your Apache logs (/var/log/[httpd|apache].error.log) for more precise error messages. The errors there should tell more precisely what the problem is.

Matt

velgames

Hello, Matt

Now I am using CentOS 6.5 and NicTool v2.23 and all of it running on VM VirtualBox.
Apache error logs nothing about this problem. Its look like apache does not see error. But in apache config i create new error log file for SOAP virtual host, in this file all time repeating error :

[Wed Jul 16 05:54:14 2014] [error] [client 192.168.1.35] Handler for perl-script returned invalid result code 1
 
config virtual host apache for nictool :

Listen 8082

PerlRequire /usr/local/nictool/server/lib/nictoolserver.conf

<VirtualHost 127.0.0.1:8082>
    KeepAlive Off
    <Location />
        SetHandler perl-script
        PerlResponseHandler NicToolServer
    </Location>
    <Location /soap>
        SetHandler perl-script
        PerlResponseHandler Apache::SOAP
        #PerlResponseHandler Apache2::SOAP
        PerlSetVar dispatch_to "/usr/local/nictool/server, NicToolServer::SOAP"
    </Location>
</VirtualHost>

<VirtualHost 192.168.1.43:8082>
    KeepAlive Off
    <Location />
        SetHandler perl-script
        PerlResponseHandler NicToolServer
    </Location>
    <Location /soap>
        SetHandler perl-script
        PerlResponseHandler Apache::SOAP
        #PerlResponseHandler Apache2::SOAP
        PerlSetVar dispatch_to "/usr/local/nictool/server, NicToolServer::SOAP"
    </Location>
   ErrorLog logs/SOAP-error_log
#       CustomLog logs/SOAP-access_log common
</VirtualHost>

I dont know what version of nictool worked before, i only know that it worked, and it was old version. Current OS and NicTool I installed for test my programm i developed for convert export MS DNS server zones to NicTool. Our company want replace Windows to CentOS. My programm developed on .Net Framework 4, thats why i need remote access to NicTool.

velgames

#3
This problem solved. Just in request was error in ContentType in xml.

Now i have new problem. NicTool server says that my tags not registered. So i want ask you for:

1) Example of right request in xml form . I use C# and have some difficulties with making new requests.
2) Have nictool WSDL file? It would very helpful.

matt

Sorry, there is no WSDL. On the roadmap is plans to supplement the SOAP interface with JSON. That would solve the problem for most purposes.