cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1506
Views
0
Helpful
5
Replies

sample AXL code to add device profile for Extension mobility

PriyankaSK0179
Level 1
Level 1

Hi,

 

I did the sample java code from AXL developer guide and it works fine.

I am looking for a java code to add device profiles for extension mobility.

 

attached is the section of the code i added on the sample and it gives an error

 

at com.sun.proxy.$Proxy34.addMobilityProfile(Unknown Source)
at com.cisco.axl.demo.Demo1.getPhone(Demo1.java:210)--->StandardResponse sr line from my code
at com.cisco.axl.demo.Demo1.getPhoneInfo(Demo1.java:142)      
at com.cisco.axl.demo.Demo1.main(Demo1.java:122)

Any help would be appreciated

 
 
5 Replies 5

dstaudt
Cisco Employee
Cisco Employee

I did manage to get this working on my CUCM 11.5 lab system...it was extremely tricky deciphering the AXL schema, element XSD types, XSI types and how all that gets interpreted and mapped into the JAX-WS object model.  (Still not convinced the WSDL code generation/native library route is the best one for AXL...i.e. vs. simple string replacement.  It certainly is inefficient, though probably more deterministic...)

 

I created a sample VS Code project available here, hopefully to collect future samples (feel free to contribute:) https://github.com/CiscoDevNet/axl-java-samples

Thanks for the code..

 

It worked.. 

 

I am willing to contribute to your effort and I am trying to use SOAPUI. I tried using the getPhone  and I get the below error

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Item not valid: The specified SEP000832A8DD27 was not found</faultstring>
<detail>
<axlError>
<axlcode>5007</axlcode>
<axlmessage>Item not valid: The specified SEPXXXXXXXXXXXX was not found</axlmessage>
<request>getPhone</request>
</axlError>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

 

Below is the request I sent

 

 

 

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">
<soapenv:Header/>
<soapenv:Body>
<ns:getPhone sequence="?">
<!--You have a CHOICE of the next 2 items at this level-->
<name>SEPXXXXXXXXXXXX</name>
<uuid>?</uuid>
<!--Optional:-->

Certainly the device name you are supplying is not a real one:

<name>SEPXXXXXXXXXXXX</name>

The actual device name would be SEP+device MAC address, typically.  Note sure why the XXXs are present...if you're trying to do a wildcard type search or list, that is not possible via <getPhone>, which is used only to retrieve a specific device details.

I apologize,,

 

This is the phone I supplied SEP000832A8DD27.

 

I was thinking of masking it in the forum :)

 

 

Ah...that explains it :)

 

The error suggests the device doesn't exist...of course I'm assuming that it does...

 

You might try the request while removing the optional elements, e.g. <uuid>.  You want to provide either the <name> or the <uuid> not both - possibly the implementation sees both and is using <uuid>?</uuid> and ignoring <name>.