AnsweredAssumed Answered

MSE Location : pb with getTagInfoList

Question asked by compterds on Apr 24, 2014
Latest reply on Apr 24, 2014 by compterds

Hi,

 

I am using a MSE 7.4.110.0 and the wsdl 7.4 available here.

I have loaded the wsdl in my java application with Apache CXF.

When I am using the getTagInfoList from location API, Apache CXF provide me an error :

 

Caused by: javax.xml.bind.UnmarshalException: élément inattendu (URI : "http://cisco.com/mse/location", local : "AesDefaultTelemMeasurement"). Les éléments attendus sont <{http://cisco.com/mse/location}measurement>

    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:662)

    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:258)

    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:253)

    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:120)

    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:105)

    at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:262)

    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:498)

    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:480)

    at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:246)

    at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:180)

    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:370)


In my code, i am doing this :

final GetListArgs getListArgs = new GetListArgs();

getListArgs.setAesBusinessSession(session.getAesBusinessSession());

final AesQueryCriteria aesQueryCriteria = new AesQueryCriteria();

aesQueryCriteria.setStartIndex(startIndex);

aesQueryCriteria.setNumOfResults(1000);

getListArgs.setAesQueryCriteria(aesQueryCriteria);

final Response response = this.mseLocation.getTagInfoList(getListArgs);


AesQueryCriteria has been defined follwing the example of MSE Mobility Services API Specification(version 7.4).pdf

Page 110, look for getTagInfoList with the soap request for get all tag define in the MSE


I have also intercept the soap messages exchanged :

Request :

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

    <soap:Body>

        <ns2:GetTagInfoList xmlns="http://cisco.com/mse/types" xmlns:ns2="http://cisco.com/mse/location">

            <AesBusinessSession id="30292" objectId="0" parentId="0" changedOn="0" mask="-1" options="0"/>

            <AesQueryCriteria startIndex="0" numOfResults="1000"/>

        </ns2:GetTagInfoList>

    </soap:Body>

</soap:Envelope>

 

Response :

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
        <Response xmlns="http://cisco.com/mse/location">
            <AesTag batteryStatus="3" changedOn="1398321597464" lastBeaconSeqNum="3814" lastBeaconTime="0" macAddress="00:04:f1:53:d5:08" objectId="1">
                <asset>
                    <AesAsset assetGroup="myGroup" assetName="btn1" />
                </asset>
                <batteryInfo>
                    <AesBatteryInfo batteryAge="652" daysRemaining="1174" lastReceivedSeqNum="3814" lastReceivedTime="1398321596141" percentRemaining="60" tolerance="20" />
                </batteryInfo>
                <telemetryList>
                    <AesTelemetry changedOn="1397742692002" lastReceivedSeqNum="3653" lastReceivedTime="1397742691131" measurementClass="com.aes.datamodel.location.ctx.AesDefaultTelemMeasurement" objectId="615" parentId="1" type="STATUS">
                        <AesDefaultTelemMeasurement measurementClass="java.lang.String" measurementObj="0,50," />
                        <objectId mask="0,50," parentId="java.lang.String" />
                    </AesTelemetry>
                </telemetryList>
            </AesTag>
            <AesTag batteryStatus="2" changedOn="1398317602766" debug="true" lastBeaconSeqNum="150" lastBeaconTime="0" macAddress="00:0c:cc:78:57:6d" objectId="7">
                <asset>
                    <AesAsset assetGroup="myGroup" assetName="btn2" />
                </asset>
                <batteryInfo>
                    <AesBatteryInfo lastReceivedSeqNum="150" lastReceivedTime="1398317601655" percentRemaining="80" tolerance="20" />
                </batteryInfo>
                <vendorData>
                    <AesVendorData changedOn="1398317602768" data="0,0,9,0," lastReceivedSeqNum="150" lastReceivedTime="1398317601655" objectId="3877" parentId="7" vendorId="3276" />
                </vendorData>
                <emergencyList>
                    <AesEmergency changedOn="1398317602767" isActive="false" lastReceivedSeqNum="143" lastReceivedTime="1398238110241" objectId="2435" parentId="7" />
                    <AesEmergency changedOn="1398317602767" isActive="false" lastReceivedSeqNum="93" lastReceivedTime="1397655583405" objectId="2434" parentId="7" />
                    <AesEmergency changedOn="1398317602767" isActive="false" lastReceivedSeqNum="89" lastReceivedTime="1397630356048" objectId="2432" parentId="7" />
                    <AesEmergency changedOn="1398317602767" isActive="false" lastReceivedSeqNum="77" lastReceivedTime="1397542694787" objectId="2431" parentId="7" />
                    <AesEmergency changedOn="1398317602767" isActive="false" lastReceivedSeqNum="66" lastReceivedTime="1397485308820" objectId="2424" parentId="7" />
                </emergencyList>
            </AesTag>
        </Response>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

I don't understand for what I have this problem with the unmarshalling.

 

Thank youin advance for your help.

Cyrille

Outcomes