cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1536
Views
1
Helpful
4
Replies

Why does GetAXLPort() take so long in an (embedded) open-jdk.vm?

I've made the Eclipse-Java/GetPhone example and when I run it on my MacOSX-10.11.6 Eclipse I'll get the following results:

2016-10-05 15:08:15,339 [main] INFO  Demo.informUser:108  - Welcome to the Cisco AXL Sample APP.

2016-10-05 15:08:15,339 [main] WARN  Demo.getPhoneInfo:77  - Enter AXLAPIService ...

2016-10-05 15:08:15,340 [main] DEBUG AXLAPIService.<clinit>:32  - baseUrl=file:/Users/NLverseveldO/Documents/Workspaces/ws_eclipse/Cisco_axl-demo/bin/com/cisco/axlapiservice/

2016-10-05 15:08:15,341 [main] DEBUG AXLAPIService.<clinit>:34  - url=file:/Users/NLverseveldO/Documents/Workspaces/ws_eclipse/Cisco_axl-demo/schema/current/AXLAPI.wsdl

2016-10-05 15:08:15,680 [main] WARN  Demo.getPhoneInfo:79  - GetAXLPort ...

2016-10-05 15:08:20,721 [main] INFO  Demo.getPhoneInfo:84  - validatorUrl=https://ccm-10-5-1.ascom-rd.com:8443/axl/

2016-10-05 15:08:20,721 [main] WARN  Demo.getPhoneInfo:85  - Setup up getRequestContext() ...

2016-10-05 15:08:20,723 [main] WARN  Demo.getPhoneInfo:91  - Create GetPhoneReq instance ...

2016-10-05 15:08:20,723 [main] DEBUG Demo.getPhoneInfo:94  - Set-up axlParams: com.cisco.axl.api._8.GetPhoneReq@508f66bd

2016-10-05 15:08:20,723 [main] DEBUG Demo.getPhoneInfo:96  - Performing getPhone request ...

2016-10-05 15:08:22,424 [main] INFO  Demo.informUser:108  - Requested info for phone: SEP4C00828573D8 returned: Cisco 7925

where the time between GetAXLPort and the GetPhoneReq takes about 5 seconds, whereas when I run the same example on an (embedded) open-idk.vm I'll get the following results:

2016-10-05 14:23:38,478 [Thread-3] INFO  Demo.informUser:108  - Welcome to the Cisco AXL Sample APP.

2016-10-05 14:23:38,505 [Thread-3] WARN  Demo.getPhoneInfo:77  - Enter AXLAPIService ...

2016-10-05 14:24:16,144 [Thread-3] WARN  Demo.getPhoneInfo:79  - GetAXLPort ...

2016-10-05 14:44:49,836 [Thread-3] INFO  Demo.getPhoneInfo:84  - validatorUrl=https://ccm-10-5-1.ascom-rd.com:8443/axl/

2016-10-05 14:44:49,908 [Thread-3] WARN  Demo.getPhoneInfo:85  - Setup up getRequestContext() ...

2016-10-05 14:44:49,929 [Thread-3] WARN  Demo.getPhoneInfo:91  - Create GetPhoneReq instance ...

2016-10-05 14:44:49,939 [Thread-3] DEBUG Demo.getPhoneInfo:94  - Set-up axlParams: com.cisco.axl.api._8.GetPhoneReq@c0c9c4

2016-10-05 14:44:49,947 [Thread-3] DEBUG Demo.getPhoneInfo:96  - Performing getPhone request ...

2016-10-05 14:44:56,929 [Thread-3] INFO  Demo.informUser:108  - Requested info for phone: SEP4C00828573D8 returned: Cisco 7925

where the time between GetAXLPort and the GetPhoneReq takes a whopping 22 minutes!??

Does anybody know have an idea where this delay comes from or have a solution how to speed this up?

I also tried multiple testruns with about the same timing-results, e.g. about 5 seconds while running native on OSX and about 22 minutes while running 'embedded'?

Any advice or help, very much appreciated, thanks in advance.

1 Accepted Solution

Accepted Solutions

Hi 'dstaudt', thanks for the great suggestions!

I completely forgot that my test/host-OS has a 2.2Ghz Intel Core i7 with 16 GB-RAM, and the embedded environment is running on a 400 Mhz Atmel with 256 MB-RAM, which might explain the differences in duration.

I'm working on a version with XML over HTTP but encounter some certificate issues. I've to figure out how to use either a HttpsUrlConnection or HttpClient / HttpPost connection and I've to ignore all certificates or download / convert the Cisco.cer to a (java)keystone.jks file in my project(s).

The GetPhoneReq() example seems to work only with https i.s.o. http (I tested this with SoapUI).

View solution in original post

4 Replies 4

dstaudt
Cisco Employee
Cisco Employee

As you have probably noticed the AXL WSDL is really big   As a result, the native code libraries generated by WSDL compilers is pretty gigantic, and may take a long time to initialize - especially on constrained systems (like an embedded device.)

A few workarounds I might suggest:

- Skip the WSDL->code compilation part altogether, and just treat the API as XML over HTTP.  I.e. build up the XML request objects using an XML DOM object/library, or just via string concatenation - parsing the result similarly.  This can be extremely lightweight and efficient compared to the whole SOAP abstraction overhead.

- Go into the WSDL and remove the parts that your application doesn't use (typically apps only use a handful of the many hundreds of possible requests) - resulting in a vastly smaller generated code output.  Note this requires you to have a bit of understanding of WSDL itself so as to know how to safely elide parts of it

- Simiarly, you can remove un-used portions of the generated code library

Hi 'dstaudt', thanks for the great suggestions!

I completely forgot that my test/host-OS has a 2.2Ghz Intel Core i7 with 16 GB-RAM, and the embedded environment is running on a 400 Mhz Atmel with 256 MB-RAM, which might explain the differences in duration.

I'm working on a version with XML over HTTP but encounter some certificate issues. I've to figure out how to use either a HttpsUrlConnection or HttpClient / HttpPost connection and I've to ignore all certificates or download / convert the Cisco.cer to a (java)keystone.jks file in my project(s).

The GetPhoneReq() example seems to work only with https i.s.o. http (I tested this with SoapUI).

Hi 'dstaudt' again. Thanks to your great suggestions I got a working version. I based my solution on the AXL-HelloWorld example and used code to ignore all certificates! On my embedded environment the GetPhone() call now takes a whopping 1.6 seconds i.s.o. 22 minutes! You're me hero of the month and thanks again for your time.

Awesome, and thanks for the update!