Thanks to all of you who helped out last week trying to help me fix my Domino configuration problem.  Tom Verleysen and Michael Dudding suggested creating an Internet Sites document which I thought made sense based upon what I’d read on the Internet but wasn’t sure exactly how to implement it. I followed the instructions I was given (I think) and setup the following:

I updated the server document so it uses internet sites documents:

Figure 0

I now have an Internet Sites document with the following information:

Figure 1

On the Configuration tab, here’s where I’m enabling HTTP PUT and DELETE.

Figure 2

When I open a browser and launch the Sencha Touch app, it renders its UI then connects to the Domino server to request the data using the RESTful agent I’ve created. Here’s the Domino log document for the GET request:

Figure 3

After the browser receives the 401 error, it prompts me for the credentials then repeats the request to the Domino server as shown in the following figure:

Figure 4

So far, expected behavior, right? When I edit a document in the Sencha Touch application, the Sencha Proxy tries to PUT the data back on the server and I get the following error:

Figure 5

So, last week I thought I was having an authentication problem (since the Authenticated User field in Figure 5 was showing Anonymous. Turns out this was some sort of weird a Safari caching problem, as soon as I switched to Chrome or cleared the cache in safari I was prompted to login and get what you see above.

So, looking at this, it looks like I DON’T have the Domino server configured correctly and I could use more of your help. Anyone have any suggestions?

Overall Rating (0)

0 out of 5 stars

Post comment as a guest

Attachments

Location

Share:
Rate this article :
0

People in this conversation

Load Previous Comments
  • Guest - Dragon Cotterill

    Off hand I would say that the issue here might be the fact that you are calling an agent with the PUT command. Agents only seem to respond to GET and POST.<br />Personally, on my servers I disable all but HEAD, GET and POST. The Domino server can be a little temperamental when it comes to other commands and there is also the fact that a lot of bots use the other command (OPTIONS especially) to scour the net for vulnerabilities.

    Short URL:
  • Guest - John M. Wargo

    I'm not trying to build a classic Domino agent, I'm trying to build an agent that will work with Sencha Touch. The Sencha Touch proxy uses POST for new record creation, but PUT for edits and DELETE for deletions. I can't change that. The traditional Rhodes approach does this as well.<br /><br />Domino has settings I can use to enable PUT and DELETE, specifically to accommodate web services that use it - and that's what I'm trying to do here.

    Short URL:
  • Guest - John M. Wargo

    The problem isn't that I'm trying to use the PUT command - it's that I've configured the server to enable the PUT command and it's not working. That's the problem I'm trying to solve here.<br /><br />The solution can't be that I shouldn't use PUT, but instead something that fixes this problem where the Domino server, even though it's configured to allow PUT, isn't allowing PUT.

    Short URL:
  • Guest - Nathan T. Freeman

    It spells it out right there in the popup on the label for "Methods." You have to write your own Java servlet to handle PUT and DELETE. The native HTTP server simply doesn't process them at all. The checkbox is there just so the web server will accept those methods on the assumption that it's passing the request to a CGI or Java program that can handle them.<br /><br />You'll have to write a servlet to do what you're trying to do.

    Short URL:
  • Guest - John M. Wargo

    Hmmm, I'd not noticed that - thanks for pointing that out. <br /><br />That's...unexpected. I assumed that a Domino server agent could handle all types of HTTP requests. Why would they not allow this? I know that there are security ramifications, but like in this case where I'm using a third-party framework to manage my access to the server, I have to be able to accommodate the client and in this case, the standard approach for web services (that I've seen) is that CRUD operations use POST, GET, PUT, DELETE. Ugh!<br /><br />I've posted to the Sencha forums to see if I can configure the Sencha Touch Proxy to use POST for all CRUD operations. Not sure if that's possible - I'd looked for that online and didn't find anything.

    Short URL:
  • Guest - Jack Ratcliff

    Instead of using a Rest proxy use an Ajax proxy. It is set up to use POST for create, update, destroy and GET for read.<br /><br />http://docs.sencha.com/touch/2.1.1/#!/api/Ext.data.proxy.Ajax-property-actionMethods<br /><br />Oh, and the docs are wrong about the Rest proxy and the defaults for the actionMethods so I'll get that reported in our Jira system.

    Short URL:
  • Guest - Jack Ratcliff

    Oh, and maybe you should look at using the api config so you can define specific endpoints for the CRUD operations. <br /><br />http://docs.sencha.com/touch/2.2.0/#!/api/Ext.data.proxy.Ajax-cfg-api

    Short URL:
  • Guest - John M. Wargo

    Yep, you're right - the docs are wrong about the defaults. I just plunked ActionMethods into my Sencha Code and it stops trying to use PUT and seems to be working better. I'll try to see if I can make this all work with REST and actionMethods otherwise I'll switch it to a AJAX proxy. Thanks.

    Short URL:
  • Guest - John M. Wargo

    Right, using actionMethods along with api seems to resolve my problem. Instead of making Domino do what I want, I'll just configure Sencha Touch to work the way I need it to. Nice.

    Short URL: