cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

170
Views
5
Helpful
2
Replies
Highlighted
Beginner

Error in axlapi.wsdl calling updatePhone since Version 10.5

I have an php applican which is used to associate Users to Lines on a phone

This is used in an custom tab in jabber so everyone can decide if Jabber will show if a user is "on the phone" or not

 

We used an axlapi.wsdl from CUCM 8.5 for the last years which was working fine until we made an Update from CUCM to Version 11.5

Now only updateDeviceProfile is working but updatePhone is not

 

 

Here is the Client i defined to use in php to call the axl api

axl_client.png

 

And this is the part where i call updatePhone and updateDeviceProfile and tell the api which parameters should be used

php_update.JPG

 

The syntax is completely the same except of the owne uer which can only be set for the phone.

I had a look into the axl logs of cucm

The log for updateDeviceProfile looks good:
axl_updateDeviceProfile.JPG

 

But for updatePhone the complete line part is missing

axl_updatePhone.JPG

 

I used the same code to make these calls against a CUCM 10.5 using an old axlapi.wsdl and everything was fine.

After changing the axlapi.wsdl to Version 10.5, 11.5 or 12.5 i hade the same error again

 

To check if the AXL API is working fine i used an C# application where i can send my own XML towards CUCM.

If i do so everything is workign fine, too.

 

It seems that the wsdl might be buggy

 

 

Has anyonene else ran into this issue?
Does anyone have a php application using updatePhone and can proof my error?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Error in axlapi.wsdl calling updatePhone since Version 10.5

I believe this may be a problem in the PHP SoapClient implementation:

- In AXL 8.5, <lines> is a simple element:

Screenshot-20191018132554-87x38.png

- In AXL 10.5+, <lines> is enclosed in an <xsd:choice>, as there is now an option to instead provide (one of) <addLines> or <removeLines>:

Screenshot-20191018132743-268x101.png

- <add/removeLines> are marked as minOccurs="0" - it appears that PHP interprets this to mean that anything (including not being present) is 'valid' and so assumes that the first part of the <xsd:choice> is desired (which encloses <add/removeLines> )

- As a result, with the WSDL as-is, SoapClient will never let you select the second <xsd:choice> option, which is the <lines> element.  The AXL log seems to confirm that, as there is no <lines> element in the request

- I believe the WSDL itself is valid (or at least arguably so), and it does work fine with many other WSDL consumers, and a quick search indicates there may be multiple issues extant with PHP and <xsd:choice>.  If it is possible to try with the latest/greatest PHP and/or SoapClient versions, perhaps something has been fixed recently

 

Possible workarounds might include:

- This SO discussion seems to offer a possible solution with changing minOccurs="1" in the 11.5 WSDL itself: https://stackoverflow.com/questions/38616019/soapclient-does-not-generate-correct-request

- Modify your code logic to use <add/removeLines> (remove old line, add new one) instead of <lines>(which replaces the lines list with whatever you provide, e.g. the new line)

- Surgery on the 11.5 WSDL to remove the <xsd:choice> element altogether, and replace with just the <lines> element (be sure to use the 11.5 version)

- Abandon SoapClient altogether and manipulate the XML yourself :/

 

View solution in original post

2 REPLIES 2
Cisco Employee

Re: Error in axlapi.wsdl calling updatePhone since Version 10.5

I believe this may be a problem in the PHP SoapClient implementation:

- In AXL 8.5, <lines> is a simple element:

Screenshot-20191018132554-87x38.png

- In AXL 10.5+, <lines> is enclosed in an <xsd:choice>, as there is now an option to instead provide (one of) <addLines> or <removeLines>:

Screenshot-20191018132743-268x101.png

- <add/removeLines> are marked as minOccurs="0" - it appears that PHP interprets this to mean that anything (including not being present) is 'valid' and so assumes that the first part of the <xsd:choice> is desired (which encloses <add/removeLines> )

- As a result, with the WSDL as-is, SoapClient will never let you select the second <xsd:choice> option, which is the <lines> element.  The AXL log seems to confirm that, as there is no <lines> element in the request

- I believe the WSDL itself is valid (or at least arguably so), and it does work fine with many other WSDL consumers, and a quick search indicates there may be multiple issues extant with PHP and <xsd:choice>.  If it is possible to try with the latest/greatest PHP and/or SoapClient versions, perhaps something has been fixed recently

 

Possible workarounds might include:

- This SO discussion seems to offer a possible solution with changing minOccurs="1" in the 11.5 WSDL itself: https://stackoverflow.com/questions/38616019/soapclient-does-not-generate-correct-request

- Modify your code logic to use <add/removeLines> (remove old line, add new one) instead of <lines>(which replaces the lines list with whatever you provide, e.g. the new line)

- Surgery on the 11.5 WSDL to remove the <xsd:choice> element altogether, and replace with just the <lines> element (be sure to use the 11.5 version)

- Abandon SoapClient altogether and manipulate the XML yourself :/

 

View solution in original post

Beginner

Re: Error in axlapi.wsdl calling updatePhone since Version 10.5

Instead of updating the line i just added it again with the new parameters i want to set.

Works now for me.

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here