cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
402
Views
0
Helpful
1
Replies
Highlighted
Beginner

MSE Location : pb with getTagInfoList

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

1 REPLY 1
Highlighted
Beginner

Re: MSE Location : pb with getTagInfoList

After some researches and test, it looks like that the part of the soap message which throw the error is with the tag <AesTelemetry>.

If the getTagListInfo return a soap message as follow :

<?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="1398325205524" lastBeaconSeqNum="3815" lastBeaconTime="0" macAddress="00:04:f1:53:d5:08" objectId="1">

                <asset>

                    <AesAsset assetGroup="callbox-CYD" assetName="Grand Zebra" />

                </asset>

                <batteryInfo>

                    <AesBatteryInfo batteryAge="652" daysRemaining="1174" lastReceivedSeqNum="3815" lastReceivedTime="1398325204138" 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>

        </Response>

    </SOAP-ENV:Body>

</SOAP-ENV:Envelope>


this is this part which throw the error :

<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>


I have simulated the reponse of the MSE for that it provide a correct message.

The following message works :

<?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="1398328757023" lastBeaconSeqNum="3819" lastBeaconTime="0" macAddress="00:04:f1:53:d5:08" objectId="1">

                <asset>

                    <AesAsset assetGroup="callbox-CYD" assetName="Grand Zebra" />

                </asset>

                <batteryInfo>

                    <AesBatteryInfo batteryAge="652" daysRemaining="1174" lastReceivedSeqNum="3819" lastReceivedTime="1398328755570" percentRemaining="60" tolerance="20" />

                </batteryInfo>

                <telemetryList>

                    <AesTelemetry changedOn="1398328665144" lastReceivedSeqNum="3818" lastReceivedTime="1398328663691" measurementClass="com.aes.datamodel.location.ctx.AesDefaultTelemMeasurement" objectId="672" parentId="1" type="STATUS">

                        <measurement>

                            <String />

                            <AesDefaultTelemMeasurement measurementClass="java.lang.String" measurementObj="0,50," />

                            <AesEPC />

                            <AesGeo />

                            <AesMotionProbability />

                        </measurement>

                    </AesTelemetry>

                </telemetryList>

            </AesTag>

        </Response>

    </SOAP-ENV:Body>

</SOAP-ENV:Envelope>


I have just modify this part :

<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>

by


<AesTelemetry changedOn="1398328665144" lastReceivedSeqNum="3818" lastReceivedTime="1398328663691" measurementClass="com.aes.datamodel.location.ctx.AesDefaultTelemMeasurement" objectId="672" parentId="1" type="STATUS">

                        <measurement>

                            <String />

                            <AesDefaultTelemMeasurement measurementClass="java.lang.String" measurementObj="0,50," />

                            <AesEPC />

                            <AesGeo />

                            <AesMotionProbability />

                        </measurement>

                    </AesTelemetry>

and it works !


It looks like there is a problem with the soap message generated by the MSE with AesTelemetry  object or with the Wsdl / xsd 7.4.

I have found in the API spec this note :

Note: By default, the AesTelemetry object will include 2 child elements objectId and the AesDefaultTelemMeasurement. If the API user prefers to get only one of the above, there is a flag on the MSE which can be used to change which format needs to be included in the AesTelemetryObject. The old element is for backward compatibility.


If anybody knows how to modify this setting or has an idea for correct this problem, I take it.

Content for Community-Ad
Cisco Community July 2020 Spotlight Award Winners
This widget could not be displayed.