« Back to Technical Questions

Bug: sendXSIData() Failure when sending URL with more than one param

Combination View Flat View Tree View
Threads [ Previous | Next ]
Showing 1 - 20 of 25 results.
of 2
Folks,
 
We are using the UCXSI SDK 1.0.1 for communication thru a 2811 to 7962 phones.  In particular we are using the cmePhone.sendXSIData() api to push an xml string.  It appears that this api is mangling the '&' symbol in the URL we are passing.  We have tried several things to get past this without success.
 
We send:
1
2<CiscoIPPhoneExecute>
3<ExecuteItem Priority="0" URL="[url=http://10.42.18.72:3000/workflow_engine/index/Alerts?page=list&amp;alert_heading=MyHeading]http://10.42.18.72:3000/workflow_engine/index/Alerts?page=list&amp;alert_heading=MyHeading[/url]"/>
4</CiscoIPPhoneExecute>



We receive from the phones internal log: 
1
2ERR 13:19:14.029728 JVM: Startup Module Loader|cip.xml.an:  - XML Parser Exception: unterminated entity ref (position:START_TAG <ExecuteItem Priority='0' URL='null'>@2:108 in java.io.InputStreamReader@232184)  (line=2)
3ERR 13:19:14.031587 JVM: Startup Module Loader|cip.sccp.l:? - XML not initialized!
 

 
Thanks for any help.

Have you tried to use "&" instead of "&amp" ?
 
 
Thanks !

Have you tried to use "&" instead of "&amp" ?
 
 
Thanks !


 
Ok, so I understand you have to ask me a that.  
 
But I say again, I have tried every reasonable escape sequence with no resolution.  The SDK is altering the the data I give it and causing the ipphone's parser to fail.   
 
Tried: &, %26, \\&, \\\&, "urlString", 'urlString', ...  
 
I would hope you will verify this bug, by trying it yourself.  Send any url (with two params) you like to an ipphone using this api sendXSIData(); it will fail.
 
James,

Amy I ask what are you trying to push to phone ?
juest message string ? or ...
 
Thanks !
 

Amy I ask what are you trying to push to phone ?
juest message string ? or ...
 
Thanks !
 

 
Our intent is to have the phone retrieve a plan text message from our application server using the URL we embedd in the xml.  We use the sendXSIData() api because if avoids the authentication request that ipphone would otherwise have to make before accepting a xml package from a application; apparently ipphones trust their routers/call-managers.  Here is the XML again:
 
1
2<CiscoIPPhoneExecute>
3  <ExecuteItem Priority="0" URL="[url=http://10.42.18.72:3000/workflow_engine/index/Alerts?page=list&amp;alert_heading=MyHeading]http://10.42.18.72:3000/workflow_engine/index/Alerts?page=list&amp;alert_heading=MyHeading[/url]"/>
4</CiscoIPPhoneExecute>

 
 

Ok, I tried and captured the pcap file. It looks fine but actually 

The space is missing between

Priority="0"  and  URL="http://10.42.18.72:3000/
 
THe workaround is to get rid of the Priority="0" parameter and only specify the URL parameter in the request.

This should get them going with their application. The priority parameter is not really needed.
 
Please see attached pacp file (I renamed to .txt so can be attched)
 
It looks like nothing to do with "&"
This is what I set for the string
String xsidata = "<CiscoIPPhoneExecute>"+
        "<ExecuteItem URL=\"http://10.42.18.72:3000/test_no_pri1001/index/Alerts?page=list&amp;alert_heading=MyHeading\"/>"+
        "</CiscoIPPhoneExecute>";
 
 
I will log a bug for missing space
 
Thanks !
 
 
Attachments:

The space is missing between

Priority="0"  and  URL="http://10.42.18.72:3000/
 
The workaround is to get rid of the Priority="0" parameter and only specify the URL parameter in the request.

This should get application going. The priority parameter is not really needed.
 
I will log a bug for missing space
 
Thanks ! 
 


 
 
Thank you Yaw-Ming
 
I will try this workaround in about 8 hours from now and report back.
 
James,

One of our developers reviewed your workaround before I got in this morning, and tested removing the Priority resulting in the same negative outcome.
 

Hey James  - 


This is not right - there is a space there - and I removed it totally and still get the same error:



ERR 09:13:39.411433 JVM: Startup Module Loader|cip.xml.an:  - XML Parser Exception: unterminated entity ref (position:START_TAG <ExecuteItem URL='null'>@2:96 in java.io.InputStreamReader@1e0b66)  (line=2)
ERR 09:13:39.413287 JVM: Startup Module Loader|cip.sccp.l:? - XML not initialized!


Using this call:



<CiscoIPPhoneExecute>
<ExecuteItem URL="http://10.42.18.72:3000/workflow_engine/index/Alerts?page=list&amp;alert_heading=MyHeading"/>
</CiscoIPPhoneExecute>




Even in the pacp file that he attached - you can see when he calls it and it returns an error right after:



¿¿T@R¿PüÂP î¿=¿?ò
<CiscoIPPhoneExecute>


<ExecuteItem URL="http://10.42.18.72:3000/test_no_pri/index/Alerts?page=list&alert_heading=MyHeading"/></CiscoIPPhoneExecute>L«uÿkq((E`(Ed?"

¿T¿¿PüÂAPx¿÷L«uÿt3||E`|Ee?!¿

¿T¿¿PüÂAPxÙLB <CiscoIPPhoneError Number="1" />




which is:
   Error 1 = Error parsing CiscoIPPhoneExecute object


So this is not a workaround. I am not sure what he saw tho. In the original request there was a space between the URL and Priority attributes - as a matter of fact - what you sent in had the Priority first:


<CiscoIPPhoneExecute>
<ExecuteItem Priority="0" URL="http://10.42.18.72:3000/workflow_engine/index/Alerts?page=list&amp;alert_heading=MyHeading"/>
</CiscoIPPhoneExecute>





 
I still need an answer or fix
James

Yaw-Ming Chen,
 
It seem that attempting to use the sendXSIData() api with the priority attribute missing and enough space around things and the & as a single char, causes the SDK to immediately return com.cisco.cme.cti.exceptions.CMEInvalidArgumentException: Parser Exception
 
Sending the xmlString with the & escaped to '&amp' in the url, passes the SDK but produces an  CiscoPhoneError =1 on the phone; which indicates another XML parse error.
 
Your Wireshark shows this happening.
 
As I understand it, the Router is responsible for transporting this xmlString to the phone; so I am attaching a router info text from the router in related to this activity.
 
What's our next step?  What information can I provide you to demonstrate this bug more clearly?  I need to understand how to overcome this issue and successfully send URL with multiple params to the phones.
 
James,
Attachments:

Just like to clarify one thing.
 
There is a space between Priority="0" and URL=... 
But when SDK send over to phone, SDK remove the space, this is a bug. So we suggested to remove Priority="0"
After that what we saw sending to phone is exactly the same string to define in the application code.This is what we want isn't it ? Do you see something different ?
 
Thanks !

 

Is it possible you can capture the traffic from router to the phone to see what router send to phone ?
 
Thanks !

Just like to clarify one thing.
 
There is a space between Priority="0" and URL=... 
But when SDK send over to phone, SDK remove the space, this is a bug. So we suggested to remove Priority="0"
After that what we saw sending to phone is exactly the same string to define in the application code.This is what we want isn't it ? Do you see something different ?
 
Thanks !

 

 
This is what we want.  However, the phone responded with the 'CiscoPhoneError = "1"' for some reason???  This seems to mean that whatever it was the phone got it did not like it.  Further, send any other valid phone XML that does not have this & in it works just file.  The only problem we have is with this type of URL having more than one &param=value.  Note: URLs with only a ?param=value, work fine; URLs with a ?param1=value&param2=value Fail at the ipphone everytime.  So let not loose this & point.
 
The xmlString with the two param URL
 * Fails: SDK->Router->IPPhone   
 * Works:  Curl->IPPhone
 
I can run a wireshark to capture what the phone sees from the router.  I have it in about an hour

Can you please post a few good and bad XML ojects you are using so I can try too.
 
Maybe you can try to post on this tech center as well asking about how phone will treat this ?
 
http://developer.cisco.com/web/axl/home
 
Thanks !

Can you please post a few good and bad XML ojects you are using so I can try too.
 
Maybe you can try to post on this tech center as well asking about how phone will treat this ?
 
http://developer.cisco.com/web/axl/home
 
Thanks !

 
 
Works! But is not useable because I need multiple params, this has one param

<CiscoIPPhoneExecute>
<ExecuteItem Priority="0" URL="http://10.42.18.72:3000/workflow_engine/index/Alerts?page=list" />
</CiscoIPPhoneExecute>

 

Does not Work! It has two params

<CiscoIPPhoneExecute>
<ExecuteItem Priority="0" URL="http://10.42.18.72:3000/workflow_engine/index/Alerts?page=list&amp;alert_heading=MyHeading"/>
</CiscoIPPhoneExecute>

 
Note the phone wants the & to be escaped as '&amp;' (from the IPPhone Developers Guide).  I'm thinking the SDK unescapes it to '&', and that this is the core issue. 
 
James,

I have captured the package from application to CME and frm CME to phone.
 
The package from the App to CME show exactly the same as we coded in App.
The package from CME to phone removed the space, other than that everything is the same.
 
Maybe you can do the same to see if it's different from I got
 
Thanks !

I have captured the package from application to CME and frm CME to phone.
 
The package from the App to CME show exactly the same as we coded in App.
The package from CME to phone removed the space, other than that everything is the same.
 
Maybe you can do the same to see if it's different from I got
 
Thanks !

 
Thanks for the info.  I can't rewire things until after hours today.  But can you tell me about the info between CME to Phone?  Does it have a single '&' or the fully escaped '&amp;' ?   The phone will respond with a <CiscoPhoneError = "1"/> if it is not escaped (&amp;) in this path; or the phoen must be the received of an escaped symbol.
 
James,

What I set is what I get.
In code :
 String xsidata ="<CiscoIPPhoneExecute>  URL=\"http://10.42.18.72:3000/workflow_engine/index/Alerts?page=list&amp;alert_heading=MyHeading\"/> </CiscoIPPhoneExecute>";
in capture :
 
0000  45 60 00 f4 84 a3 00 00 ff 06 21 fc 0a 00 00 01   E`........!.....
0010  0a 00 00 04 07 d0 c3 54 14 08 40 52 fb 50 9f e5   .......T..@R.P..
0020  50 18 0b 94 c0 3d 00 00 c4 00 00 00 00 00 00 00   P....=..........
0030  3f 01 00 00 00 00 00 00 01 00 00 00 00 00 00 00   ?...............
0040  00 00 00 00 98 00 00 00 02 00 00 00 02 00 00 00   ................
0050  00 00 00 00 00 00 00 00 00 00 00 00 0a 3c 43 69   .............<Ci
0060  73 63 6f 49 50 50 68 6f 6e 65 45 78 65 63 75 74   scoIPPhoneExecut
0070  65 3e 0d 0a 3c 45 78 65 63 75 74 65 49 74 65 6d   e>..<ExecuteItem
0080  20 55 52 4c 3d 22 68 74 74 70 3a 2f 2f 31 30 2e    URL="http://10.
0090  34 32 2e 31 38 2e 37 32 3a 33 30 30 30 2f 74 65   42.18.72:3000/te
00a0  73 74 5f 6e 6f 5f 70 72 69 2f 69 6e 64 65 78 2f   st_no_pri/index/
00b0  41 6c 65 72 74 73 3f 70 61 67 65 3d 6c 69 73 74   Alerts?page=list
00c0  26 61 6c 65 72 74 5f 68 65 61 64 69 6e 67 3d 4d   &alert_heading=M
00d0  79 48 65 61 64 69 6e 67 22 2f 3e 3c 2f 43 69 73   yHeading"/></Cis
00e0  63 6f 49 50 50 68 6f 6e 65 45 78 65 63 75 74 65   coIPPhoneExecute
00f0  3e 00 00 00                                       >...
 
You can use IOS cammand "ip traffic-export" to capture if taffic is light
 
 
 

When you send from App to CME a url with '&amp;' those five chars must remain in place and be seen in the CME to Phone trace.
 
1. Application String contains  '&amp;' in the URL
2. Application to SDK to CME; should still contian the five chars of ' '&amp;'
3. CME to IPPhone; should also contain the five chars  '&amp;'
 
If you can verify the above three item we will have a clearer picture of this problem.  Item 3 MUST HAVE the five chars in place; if not we need to know which device unescaped it (CME, SDK,...)
 
James,

What I set is what I get.
In code :
 String xsidata ="<CiscoIPPhoneExecute>  URL=\"http://10.42.18.72:3000/workflow_engine/index/Alerts?page=list&amp;alert_heading=MyHeading\"/> </CiscoIPPhoneExecute>";
in capture :
 
0000  45 60 00 f4 84 a3 00 00 ff 06 21 fc 0a 00 00 01   E`........!.....
0010  0a 00 00 04 07 d0 c3 54 14 08 40 52 fb 50 9f e5   .......T..@R.P..
0020  50 18 0b 94 c0 3d 00 00 c4 00 00 00 00 00 00 00   P....=..........
0030  3f 01 00 00 00 00 00 00 01 00 00 00 00 00 00 00   ?...............
0040  00 00 00 00 98 00 00 00 02 00 00 00 02 00 00 00   ................
0050  00 00 00 00 00 00 00 00 00 00 00 00 0a 3c 43 69   .............<Ci
0060  73 63 6f 49 50 50 68 6f 6e 65 45 78 65 63 75 74   scoIPPhoneExecut
0070  65 3e 0d 0a 3c 45 78 65 63 75 74 65 49 74 65 6d   e>..<ExecuteItem
0080  20 55 52 4c 3d 22 68 74 74 70 3a 2f 2f 31 30 2e    URL="http://10.
0090  34 32 2e 31 38 2e 37 32 3a 33 30 30 30 2f 74 65   42.18.72:3000/te
00a0  73 74 5f 6e 6f 5f 70 72 69 2f 69 6e 64 65 78 2f   st_no_pri/index/
00b0  41 6c 65 72 74 73 3f 70 61 67 65 3d 6c 69 73 74   Alerts?page=list
00c0  26 61 6c 65 72 74 5f 68 65 61 64 69 6e 67 3d 4d   &alert_heading=M
00d0  79 48 65 61 64 69 6e 67 22 2f 3e 3c 2f 43 69 73   yHeading"/></Cis
00e0  63 6f 49 50 50 68 6f 6e 65 45 78 65 63 75 74 65   coIPPhoneExecute
00f0  3e 00 00 00                                       >...
 
You can use IOS cammand "ip traffic-export" to capture if taffic is light
 
 
 


 
look at byte 00c0 from your trace.  That's one single '&' char, not the five chars you sent.   Is this a trace from CME->Phone or Application->CME ?
 
James,

That's crom CME to phone and this is from App to CME
 
So you need to keeo 'amp' and looks like ';' is removed as well
 
0280  6e 61 6c 2e 6f 72 67 2f 73 74 61 6e 64 61 72 64   nal.org/standard
0290  73 2f 65 63 6d 61 2d 33 32 33 2f 63 73 74 61 2f   s/ecma-323/csta/
02a0  65 64 33 22 3e 0a 3c 70 72 69 76 61 74 65 44 61   ed3">.<privateDa
02b0  74 61 3e 0a 3c 73 74 72 69 6e 67 3e 0a 3c 43 69   ta>.<string>.<Ci
02c0  73 63 6f 49 50 50 68 6f 6e 65 45 78 65 63 75 74   scoIPPhoneExecut
02d0  65 3e 0d 0a 3c 45 78 65 63 75 74 65 49 74 65 6d   e>..<ExecuteItem
02e0  20 50 72 69 6f 72 69 74 79 3d 22 30 22 20 55 52    Priority="0" UR
02f0  4c 3d 22 68 74 74 70 3a 2f 2f 31 30 2e 34 32 2e   L="http://10.42.
0300  31 38 2e 37 32 3a 33 30 30 30 2f 77 6f 72 6b 66   18.72:3000/workf
0310  6c 6f 77 5f 65 6e 67 69 6e 65 2f 69 6e 64 65 78   low_engine/index
0320  2f 41 6c 65 72 74 73 3f 70 61 67 65 3d 6c 69 73   /Alerts?page=lis
0330  74 26 61 6d 70 3b 61 6c 65 72 74 5f 68 65 61 64   t&amp;alert_head
0340  69 6e 67 3d 4d 79 48 65 61 64 69 6e 67 22 2f 3e   ing=MyHeading"/>
0350  0d 0a 3c 2f 43 69 73 63 6f 49 50 50 68 6f 6e 65   ..</CiscoIPPhone
0360  45 78 65 63 75 74 65 3e 0d 0a 3c 2f 73 74 72 69   Execute>..</stri
0370  6e 67 3e 0a 3c 2f 70 72 69 76 61 74 65 44 61 74   ng>.</privateDat
0380  61 3e 0a 3c 2f 45 73 63 61 70 65 3e 0a            a>.</Escape>.

Showing 1 - 20 of 25 results.
of 2