locked
Not able to chat between Lync client & UCWA RRS feed

  • Question

  • Hi,

    I am able to chat between 2 UCWA application.

    Issue:

    I am not able to chat between UCWA & Lync client 2013. Though i am able to receive message from Lync client to UCWA, the vice versa is not taking place.

    Whenever i send message from UCWA to Lync client i get 400(bad request) error.

    Plz help asap.

    Thanks

    Deblina

    Friday, November 21, 2014 4:34 PM

All replies

  • Can you provide the request body/headers when sending the message that results in a 400 and the response body. This will help determine what type of message you are trying to send (text or html) and potentially if a parameter was incorrectly formatted.
    Monday, November 24, 2014 4:34 PM
  • Request body:

    Request POST /ucwa/oauth/v1/applications/10591854925/communication/conversations/23bb6e8a-8526-4c07-8047-52915f5d10e3/messaging/messages?OperationContext=4298aefc-3277-4ad0-a745-1733a8aff9e7 HTTP/1.1
    Accept application/json, text/javascript, */*; q=0.01
    Content-Type text/html
    Referer http://devportalen/sites/india/SitePages/Home.aspx
    Accept-Language en-US,en;q=0.7,ja;q=0.3
    Accept-Encoding gzip, deflate
    User-Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
    Host internalweb.apms.local
    Content-Length 2
    Connection Keep-Alive
    Cache-Control no-cache

    Response body:

    {"code":"BadRequest","subcode":"ParameterValidationFailure","message":"Please check what you entered and try again."}

    Plz reply asap.

    Tuesday, November 25, 2014 7:02 AM
  • It looks like you are attempting to send text/html in your Request, but what is posted above is the header portion of the Request.  The Response error code also indicates that the Request body is not correct.  It also looks like you are posting a really small amount of content (Content-Length: 2).  If it is not HTML, you can change the request headers to Content-Type: text/plain.
    Tuesday, November 25, 2014 4:39 PM
  • Changing Content-type from text/html to text/html did solve the problem.

    But i was able to send message to Lync client with content-type: text/html in a different environment.

    The same code did not work in another environment & hence had to change Content-type to text/plain.

    Any particular reason why this is happening? I am just worried about the consequences of changing content-type from text/html to text/plain.

    Plz reply. Your inputs are appreciated.

    Thanks

    Deblina

    Wednesday, November 26, 2014 6:18 AM
  • There are a few considerations to think on:

    • The issue might exist that you are trying to send text/html messages, but the application has not been setup to support HTML-formatted messages.  I cannot speak on if this would prevent the conversation from allowing messages of that type.
    • The message may need to be inside of an HTML container like <div>, <p>, etc which the Content-Length: 2 leads me to believe it is not satisfying this condition.
    • text/html is designed for situations where styling of the message sent matters

    The only issue that may arise from sending text/plain would be other UCWA clients can be designed to only process text/html which would mean that the user would not receive the message since Lync Server does not do processing to translate the message from text/plain to text/html.  It would be a very minor issue that would not likely manifest itself often.

    Wednesday, November 26, 2014 3:52 PM