This discussion is archived
6 Replies Latest reply: Feb 4, 2013 6:58 AM by AndyLittle RSS

Access a document through WebServices from Documaker

988311 Newbie
Currently Being Moderated
I require some help regarding the Documaker WebServices.

My Target: I need to access through Webservices the documents which are created in dmkr_asline DB, which are displayed through http://localhost:9002/idm.

What I installed: I followed ‘documaker_enterprise_ig.pdf’ and installed the Documaker.

What I tried: I tried through wl-utc to hit ‘doPublishImport’ method of Publish WebServices and ‘doCallIds’ of ‘Composition Webservices. I am getting following results for those 2 webservices:
a.     Regarding ‘doPublishImport’: I am seeing the job is getting enlisted in ‘Jobs’ table perfectly.
b.     Reagarding ‘doCallIds’: There is no SOAP fault for this, but it is showing that the ‘No document for that Ids’.

I am using Documaker Enterprise 12.0.0.

Please help. Its really urgent.
  • 1. Re: Access a document through WebServices from Documaker
    AndyLittle Explorer
    Currently Being Moderated
    There is some detail that is missing here. In order to successfully complete a doCallIds request, you have to include some additional information - specifically a request type and the associated name/value pairs that are used in that request type to complete your request by Docupresentment. You mention that you need to "access the documents" created and displayed in Documaker Interactive. Can you elaborate on what is meant by "access the documents"? Do you mean to generate a PDF of the documents?

    Please explain your use case and what exactly is needed.

    -Andy
  • 2. Re: Access a document through WebServices from Documaker
    988311 Newbie
    Currently Being Moderated
    My Requirement is as follows:

    a. I want access from BPM process using Webservices the Template which are created and stored in Documaker.
    b. I also want to see the document using whatever values I am passing in it for filling up the template.

    I can create template using Documaker Studio and can store the same in Documaker DB (DMKR Admin and DMKR Asline). Now I can access those temlplate externally from another BPM process.


    Thanks Andy.
  • 3. Re: Access a document through WebServices from Documaker
    988311 Newbie
    Currently Being Moderated
    Need Help. Any person is aware of this requirement, please help.
  • 4. Re: Access a document through WebServices from Documaker
    AndyLittle Explorer
    Currently Being Moderated
    Santanu,

    There are some clarifications that are needed. First is terminology - a template is a resource that is created in Documaker Studio and then deployed to a library. A template is then used in a transaction as part of a form (or a form in total), which can be populated with variable data from an external source (usually an "extract" data file). In programming parlance, a template is like a prototype, and then is implemented/instantiated in a form within a transaction.

    So given that clarification, we need to understand what exactly you wish to retrieve via the web service - it sounds like your goal is obtain a transaction that has been submitted into Document Factory for processing - e.g. a work-in-process (WIP) transaction. Typically what happens is a job (containing extract data) is submitted to the hot directory or via the doPublishFromImport web service. Document Factory then processes the job into one or more transactions. If the job can be processed to completion, then Document Factory will change the JOBSTATUS to an appropriate value (if it is processed all the way to generate a print stream, the final JOBSTATUS will be 999). If the transaction is incomplete due to missing required data or other rules which cause the document to be routed to work-in-process, the JOBSTATUS will be 290.

    The next part of the equation is to use the doCallIds service to submit a request to Docupresentment. With this service you can submit any request to Docupresentment. The documentation in the Documaker Enterprise Edition Administration Guide only shows the schema and a sample "SSS" request, which is simply a test. You will have to send the appropriate request type and name/value pairs.

    You need to review the Documaker Bridge guide (http://docs.oracle.com/cd/E22582_01/documakerbridge.pdf for 12.1 or http://docs.oracle.com/cd/E17552_01/documakerbridge.pdf for 12.0) for a list of the request types you can use with Docupresentment. I recommend you start with DPRGetWipFormset and DPRPrint for generating a PDF of a transaction in WIP.

    Currently there isn't an expedient method to obtain the print streams from completed (999) transactions with web services that I am aware of, however if you have access to the database then you can get the print streams directly from the PUBS table.

    If this doesn't quite answer your question then you'll need to supply more information as to your requirements (e.g. "see the document using whatever values I am passing in it for filling up the template" isn't quite clear - do you want to see a PDF of the transaction in WIP or completed? Do you want to display the formset for editing?)

    -Andy
  • 5. Re: Access a document through WebServices from Documaker
    988311 Newbie
    Currently Being Moderated
    Thanks for the info. Please correct my understanding:
    a. The first part is clear that the template is created in Documaker and it is deployed in a library.
    b. Now I will send the file as it is to Documaker from Application Layer for hot deployment of with data in xml. OR we can call the 'doPublishFromImport' webservice to do the same. --- Need help to submit the same in a correct format. I am attaching a sample successful SOAP which is successful.
    c. Probably, my requirement doesn't require 'doCallIds' webservice.
    d. We will not get access to DB in original implementation. Hence we can't access the same and transfer it to PDF.
    e. Is there any way out to see the PDF of the transaction in WIP or completed or to display the formset for editing? Please help with some sample documents.

    Sample of SOAP which was successfully passing through 'doPublishFromImport':

    <DoPublishFromImportRequest xmlns="oracle/documaker/schema/ws/publishing" xmlns:com="oracle/documaker/schema/ws/publishing/common" xmlns:com1="oracle/documaker/schema/common" xmlns:req="oracle/documaker/schema/ws/publishing/doPublishFromImport/v1/request" xmlns:v1="oracle/documaker/schema/ws/publishing/doPublishFromImport/v1">
    <DoPublishFromImportRequestV1>
    <com:timeoutMillis>3</com:timeoutMillis>
    <v1:Properties>
    <v1:JMS>
    <com1:queuefactory.class>com.docucorp.messaging.jms.DSIJMSJNDIMessageQueueFactory</com1:queuefactory.class>
    <com1:jms.initial.context.factory>weblogic.jndi.WLInitialContextFactory</com1:jms.initial.context.factory>
    <com1:jms.provider.URL>t3://rslptp583.rssoftware.com:7001</com1:jms.provider.URL>
    <com1:jms.security.credentials>weblogic</com1:jms.security.credentials>
              <com1:jms.qcf.name>jms.al1.qcf</com1:jms.qcf.name>
              <com1:jms.inputqueue.connectstring>jms.al1.idsreq</com1:jms.inputqueue.connectstring>
    <com1:jms.outputqueue.connectstring>jms.al1.idsres</com1:jms.outputqueue.connectstring>
    </v1:JMS>
         </v1:Properties>
    <v1:JobRequest CorrelationId="string">
         <req:JobUnique_Id>274133F1736A4AE78A201F601BC0A8A1</req:JobUnique_Id>
    <req:Payload>
    <!--You have a CHOICE of the next 2 items at this level-->
    <req:Extract>
    <!--Optional:-->
    <com1:Name>First Corect</com1:Name>
    <com1:Content>
    <!--You have a CHOICE of the next 3 items at this level-->
    <com1:URILocation>
    <com1:Location>Server</com1:Location>
    <com1:URI>file:///SOABPM/Oracle/odee_1/documaker/mstrres/dmres/input/extrfile.xml</com1:URI>
    </com1:URILocation>
    </com1:Content>
    </req:Extract>
    <!--1 or more repetitions:-->
    </req:Payload>
    </v1:JobRequest>
    </DoPublishFromImportRequestV1>
    </DoPublishFromImportRequest>

    Qns Regarding the SOAP:
    a. Do we need to send the JobUniqueID with this XML? Where from we will be receiving the same? Please be mentioned here, we are from external application. There will be very restricted access to the Documaker Server and DB.
    b. Where from we will be receiving the Name of the Job File? Please be mentioned here, we are from external application. There will be very restricted access to the Documaker Server and DB.
    c. The location of the 'extrfile.xml' file should be where we are going to keep the data file xml.
  • 6. Re: Access a document through WebServices from Documaker
    AndyLittle Explorer
    Currently Being Moderated
    I'll try to answer some of these questions.
    b. Now I will send the file as it is to Documaker from Application Layer for hot deployment of with data in xml. OR we can call the 'doPublishFromImport' webservice to do the same. --- Need help to submit the same in a correct format. I am attaching a sample successful SOAP which is successful.
    You have at least 3 options to get this done:
    1. Deposit file in hot directory - this assumes your application has write access to this directory.
    2. Submit doPublishFromImport request with path/name of file - this also assumes the application has write access to the directory/file, and that Documaker has read access to the file.
    3. Submit doPublishFromImport request with the extract data embedded as shown below. Note that the data must be base-64 encoded.

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pub="oracle/documaker/schema/ws/publishing" xmlns:com="oracle/documaker/schema/ws/publishing/common" xmlns:v1="oracle/documaker/schema/ws/publishing/doPublishFromImport/v1" xmlns:com1="oracle/documaker/schema/common" xmlns:req="oracle/documaker/schema/ws/publishing/doPublishFromImport/v1/request">
    <soapenv:Header/>
    <soapenv:Body>
    <pub:DoPublishFromImportRequest>
    <pub:DoPublishFromImportRequestV1>
    <v1:JobRequest>
    <req:Payload>
    <req:Extract>
    <com1:Content>
    <com1:Binary>***base-64 encoded extract data goes here**</com1:Binary>
    </com1:Content>
    </req:Extract>
    </req:Payload>
    </v1:JobRequest>
    <v1:ResponseProperties>
    <com1:ResponseType>Attachments</com1:ResponseType>
    </v1:ResponseProperties>
    </pub:DoPublishFromImportRequestV1>
    </pub:DoPublishFromImportRequest>
    </soapenv:Body>
    </soapenv:Envelope>
    Is there any way out to see the PDF of the transaction in WIP or completed or to display the formset for editing? Please help with some sample documents.
    This would be where you need to use the doCallIds function. Not all Docupresentment functions are exposed as web service methods so the doCallIds method is used as a gateway. You would need to first determine the appropriate Docupresentment function (review the Documaker Bridge documentation I mentioned in a previous post), and then invoke it via doCallIds.

    To display the formset for editing - there is an entire framework that you probably haven't accounted for (how do you save the transaction, etc) - there is a WIPedit Plugin that facilitates displaying WIP transactions for editing. If you are licensed for Documaker Interactive then I suggest you use that instead. For more help you'll need Oracle Consulting - this is too deep a topic to continue here.

    To generate a PDF of a WIP transaction, consider using the Docupresentment basic request "WFS" which looks like this:
    <section name="ReqType:WFS">
    <entry name="function">atcw32-&gt;ATCLogTransaction</entry>
    <entry name="function">atcw32-&gt;ATCLoadAttachment</entry>
    <entry name="function">atcw32-&gt;ATCUnloadAttachment</entry>
    <entry name="function">atcw32-&gt;ATCSendFile,OUTFILE,REMOTEPRINTFILE,Binary</entry>
    <entry name="function">dprw32-&gt;DPRSetConfig</entry>
    <entry name="function">dprw32-&gt;DPRDecryptLogin</entry>
    <entry name="function">dprw32-&gt;DPRDefaultLogin</entry>
    <entry name="function">dprw32-&gt;DPRCheckLogin</entry>
    <entry name="function">dprw32-&gt;DPRGetWipFormset</entry>
    <entry name="function">dprw32-&gt;DPRPrint</entry>

    You'll need to look up the DPRGetWipFormset and DPRPrint items to know what you need to send - generally it's all the WIP key identifiers (Key1, Key2, KeyID, etc). Then it will send the PDF back on the request. If you need further help you might have to look into Oracle Consulting help - this is about as far as I can go here.
    Do we need to send the JobUniqueID with this XML? Where from we will be receiving the same? Please be mentioned here, we are from external application. There will be very restricted access to the Documaker Server and DB.
    No, the JobUniqueId is not required - see previous example. The response will contain the transaction locators (JOB_ID, docId, TRN_ID).
    b. Where from we will be receiving the Name of the Job File? Please be mentioned here, we are from external application. There will be very restricted access to the Documaker Server and DB.
    The response from the doPublishFromImport will indicate the job identifiers. Here is an example (based on the example request posted up above). Key items indicated in bold
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
    <ns5:DoPublishFromImportResponse>
    <ns5:DoPublishFromImportResponseV1>
    <Result>0</Result>
    <ServiceTimeMillis>2221</ServiceTimeMillis>
    <ns6:ServerTimeMillis>2106</ns6:ServerTimeMillis>
    <ns6:JobResponse>
    <ns9:JobBchErr>0</ns9:JobBchErr>
    <ns9:JobBchProc>0</ns9:JobBchProc>
    <ns9:JobBchSch>0</ns9:JobBchSch>
    <ns9:JobBchTotal>0</ns9:JobBchTotal>
    <ns9:JobHistorical>0</ns9:JobHistorical>
    <ns9:JobHistory>1</ns9:JobHistory>
    <ns9:JobPayloadType>1</ns9:JobPayloadType>
    <ns9:JobPriority>10</ns9:JobPriority>
    <ns9:JobRcpErr>0</ns9:JobRcpErr>
    <ns9:JobRcpProc>0</ns9:JobRcpProc>
    <ns9:JobRcpSch>0</ns9:JobRcpSch>
    <ns9:JobRcpTotal>0</ns9:JobRcpTotal>
    <ns9:JobReplySent>0</ns9:JobReplySent>
    <ns9:JobStartTime>2013-01-15T22:05:28.607Z</ns9:JobStartTime>
    <ns9:JobStatus>290</ns9:JobStatus>
    <ns9:JobTrnErr>0</ns9:JobTrnErr>
    <ns9:JobTrnProc>0</ns9:JobTrnProc>
    <ns9:JobTrnSch>0</ns9:JobTrnSch>
    <ns9:JobTrnStartTime>2013-01-15T22:05:29.143Z</ns9:JobTrnStartTime>
    <ns9:JobTrnTotal>1</ns9:JobTrnTotal>
    <ns9:JobTrnWip>1</ns9:JobTrnWip>
    <ns9:JobUnique_Id>b00ab93e-b5e2-49a1-95b9-f8c8a5ab4beb</ns9:JobUnique_Id>
    *<ns9:Job_Id>83</ns9:Job_Id>*
    <ns9:Payload>
    <ns9:Transaction>
    <ns9:Action>100011</ns9:Action>
    <ns9:ApprovalState>40</ns9:ApprovalState>
    <ns9:CreateTime>2013-01-15T22:05:29.000Z</ns9:CreateTime>
    <ns9:CurrGroup>3</ns9:CurrGroup>
    <ns9:CurrUser>8</ns9:CurrUser>
    <ns9:Customized>0</ns9:Customized>
    <ns9:Descr>Welcome Packet</ns9:Descr>
    <ns9:FormsetId>77cfe936-48fe-412e-b977-7d2068849b4e</ns9:FormsetId>
    <ns9:Job_Id>83</ns9:Job_Id>
    <ns9:Key1>Central</ns9:Key1>
    <ns9:Key2>Account_Status</ns9:Key2>
    *<ns9:KeyId>0000002</ns9:KeyId>*
    <ns9:ModifyTime>2013-01-15T22:05:29.000Z</ns9:ModifyTime>
    <ns9:OrigUser>8</ns9:OrigUser>
    <ns9:ProcessName>docfactory_assembler</ns9:ProcessName>
    <ns9:RecType>00</ns9:RecType>
    <ns9:RouteDesc>DM20030: the following required fields are missing data: AGENTCITYSTATEZIP,Premium Amount.</ns9:RouteDesc>
    <ns9:SecLevel>0</ns9:SecLevel>
    <ns9:StatusCode>W</ns9:StatusCode>
    <ns9:TranCode>NB</ns9:TranCode>
    <ns9:TrnBchErr>0</ns9:TrnBchErr>
    <ns9:TrnBchProc>0</ns9:TrnBchProc>
    <ns9:TrnBchSch>0</ns9:TrnBchSch>
    <ns9:TrnBchTotal>0</ns9:TrnBchTotal>
    <ns9:TrnDoLog>1</ns9:TrnDoLog>
    <ns9:TrnHistorical>0</ns9:TrnHistorical>
    <ns9:TrnHistory>1</ns9:TrnHistory>
    <ns9:TrnRcpErr>0</ns9:TrnRcpErr>
    <ns9:TrnRcpProc>0</ns9:TrnRcpProc>
    <ns9:TrnRcpSch>0</ns9:TrnRcpSch>
    <ns9:TrnRcpTotal>0</ns9:TrnRcpTotal>
    <ns9:TrnStartTime>2013-01-15T22:05:29.086Z</ns9:TrnStartTime>
    <ns9:TrnStatus>290</ns9:TrnStatus
    *<ns9:Trn_Id>63</ns9:Trn_Id>*
    *<ns9:Unique_Id>20e33127-aab7-4e6d-9ca4-89b33022d622</ns9:Unique_Id>*
    </ns9:Transaction>
    </ns9:Payload>
    </ns6:JobResponse>
    <ns6:ServiceInfo>
    <ns3:Operation>doPublishFromImport</ns3:Operation>
    <ns3:Version>
    <ns3:Number>1</ns3:Number>
    <ns3:Used>true</ns3:Used>
    </ns3:Version>
    </ns6:ServiceInfo>
    </ns5:DoPublishFromImportResponseV1>
    </ns5:DoPublishFromImportResponse>
    </S:Body>
    </S:Envelope
    c. The location of the 'extrfile.xml' file should be where we are going to keep the data file xml.
    Ideally since this is a web service you would not want the service to write to the same file. What happens if there are multiple requests? Use the example that send the data with the request unless you plan to write the extract data to uniquely-named files.

    Hope this helps.
    -Andy

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points