CiscoIPPhoneExecute->ExecuteItem->URL and QueryParams

Version 1
    This document was generated from CDN thread

    Created by: Robert Weeks on 20-10-2010 10:12:47 PM
    Hello -
     
    I have been having a hard time sending an XML command to a 7962 (and others) - getting:
     
    XML Parser Exception: unterminated entity ref (position:START_TAG <ExecuteItem Priority='0' URL='null'>
     
    If I pass in additional query params on the URL (after the initial param using '?').
     
    No matter how I escape it, it doesn't seem to allow me to pass it in - example:
     
    <ExecuteItem URL="http://xx.xx.xx.xx:xxxx/workflow_engine/index/Alerts?page=list&alert_heading=AlertHeading" Priority="0" />
     
    Is there a reason that this won't take additional http query params that anyone has run into?
     
    Thanks for any help.

    Subject: RE: CiscoIPPhoneExecute->ExecuteItem->URL and QueryParams
    Replied by: robin russell on 21-10-2010 04:44:20 PM
    Robert
    I have tried sending the execute command you are having problems exactly how you sent it including the query params and i dont have a problem.
    Can you post the exact XML string that is being sent and the response(if any) from the phone.
     
    PS. I didnt use the UCXSI SDK to send my command i just used native code in VB.NET

    Subject: RE: CiscoIPPhoneExecute->ExecuteItem->URL and QueryParams
    Replied by: Robert Weeks on 21-10-2010 02:54:10 PM
    In addition here - we are using the UCXSI SDK 1.0.1 for communication here - and am curious if the SDK is re-converting the &amp; back to a '&' - causing the XML parsing error.
     
    We cannot seem to get past this - and it is the same on phones that are OK when running JTAPI. We have tested on multiple models of phones now (525G, 7961, 7945, 7962, etc).
     
    Thanks for any information.

    Subject: RE: CiscoIPPhoneExecute->ExecuteItem->URL and QueryParams
    Replied by: Robert Weeks on 21-10-2010 05:07:49 PM
    Hello -
     
    The test XML I am sending through (which is extremely similar to the actual data that will be pushed to these phones is (with ip changed):
     
    <CiscoIPPhoneExecute>
       <ExecuteItem URL="http://xx.xx.xx.xx:3000/workflow_engine/index/Alerts?page=list&alert_heading=AlertHeading" Priority="0" />
    </CiscoIPPhoneExecute>
     
    If I take out the &amp; - I get the messages to the phone. The responses are always similar to (in the phone logs):
     
    ERR 08:19:44.070981 JVM: Startup Module Loader|cip.xml.ao:  - XML Parser Exception: unterminated entity ref (position:START_TAG <ExecuteItem Priority='0' URL='null'>@2:108 in java.io.InputStreamReader@ae2977)  (line=2)
    ERR 08:19:44.074578 JVM: Startup Module Loader|cip.sccp.n:? - XML not initialized!
     
    and/or - like on the wireless - shows up as 'XML Parse Error [4]'.
     
    So what it seems to me is something is converting that &amp; back to a '&' - or for some reason the ';' is causing it to not get to the end of the closing entity.
     
    On the callback (from the CMEResponseInterface.dispatch()) - the request.getBody() comes back as:
     
    FROM THE DISPATCH REQUEST:
    <?xml version="1.0"?>
    <Escape xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
    <privateData>
    <string>
    <CiscoIPPhoneExecute>
    <ExecuteItem Priority="0" URL="http://xx.xx.xx.xx:3000/workflow_engine/index/Alerts?page=list&alert_heading=AlertHeading"/>
    </CiscoIPPhoneExecute>
    </string>
    </privateData>
     
    So this is why I am *so* confused on what is going on here. I thought at first it might be the firmware on the specific phone - but I have tried on quite a few phones.
     
    I then figured maybe it was the SDK munging it - or the CME flashing on the router (UC50x) doing so - but cannot track it down.
     
    We are required to use the SDK (to get away from the axl calls directly) for this project.
     
    Thanks for the reply and any insight.

    Subject: RE: CiscoIPPhoneExecute->ExecuteItem->URL and QueryParams
    Replied by: robin russell on 21-10-2010 05:57:53 PM
    Robert
     
    I dont use the UCXSI API so i cannot help there, but have you tried capturing a network trace using wireshark so you can actually see what is being sent over the network to the phone(s).
     
     

    Subject: RE: CiscoIPPhoneExecute->ExecuteItem->URL and QueryParams
    Replied by: Robert Weeks on 25-10-2010 09:14:05 PM
    Hello -
     
    I have tried to setup wireshark - but from my app machine where my app is running, and I can see the information (SIP) coming/going from the router, but not what is being sent directly to the phone.
     
    We can definitely verify that there is an issue sending any URL that has the &amp;/multiple query parameters on it will cause issues, but cannot figure away around it.
     
    Is there anyone else out there using the UCXSI SDK to send commands to the phone that is not having it happen?
     
    I am sending via:
     
    phone.getCMEPhone().sendXSIData(xmlPayload, callbackObj);
     
    and the body from the request is showing me the full URL:
     
     <?xml version="1.0"?>
    <Escape xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
    <privateData>
    <string>
    <CiscoIPPhoneExecute>
      <ExecuteItem Priority="0" URL="http://xx.xx.xx.xx:3000/workflow_engine/index/PopTest/PopTestDeuce?Calls.id=484&alert_heading=TestPopDeuce"/>
    </CiscoIPPhoneExecute>
    </string>
    </privateData>
    </Escape>
     
    and everything works great if there is no additional query param. But we really need the additional params to complete our requests.
     
    Hoping someone else is using this SDK to send the XSIData as we are to see if able to send the multiple parameters.
     
    Thanks.
     

    Subject: RE: CiscoIPPhoneExecute->ExecuteItem->URL and QueryParams
    Replied by: Yaw-Ming Chen on 27-10-2010 09:28:53 PM
    work around:
     
    change '&amp;' to '&amp;amp;' since CME will remove 'amp;' after '&'

    Subject: RE: CiscoIPPhoneExecute->ExecuteItem->URL and QueryParams
    Replied by: Chris Stamataras on 28-03-2013 03:35:24 AM
    Thank you Yaw-Ming, you saved me by a long search since I had the same problem and I could not find why it was not working.
    Why is CME removing the amp after & ?