Can't consume getEventsHistory from API

Hi! I want to consume the method getEventsHistory from API from PHP (using nusoap). I’ve already consumed other methods, but this is hard to make it work. I’ve already tested the service with SoapUI (a WS tester built in Java) and nusoap. With SoapUI:

Request:

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:ae=“http://ae.api.scadabr.org.br”>
soapenv:Header/
soapenv:Body
ae:GetEventsHistoryParams
ae:eventsPathvdvsdf</ae:eventsPath>
ae:options
ae:alarmLevelWARNING</ae:alarmLevel>
ae:initialDate2010-08-30T15:04:38.218Z</ae:initialDate>
ae:finalDate2010-08-30T15:04:38.218Z</ae:finalDate>
ae:maxReturn5</ae:maxReturn>
</ae:options>
</ae:GetEventsHistoryParams>
</soapenv:Body>
</soapenv:Envelope>

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
soapenv:Body
soapenv:Fault
soapenv:Server.userException
java.lang.IllegalArgumentException

<ns1:hostname xmlns:ns1=“http://xml.apache.org/axis/”>bizancio-Aspire-5720Z</ns1:hostname>

</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

nusoap:

Request:

$this->oSoapClient->call(“getDataHistory”, array(
‘GetDataHistoryParams’=>array(
‘eventsPath’=>‘sddsf’,
‘itemsPath’=>‘sdfsdf’,
‘options’=>array(
‘initialDate’=>‘2010-08-30T15:04:38.218Z’,
‘finalDate’=>‘2012-08-30T15:04:38.218Z’,
‘maxReturn’=>15
)
)

Response:

Array
(
[errors] => Array
(
[code] => INSUFFICIENT_PARAMETERS
[description] => Faltam parâmetros obrigatórios. (itemsPath)
)

[moreValues] => false
[replyBase] => Array
    (
        [rcvTime] => 2011-08-30T16:41:26.341Z
        [replyTime] => 2011-08-30T16:41:26.341Z
    )

)

Where should I put that ‘itemsPath’ param? I’ve checked the sources but I didn’t see it. There is a ‘eventsPath’ param, but no ‘itemsPath’ param.

En español :D:

Quiero usar el método getEventsHistory pero no puedo. Probé con el SoapUI (un tester de web services para Java, es el primer ejemplo) y con nusoap (el segundo ejemplo) pero no consigo hacerlo funcionar. En el segundo ejemplo me pide por un parámetro ‘itemsPath’ que no se dónde pasárselo.

Regards!

I made it work in SoapUI. AlarmLevel was a wrong value:

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:ae=“http://ae.api.scadabr.org.br”>
soapenv:Header/
soapenv:Body
ae:GetEventsHistoryParams
ae:eventsPathvdvsdf</ae:eventsPath>
ae:options
ae:alarmLevelINFORMATION</ae:alarmLevel>
ae:initialDate2010-08-30T15:04:38.218Z</ae:initialDate>
ae:finalDate2012-08-30T15:04:38.218Z</ae:finalDate>
ae:maxReturn5</ae:maxReturn>
</ae:options>
</ae:GetEventsHistoryParams>
</soapenv:Body>
</soapenv:Envelope>

But I’m still stuck with nusoap (SoapUI is just a tester, I need to make it work with nusoap).

Lo hice andar con SoapUI, el problema era el parámetro alarmLevel que estaba mal. Pero, todavía no puedo hacerlo andar con nusoap.

I think the problem is the “itemName” param of the class GetDataHistoryParams. What should I put in that param? I’m getting a ‘Tag not found’ error.

Creo que el problema es el parámetro “itemName” de la clase GetDataHistoryParams. ¿Qué debo poner en ese parámetro? Estoy teniendo un mensaje de error ‘Tag not found’.

Solucionado! El problema era que estaba llamando a “getDataHistory”, pero en realidad tenía que llamar a “getEventsHistory”.

1 curtida