Topic
  • 6 replies
  • Latest Post - ‏2011-11-28T05:15:03Z by Suyesh@IBM
Suyesh@IBM
Suyesh@IBM
4 Posts

Pinned topic Problem with Notification Query . Status : 405 Method Not Found

‏2011-11-17T06:10:19Z |
I tried Registering my Client using Poster .Got Response 201 Created but The Location header in response is like :

http://9.184.37.29:9080/notifications/clients/ebd3f9cf-2656-4989-a809-16ead4434d8f

instead of :
http://<server>:<port>/notifications/<unique-identifier>/channels/longpoll .

Also for creating notification trigger i got 201 Created .

But when i request for Notifications using :
http://9.184.37.29:9080/notifications/clients/ebd3f9cf-2656-4989-a809-16ead4434d8f

Response : 405 method not allowed.

and even i tried http://9.184.37.29:9080/notifications/ebd3f9cf-2656-4989-a809-16ead4434d8f/channels/longpoll

Response : File not found exception .

Images are Attached.
Updated on 2011-11-28T05:15:03Z at 2011-11-28T05:15:03Z by Suyesh@IBM
  • Suyesh@IBM
    Suyesh@IBM
    4 Posts

    Re: Problem with Notification Query . Status : 405 Method Not Found

    ‏2011-11-17T06:12:07Z  
    Images :
    (we can only attach one)
  • SystemAdmin
    SystemAdmin
    59 Posts

    Re: Problem with Notification Query . Status : 405 Method Not Found

    ‏2011-11-17T20:23:04Z  
    Hi Suyesh,

    >> The Location header in response is like :
    >> http://9.184.37.29:9080/notifications/clients/ebd3f9cf-2656-4989-a809-16ead4434d8f
    >> instead of :
    >> http://<server>:<port>/notifications/<unique-identifier>/channels/longpoll .

    We do have a mismatch between the curl examples in the documentation and the actual URLs used for retrieving notifications by the pre-configured notification service in the Tech Preview bundle. I don't know how we got out of sync, but we'll get that fixed. If you're using the supplied server (was4d), then you were correct to try and work around the issue by matching the returned URL from the server containing "clients" and appending "/channels/longpoll". The 405 error in the screenshot appears to be the expected response to a request to the retrieval URL without "/channels/longpoll".

    To clarify, I'll post the actual URLs I'm using with the pre-configured Liberty Profile:

    Register: http://localhost:9080/notifications/registration/registration
    (same as docs)
    In the Content to Send tab, I attached a file containing the JSON string for the registration
    The response came back with a url of http://localhost:9080/notifications/clients/92427e7c-5138-419f-bd0e-5dfe15432ea1
    (note - includes /clients/ path segment)

    Retrieve: http://localhost:9080/notifications/clients/92427e7c-5138-419f-bd0e-5dfe15432ea1/channels/longpoll
    (includes "/clients", and appends "/channels/longpoll" - this should block until a corresponding notification message is available or the client times out)

    Trigger: http://localhost:9080/notifications/trigger/notifications/
    (same as docs)
    In the Content to Send tab, I attached a file contaning the JSON string for the notification

    I am able to use 3 poster windows to register, retrieve and notify successfully, so poster seems to be fine as a client. Attaching a screenshot of the poster response window with the test message.
    I would suggest trying again with a request URL that includes both "/clients/" and "/channels/longpoll". Perhaps something simple like a typo on the first try.

    Message was edited by: jeffonc

    Message was edited by: jeffonc
    Updated on 2011-11-17T20:23:04Z at 2011-11-17T20:23:04Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    59 Posts

    Re: Problem with Notification Query . Status : 405 Method Not Found

    ‏2011-11-17T20:56:51Z  
    Hi Suyesh,

    >> The Location header in response is like :
    >> http://9.184.37.29:9080/notifications/clients/ebd3f9cf-2656-4989-a809-16ead4434d8f
    >> instead of :
    >> http://<server>:<port>/notifications/<unique-identifier>/channels/longpoll .

    We do have a mismatch between the curl examples in the documentation and the actual URLs used for retrieving notifications by the pre-configured notification service in the Tech Preview bundle. I don't know how we got out of sync, but we'll get that fixed. If you're using the supplied server (was4d), then you were correct to try and work around the issue by matching the returned URL from the server containing "clients" and appending "/channels/longpoll". The 405 error in the screenshot appears to be the expected response to a request to the retrieval URL without "/channels/longpoll".

    To clarify, I'll post the actual URLs I'm using with the pre-configured Liberty Profile:

    Register: http://localhost:9080/notifications/registration/registration
    (same as docs)
    In the Content to Send tab, I attached a file containing the JSON string for the registration
    The response came back with a url of http://localhost:9080/notifications/clients/92427e7c-5138-419f-bd0e-5dfe15432ea1
    (note - includes /clients/ path segment)

    Retrieve: http://localhost:9080/notifications/clients/92427e7c-5138-419f-bd0e-5dfe15432ea1/channels/longpoll
    (includes "/clients", and appends "/channels/longpoll" - this should block until a corresponding notification message is available or the client times out)

    Trigger: http://localhost:9080/notifications/trigger/notifications/
    (same as docs)
    In the Content to Send tab, I attached a file contaning the JSON string for the notification

    I am able to use 3 poster windows to register, retrieve and notify successfully, so poster seems to be fine as a client. Attaching a screenshot of the poster response window with the test message.
    I would suggest trying again with a request URL that includes both "/clients/" and "/channels/longpoll". Perhaps something simple like a typo on the first try.

    Message was edited by: jeffonc

    Message was edited by: jeffonc
    attaching the registration request/response screen captures.
  • SystemAdmin
    SystemAdmin
    59 Posts

    Re: Problem with Notification Query . Status : 405 Method Not Found

    ‏2011-11-17T20:57:28Z  
    attaching the registration request/response screen captures.
    attaching trigger request/response screen captures
  • SystemAdmin
    SystemAdmin
    59 Posts

    Re: Problem with Notification Query . Status : 405 Method Not Found

    ‏2011-11-17T20:57:57Z  
    attaching trigger request/response screen captures
    attaching retrieve request/response screen captures
  • Suyesh@IBM
    Suyesh@IBM
    4 Posts

    Re: Problem with Notification Query . Status : 405 Method Not Found

    ‏2011-11-28T05:15:03Z  
    attaching retrieve request/response screen captures
    Thanks a lot Jeff.