cancel
Showing results for 
Search instead for 
Did you mean: 

What's the syntax for getMessageList of the AdapterMessageMonitoringVi API?

Former Member
0 Kudos

Hi,

I recently started to work with the AdapterMessageMonitoringVi API, and there is a function getMessageList. I am using SOAPui to test the API, with the following request for getMessageList:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:AdapterMessageMonitoringVi" xmlns:urn1="urn:com.sap.aii.mdt.server.adapterframework.ws" xmlns:urn2="urn:com.sap.aii.mdt.api.data" xmlns:lang="urn:java/lang">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:getMessageList>

         <urn:filter>

            <urn1:archive></urn1:archive>

            <urn1:dateType></urn1:dateType>

            <urn1:nodeId></urn1:nodeId>

            <urn1:onlyFaultyMessages></urn1:onlyFaultyMessages>

            <urn1:retries></urn1:retries>

            <urn1:retryInterval></urn1:retryInterval>

            <urn1:timesFailed></urn1:timesFailed>

            <urn1:wasEdited></urn1:wasEdited>

            <urn1:fromTime>2016-02-11T09:00:00.000+01:00</urn1:fromTime>

            <urn1:toTime>2016-02-11T09:59:59.604+01:00</urn1:toTime>

         </urn:filter>

         <!--Optional:-->

         <urn:maxMessages>5</urn:maxMessages>

      </urn:getMessageList>

   </soapenv:Body>

</soapenv:Envelope>

As you can see, I want the messages between 9 and 10, but instead it's giving me all the messages, up to the amount of max messages I specify of course. I don't understand why I am getting all messages. Maybe the input time is not in the correct format?

Any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor

Hi Zakaria

You are getting all messages because the position of the fromTime field is at the wrong position so it is being ignored. Your time format is fine.

Normally, in XML the position does not matter as long as it belongs under the same node, but somehow this API requires it in the correct position.

If you move the fromTime field to just after dateType (so that the fields are in alphabetical order as shown in screenshot below), it should work correctly.

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng Swee,

I tried what you said and it worked. Thank you very much! I find it weird though, as I knew that the position under a node shouldn't matter.

But the problem is fixed, so thanks again!

Answers (1)

Answers (1)

Former Member
0 Kudos

I forgot to mention: I can't find any documentation except for this one:

Unfortunately, it's little documentation, doesn't cover everything, and also doesn't show an API with all the functions and input/input-formats

former_member186851
Active Contributor
0 Kudos

Hello Zakaria,

Test the same in WS Navigator,

IF you getting the required messages use the same timeformat in SOAP UI.