cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
315
Views
0
Helpful
6
Replies

SOAP elements that have the xsi:nil="true" attribute return an error

andreas-rieder
Level 1
Level 1
I'm working with Cisco AXL version 15.0.
After sending the following SOAP request an axlcode -1 is returned, axlmessage is empty:

 

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/15.0">
	<soapenv:Header/>
	<soapenv:Body>
		<ns:updateUser xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<userid>##userid##</userid>
			<password>##password##</password>
			<pin>##pin##</pin>
			<userLocale xsi:nil="true"/>
			<digestCredentials xsi:nil="true"/>
			<subscribeCallingSearchSpaceName xsi:nil="true"/>
			<mlppPassword xsi:nil="true"/>
			<serviceProfile xsi:nil="true"/>
			<directoryUri xsi:nil="true"/>
			<selfService xsi:nil="true"/>
			<userProfile xsi:nil="true"/>
			<ldapDirectoryName xsi:nil="true"/>
			<emMaxLoginTime xsi:nil="true"/>
			<ipccExtension xsi:nil="true" />
			<ipccRoutePartition xsi:nil="true" />
			<convertUserAccount xsi:nil="true" />
			<customerName xsi:nil="true" />
			<convertUserAccount/>
		</ns:updateUser>
	</soapenv:Body>
</soapenv:Envelope>
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<soapenv:Body>
		<soapenv:Fault>
			<faultcode>soapenv:Server</faultcode>
			<faultstring/>
			<detail>
				<axlError>
					<axlcode>-1</axlcode>
					<axlmessage/>
					<request>updateUser</request>
				</axlError>
			</detail>
		</soapenv:Fault>
	</soapenv:Body>
</soapenv:Envelope>   

 

 
If i comment out the following fields in the upper request, the call works:

 

<!--ipccExtension xsi:nil="true" /-->
<!--ipccRoutePartition xsi:nil="true" /-->
<!--convertUserAccount xsi:nil="true" /-->
<!--customerName xsi:nil="true" /-->

 

Why does this happen? All this fields are declared as nullable in the AXLSoap.xsd schema.

 

1 Accepted Solution

Accepted Solutions

BjoernMartin
Spotlight
Spotlight

Exactly. Keep your payload small and remove unnecessary elements

View solution in original post

6 Replies 6

BjoernMartin
Spotlight
Spotlight

Hello! You are right.

Nillable is possible. Since CUCM v12 I always remove the XSI Atrribute from the requests.

Try this request. Works for me ....

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/15.0">
<soapenv:Header/>
<soapenv:Body>
<ns:updateUser xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<userid>##userid##</userid>
<password>##password##</password>
<pin>##pin##</pin>
<userLocale xsi:nil="true"/>
<digestCredentials xsi:nil="true"/>
<subscribeCallingSearchSpaceName xsi:nil="true"/>
<mlppPassword xsi:nil="true"/>
<serviceProfile xsi:nil="true"/>
<directoryUri xsi:nil="true"/>
<selfService xsi:nil="true"/>
<userProfile xsi:nil="true"/>
<ldapDirectoryName xsi:nil="true"/>
<emMaxLoginTime xsi:nil="true"/>
<ipccExtension/>
<ipccRoutePartition/>
<convertUserAccount/>
<customerName/>
</ns:updateUser>
</soapenv:Body>
</soapenv:Envelope>

 

Hi, yes i tried that and it is working. But the XML Serializer in my C# project always generate this unnecessary elements with the nil attribute. I'm just wondering because it always worked with AXL version 12.5. These problems arose after the migration to 15.0!

Do you use the AXLAPI.wsdl?
You could still use the Version 14 or 12.5 if this solves your Problem

thedd
Level 1
Level 1

Do you know what these attributes are used for or did you just figure out that removing them solved your problem?

I always recommend only to add the attributes to your AXL XML Statemanet that are needed and mandatory.

ipccExtension and ipccRoutePartition are for Contact Center Users
convertUserAccount is for converting to LDAP Synced to Local User
For customerName the documentations says: "This tag should only be used by Hosted Collaboration Solution Shared Architecture deployments"


 

BjoernMartin
Spotlight
Spotlight

Exactly. Keep your payload small and remove unnecessary elements

andreas-rieder
Level 1
Level 1

I bite the bullet and set 28 fields for the AddPhone request to an empty string in my code