1 Reply Latest reply on Sep 13, 2016 8:52 AM by Hamish marson

    Server/serverExists returns 500 Internal Server Error

    Hamish marson

       

       

      So, I'd like to query whether a server exists in the BSA database (Using an RDS version 8.6 Server). So fire up my perl script... Login works... Assume Role etc... Then I try to execute Server/serverExists with the name of a server as the parameter via  http://bladelogic.com/webservices/skeleton/clitunnel#executeCommandByParamList with the body

       

      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Header><ns1:sessionId xmlns:ns1="http://bladelogic.com/webservices/framework/xsd" xsi:type="xsd:anyURI">urn:uuid:FCDA25EC9B9485u38511471363241157</ns1:sessionId></soap:Header><soap:Body><ns6:executeCommandByParamList xmlns:ns6="http://bladelogic.com/webservices/skeleton/clitunnel"><ns6:nameSpace xsi:type="xsd:string">Server</ns6:nameSpace><ns6:commandName xsi:type="xsd:string">serverExists</ns6:commandName><ns6:commandArguments soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array"><item xsi:type="xsd:string">lnopad1.domain.com</item></ns6:commandArguments></ns6:executeCommandByParamList></soap:Body></soap:Envelope>

       

      and I get back...

       

      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x442b748)

      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error

      Connection: close

       

      with the body

       

      <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.

      at [row,col {unknown-source}]: [1,852]</faultstring><detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>

       

      The same code to generate the SOAP requests works fine to create jobs, execute them, assign targets etc... So I'm a bit perplexed as to why Server/serverExists errors...

       

      Now I could switch to using Server/listAllServers via http://bladelogic.com/webservices/skeleton/clitunnel#executeCommandByStringList (Which works), but it isn't very scalable and a bit overkill where I want to check just ONE server in a list of thousands.

       

      Anyone got any hints as to what 'm doing wrong here?