IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

:docid Problem

  • 1.  :docid Problem

    Posted Wed September 10, 2003 03:39 PM

    X-Application Version: 4.1.1
    Tamino Version : 4.1.1
    Platform : Win2k
    WebContainer : Tomcat 4.1.1
    JDK Version : 1.4.1



    Hi,

    with Tamino X-Application 3.1.1, it was possible to access a document via a URL providing a Tamino Query via the :docid parameter (e.g. …/modify.jsp?:action=modify&:docid=/Doctype[Node%3D’Value’]). -->> Trying this with 4.1.1 leads to an error “PreconditionViolation”.

    The error message is : format must be ‘[…]’, but was ‘/Doctype[Node=‘Value’]’

    Is it no longer possible to issue queries against Tamino using the :docid parameter containing the query string ?

    Calling modify.jsp within the X-Application (out of the view.jsp page), there is indeed a format used with (at least in my case) 6 parameters inside of the brackets.

    Kind regards,
    Stephan Beck
    Software AG, Demo Center


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: :docid Problem

    Posted Mon September 15, 2003 09:10 AM

    Hello,

    With the support of Tamino 4.1.x the docid was not longer sufficient to get access to a document because documents can by a sub-tree of document identified by a node id. Therefore, the internal parameter “:docid” becomes more complex, it is a vector of doctype, inoid, nodeid and collection.

    I propose not to use internal parameters to get access to an X-Application. Instead, I would use a JSP page that handles this access. For example:

    If you have an XQuery to load a document and you want to edit this document via a generated “modify” page of X-Application, use the following approach.


    Build a JSP page modifyMyDopcument.jsp. Use a tag xapp:directcommand to load the document and set the modify state.

    <xapp:module>
    <directcommand type="read" document="...Document" schema="myDocSchema" collection="myCollection" arg="${myQuery$}" />
    <directcommand type="modify" document="...Document" />
    </xapp:module>
    <%
    pageContext.forward("modify.jsp");
    %>
    </pre><BR><BR>The attribute 'document' depends on the attribute 'document' of your 'modify.jsp' page. Use the same value as the attribute 'document' of xapp:form tag has.<BR><BR>The values of the attributes 'schema' and 'collection' depend your application. Have a look into the generated page 'search.jsp' which values are used for 'schema' and 'collection' within the tag 'xapp:action type='xquery'.<BR><BR>The invocation of your page could look as follows:<BR><BR><pre class="ip-ubbcode-code-pre">
    http://localhost:8080/myApplication/modifyMyDocument.jsp?myQuery=for $x in ... return $x



    Bye,
    Christian.


    #API-Management
    #webMethods
    #Tamino