Author Message
danbacon
Joined: Mar 5, 2013
Messages: 5
Offline
I'm using C# to make calls to the SMS Web Service (AES v6.1.1). I'm using the WDSL to create classes which I use to create and submit requests. Everything works great except with the AARAnalysis model. ARRAnalysis is array based so position needs to be provided when doing a change. The problem is the AARAnalysis.xsd file has the elements are strings (see below). If I compare this to other array based models such as UniformDialplan.xsd the elements there are of type arrayType (see below). I have UniformDialplan and other array based models that use arrayType working because you can provide the value and the position within the array. I don't understand how to provide the position information to AARAnalysis when the elements are strings. Is there a different syntax used for this model? If so can someone provide an example? Or is this a bug?


I'm using the sample code in the SMSXMLApp.cs file provided in the SMS SDK (smssvc-sdk-6_1_1_90).


AARAnalysis.xsd



<?xml version="1.0" encoding="UTF-8" ?>
- <xsd:schema targetNamespace="http://xml.avaya.com/sms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://xml.avaya.com/sms">
<xsd:include schemaLocation="http://10.19.152.43/smsxml/xsd/models/ArrayType.xsd" />
- <xsd:complexType name="AARAnalysisType">
- <xsd:sequence>
<xsd:element name="Dialed_String" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="Total_min" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="Total_max" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="Route_Pattern" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="Call_Type" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="Node_Number" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="ANI_Reqd" type="xsd:string" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>


UniformDialplan.xsd



<?xml version="1.0" encoding="UTF-8" ?>
- <xsd:schema targetNamespace="http://xml.avaya.com/sms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://xml.avaya.com/sms">
<xsd:include schemaLocation="http://10.19.152.43/smsxml/xsd/models/ArrayType.xsd" />
- <xsd:group name="UniformDialplanArrayGroup">
- <xsd:sequence>
<xsd:element name="Match_Pattern" type="arrayType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Len" type="arrayType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Del" type="arrayType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Insert_Digits" type="arrayType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Net" type="arrayType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Conv" type="arrayType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Node" type="arrayType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:group>
- <xsd:complexType name="UniformDialplanType">
- <xsd:sequence>
<xsd:element name="Percent_Full" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:group ref="UniformDialplanArrayGroup" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>


Thank you for any help you can provide.
-Dan
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
After researching this there are a couple of issues here, but not with the schema. The way you can tell if something needs to be array type is to look at the model documentation and choose the model in question. Then look for the Cardinality column. If the cardinality is greater than 1 then the field needs to be array type. In the case of AARAnalysis all the cardinalities are 1.


The problem is that I don't know that SMS can support the change operation for AARAnalysis. The way the form works, there just doesn't seem to be a way for SMS to make a change based on what it sends in the request. For one, if I have a Dialed_string of 5 with a min and max of 5 I can add another entry for 5 with a min and max of 7. When you execute the command (In a SAT session) then you have two entries with a value of 5. So you didn't change, you added. There is also no way to use change to remove an entry because nothing is unique enough in the form. If you look at the documentation for ARSAnalysis, which is pretty much identical in its fields and the way it works, it doesn't allow for you to use change. So I am thinking that this is a mistake in the documentation, and that change doesn't work in SMS for this model. I am checking with the developer to see if there is possibly a bug here with the SMS code, but I don't think so.

danbacon
Joined: Mar 5, 2013
Messages: 5
Offline
Thanks so much for getting back to me so quickly. I'd love to know what the developers have to say as I've been pulling my hair out for several days on this one. The change operation definitely works to some degree in SMS. To add a new entry I can set Operation=change and set Qualifier=10306 and submit the XML below from the SMS test application (smsxml_test.php) and that works OK.




<?xml version="1.0"?>
<modelFields>
<AARAnalysis>
<Dialed_String position="17">10306</Dialed_String>
<Total_min position="17">5</Total_min>
<Total_max position="17">5</Total_max>
<Call_Type position="17">aar</Call_Type>
<ANI_Reqd position="17">n</ANI_Reqd>
<Route_Pattern position="17">270</Route_Pattern>
</AARAnalysis>
</modelFields>
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
I managed to lead myself down the wrong path with that last response. Sorry for the confusion. Now I can get change to work using the position attribute. Can you change an entry already in the table with the SMS test application as well?
danbacon
Joined: Mar 5, 2013
Messages: 5
Offline
Yes I can. If I just change the position field from 17 to 1 in the XML and resubmit it will change 10306 (see below I changed route pattern from 270 to 271.



<?xml version="1.0"?>
<modelFields>
<AARAnalysis>
<Dialed_String position="1">10306</Dialed_String>
<Total_min position="1">5</Total_min>
<Total_max position="1">5</Total_max>
<Call_Type position="1">aar</Call_Type>
<ANI_Reqd position="1">n</ANI_Reqd>
<Route_Pattern position="1">271</Route_Pattern>
</AARAnalysis>
</modelFields>
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
So theoretically, if you provide the exact string you are changing as the qualifier, the position will always be 1, because the qualifier directly effects the fields that are shown on CM. So in your SMSXMLapp.cs you are providing the qualifier as 10306 and the position as 1 and the change does not occur?
danbacon
Joined: Mar 5, 2013
Messages: 5
Offline
I can't get to a point where I can submit the code for a change AARAnalysis operation because I don't know how to provide the position information. Looking at the .xsd files for any other array based model the elements are of type "arrayType". Looking at arrayType.xsd (see below) there is a attribute for position. The problem is AARAnalysis.xsd has elements of type string not arrayType so how to you provide the position information? However it's done it's not implemented the same way as other array based models. Do these strings have a special format with position included? Are there are examples specific to change AARAnalysis I could look at? C#, Java or other? The code provided in the SDK chokes when using change AARAnalysis but works for all of the other models I've tested.


ArrayType.xsd



<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://xml.avaya.com/sms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.avaya.com/sms">
-<xsd:complexType name="arrayType">
-<xsd:simpleContent>
-<xsd:extension base="xsd:string">
<xsd:attribute name="position" use="required" type="xsd:unsignedInt"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>


Thanks again for looking into it,
-Dan
danbacon
Joined: Mar 5, 2013
Messages: 5
Offline
The other interesting thing is the AARAnalysis.xsd schema includes the ArrayType.xsd schema yet it doesn't use it for any element types.


I did finally get this working but I had to rewrite the AARAnalysisType class to use ArrayType's instead or strings to do it. I'm still interested in hearing from the developers how this is supposed to work.


Thanks,


-Dan
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
This is the bug in the schema and the way to work around it is to do as you have an rewrite the AARAnalysis class yourself. I will put in a fix for that with development so that it can be addressed in a future release.
Go to:   
Mobile view