Author Message
HuppiFluppi [Avatar]

Joined: Apr 29, 2015
Messages: 15
Offline
Hi all,

I'm trying to use the Web Services of SMGR to retrieve a list of all Users. I can't get it to work. I'm using VB.net (2010) and do a HTTP GET of the right URL. The programmer guide says, that the URL must be like this:

https://<smgr-fqdn>/web/mgmtwebservice/?entityType=user&searchCriteria=<xmlData>

I read the <xmlData> from the "SearchCriteria" XML-File which is part of the SDK. The content is changed like in the Java example, where some chars are replace (e.g. "&" with "&amp;" ...). But I never get a response from the Webserver. Even if I try to open the URL in Firefox it doesn't show anything. With no searchCriteria filled in, I get an error that this is missing. That tells me, that I am at the right point...

Can anybody help me? How does Java encode the URL?
MakarandBhalekar
Joined: Oct 24, 2013
Messages: 22
Offline
Hi,

When you say you don't get any response from the web server, is your request timing out? or is it the case that you are getting some error in response?
Another thing I would want to know id the version of your SMGR.

You could make use of the browser tools like Postman and RestClient which take care of things like URL encoding and authentication for ease of testing.

You can take a look at the RAW request from these tools and then write your .NET code to transform the URL to that effect.
HuppiFluppi [Avatar]

Joined: Apr 29, 2015
Messages: 15
Offline
My request is "accepted", which means, that the SMGR web service is sending a header as reply. Nothing more ("Content: 0").
I think that the URL is not in the right format. The Java Sample is reading the XML file and reads every line into one with "\n" as seperator.
Furthermore some special characters are replaced by HTML code. I do the same in my VB code.

This is the content of the XML file:

<?xml version="1.0" encoding="UTF-8"?>
<tns:management-webservice-criteria xmlns:tns="http://www.avaya.com/mgmt-web-criteria/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.avaya.com/mgmt-web-criteria/mgmt-web-criteria.xsd">
<criterialist>
<criteria>
<propertyname>startindex</propertyname>
<operator>equals</operator>
<value>0</value>
<restriction>and</restriction>
</criteria>
<criteria>
<propertyname>offsetindex</propertyname>
<operator>equals</operator>
<value>10</value>
<restriction>and</restriction>
</criteria>
</criterialist>
</tns:management-webservice-criteria>


This is the converted Data:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;tns:management-webservice-criteria xmlns:tns=&quot;http://www.avaya.com/mgmt-web-criteria/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://www.avaya.com/mgmt-web-criteria/mgmt-web-criteria.xsd&quot;&gt;\n&lt;criterialist&gt;\n&lt;criteria&gt;\n&lt;propertyname&gt;startindex&lt;/propertyname&gt;\n&lt;operator&gt;equals&lt;/operator&gt;\n&lt;value&gt;0&lt;/value&gt;\n&lt;restriction&gt;and&lt;/restriction&gt;\n&lt;/criteria&gt;\n&lt;criteria&gt;\n&lt;propertyname&gt;offsetindex&lt;/propertyname&gt;\n&lt;operator&gt;equals&lt;/operator&gt;\n&lt;value&gt;10&lt;/value&gt;\n&lt;restriction&gt;and&lt;/restriction&gt;\n&lt;/criteria&gt;\n&lt;/criterialist&gt;\n&lt;/tns:management-webservice-criteria&gt;\n\n


This is the URL:

https://avayasmgr/web/mgmtwebservice/?entityType=user&searchCriteria=&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;tns:management-webservice-criteria xmlns:tns=&quot;http://www.avaya.com/mgmt-web-criteria/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://www.avaya.com/mgmt-web-criteria/mgmt-web-criteria.xsd&quot;&gt;\n&lt;criterialist&gt;\n&lt;criteria&gt;\n&lt;propertyname&gt;startindex&lt;/propertyname&gt;\n&lt;operator&gt;equals&lt;/operator&gt;\n&lt;value&gt;0&lt;/value&gt;\n&lt;restriction&gt;and&lt;/restriction&gt;\n&lt;/criteria&gt;\n&lt;criteria&gt;\n&lt;propertyname&gt;offsetindex&lt;/propertyname&gt;\n&lt;operator&gt;equals&lt;/operator&gt;\n&lt;value&gt;10&lt;/value&gt;\n&lt;restriction&gt;and&lt;/restriction&gt;\n&lt;/criteria&gt;\n&lt;/criterialist&gt;\n&lt;/tns:management-webservice-criteria&gt;\n\n


I don't think that this will work, because of the "&"-Chars in the URL which may "confuse" the webclient...

Does anybody have a sample URL of a working request?
MakarandBhalekar
Joined: Oct 24, 2013
Messages: 22
Offline
Hi,

I suppose you or someone from your team posted a Technical Support ticket for this issue and I have answered it.

Support for SMGR's web services is available only through the Technical Support tickets for higher level members.

This forum is intended only for AES's web services.

Regards
nivlag.net
Joined: Sep 28, 2018
Messages: 1
Offline
I've hit the same problem as listed in this thread, does anyone know what the eventual fix was? Does anyone have this working, specifically an API call to return a list of users utilising the StartIndex and OffsetIndex parameters?

Thanks,

Matt.
Go to:   
Mobile view