Printer Services Mail Archive: PS> Difficulty with AddDocume

PS> Difficulty with AddDocumentByPost

From: Mike Haller (mike.haller@attbi.com)
Date: Fri Feb 28 2003 - 10:07:58 EST

  • Next message: HALL,DAVID (HP-Vancouver,ex1): "RE: PS> Difficulty with AddDocumentByPost"

    I have an implementation of the job control interface circa last
    November, and am finally getting around to updating it to something
    more
    modern (20030221), but I am finding the new AddDocumentByPost
    difficult
    to implement.

    First, making the option mandatory will make it unnecessarily
    difficult
    to support an SMTP-bound SOAP implementation, since it forces an HTTP
    server implementation.

    Second, allowing the lastDocument on this call means that heavy-duty
    coupling must be done between the JCI implementation and whatever
    implementation receives the SOAP calls, since the lastDocument = true
    must effectively be deferred until after the post has successfully
    completed. This implies that whatever receives the post must
    communicate with the JCI implementation when it has been received
    successfully. And of course, the JCI implementation already has to
    know
    all about whatever receives the post so that it can know how to create
    a
    new sink URL and go collect the data when it is done.

    It is also unclear what the implementation should do if the post fails
    for some reason, or in what order the implementation can expect to
    receive the posts. For example, it now seems the client could:

      1. CreateJob
      2. AddDocumentByPost last = false
      3. AddDocumentByPost last = true
      4. Post document 2
      5. Post document 1

    This makes the implementation difficult, without really seeming to buy
    anything useful for the client.

    If the lastDocument flag were removed from the AddDocumentByPost call,
    and if the additional requirement were made that the client could not
    perform any additional AddDocumentByReference or AddDocumentByPost
    calls
    until either the post was complete, or a CancelDocument call were made
    for the pending document, then the implementation would be much
    simpler.
    Then the example above would be:

      1. CreateJob
      2. AddDocumentByPost
      3. Post document 1
      4. AddDocumentByPost
      5. Post document 2
      6. AddDocumentByReference last = true reference = null

    Though I can't seem to find where AddDocumentByReference with a null
    reference and attributes is actually allowed (it is, isn't it?) Maybe
    it's not to late for a completeJob( jobURI ) call?

    Mike Haller



    This archive was generated by hypermail 2b29 : Fri Feb 28 2003 - 10:08:32 EST