1 2 Previous Next 23 Replies Latest reply: Aug 21, 2012 1:26 AM by lkakarla RSS

    Checked in filecontent is nil

    lkakarla
      Hi,

      I am trying to upload PDF files to UCM server using UCM out of box WSDL's. When I tried to call CheckIn Universal operation using SoapUI tool from my local machine, I am getting status message that, '*Successfully checked in content item "100000122334".*'. But when I downloaded the native file from UCM, the file size is showing as '0' bytes and I am not able to open it. Could you please assist me in handling this issue?

      SOAP Request Message:
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:chec="http://www.stellent.com/CheckIn/">
      <soapenv:Header/>
      <soapenv:Body>
      <chec:CheckInUniversal>
      <chec:dDocName></chec:dDocName>
      <chec:dDocTitle>UploadTest</chec:dDocTitle>
      <chec:dDocType>Document</chec:dDocType>
      <chec:dDocAuthor>weblogic</chec:dDocAuthor>
      <chec:dSecurityGroup>Public</chec:dSecurityGroup>
      <chec:dDocAccount></chec:dDocAccount>
      <chec:CustomDocMetaData>
      <chec:property>
      <chec:name></chec:name>
      <chec:value></chec:value>
      </chec:property>
      </chec:CustomDocMetaData>
      <chec:primaryFile>
      <chec:fileName>E:/Invoice.pdf</chec:fileName>
      <chec:fileContent>cid:1216340510160</chec:fileContent>
      </chec:primaryFile>
      <chec:alternateFile>
      <chec:fileName></chec:fileName>
      <chec:fileContent>cid:280283635999</chec:fileContent>
      </chec:alternateFile>
      <chec:extraProps>
      <chec:property>
      <chec:name></chec:name>
      <chec:value></chec:value>
      </chec:property>
      </chec:extraProps>
      </chec:CheckInUniversal>
      </soapenv:Body>
      </soapenv:Envelope>
        • 1. Re: Checked in filecontent is nil
          875117
          Hi,

          I would guess that you probably didn't use Attachments tab at the bottom of the SOAP request window to supply pdf file.
          <chec:fileName>E:/Invoice.pdf</chec:fileName> will only set Native File name, as it is shown in Content server, regardless of what is actual source file name.

          Remove <chec:fileContent>cid:280283635999</chec:fileContent> from the SOAP request and use Attachments tab to set path to the file. At Attachments window, make sure to change ContentID, which will be by default same as file name, to primaryFile.
          If this all is a wrong guess, then more input is needed.

          Regards,
          Boris
          • 2. Re: Checked in filecontent is nil
            lkakarla
            Hi Boris,

            Thanks for your reply. I tried using attachments tab at the bottom of the SOAP UI request window to supply pdf file. Also I have changed ContentID as needed. But still the uploaded file content iin UCM is showing as null.

            Regards,
            lkakarla.

            Edited by: lkakarla on Aug 12, 2012 9:16 PM
            • 3. Re: Checked in filecontent is nil
              875117
              OK. Just noticed that I have advised you to remove wrong line from request. Remove these both lines (they are not neccessary):

              <chec:fileContent>cid:1216340510160</chec:fileContent>
              <chec:fileContent>cid:280283635999</chec:fileContent>

              Does attachments tab show Content type as application/pdf ?

              Regards,
              Boris

              Edited by: tombo on 2012.08.12 12:05
              • 4. Re: Checked in filecontent is nil
                lkakarla
                Hi Boris,

                I tried posting SOAP request without fileContent element in both places and attached the pdf file as mentioned in previous post. And I got SOAP response that, "Content item 'ucm_cluster1-000472' was not successfully checked in. The primary file does not exist.". But the file is existing in the specified path in my local machine. As a trial, I placed the same file in UCM server, and called service from my local machine by giving UCM Server file path. This time, the file uploaded to UCM with actual content. Seems to be it's not working when I placed file in my local machine.

                UCM Response:
                <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
                <SOAP-ENV:Body>
                <idc:CheckInUniversalResponse xmlns:idc="http://www.stellent.com/CheckIn/">
                <idc:CheckInUniversalResult>
                <idc:dID>0</idc:dID>
                <idc:dRevisionID>1</idc:dRevisionID>
                <idc:dRevClassID>472</idc:dRevClassID>
                <idc:dRevLabel>1</idc:dRevLabel>
                <idc:StatusInfo>
                <idc:statusCode>-1</idc:statusCode>
                <idc:statusMessage>Content item 'ucm_cluster1-000472' was not successfully checked in. The primary file does not exist.</idc:statusMessage>
                </idc:StatusInfo>
                </idc:CheckInUniversalResult>
                </idc:CheckInUniversalResponse>
                </SOAP-ENV:Body>
                </SOAP-ENV:Envelope>

                Yes, the content type is showing as 'application/pdf'.

                Regards,
                lkakarla
                • 5. Re: Checked in filecontent is nil
                  875117
                  It's great that you got it working anyway. Now, there's no reason why it shouldn't work with local file. What I noticed, working with SoapUI, is that when you try file upload with wrong parameters related to the primary file (resulting with error) and then correcting all parameters to valid ones, it still claims that there is no primary file. Solution was to remove file from attachments tab and to attach it again. So, having confirmed that request is working, try again with local file.

                  Regards,
                  Boris
                  • 6. Re: Checked in filecontent is nil
                    lkakarla
                    Hi Boris,

                    Thanks for your inputs. I tried the suggested approach, but I got the same response that 'The primary file does not exist'. What I understood is, when we send SOAP request to Checkin service, the web service is expecting either the file in UCM server file system (OR) value in <chec:fileContent> element.
                    • 7. Re: Checked in filecontent is nil
                      875117
                      Do you happen to use the latest and greatest soapUI 4.5.1? This version doesn't work for me and I can't checkin file to the Content Server using it. Version 4.5.0 is fine.

                      Use of <chec:fileContent></chec:fileContent> element is not necessary in soapUI but it does give shorter SOAP request (examine RAW tab of your request). I still beleive that something is missing at attached file parameters.
                      Return <chec:fileContent>cid:1216340510160</chec:fileContent> line to the request.
                      Remove any attached file and select some local pdf file. Verify Attachments parameters:

                      Name = actual path to the file
                      Content type = application/pdf
                      Size = some number
                      Part = click there and you will have two choices - <anonymous> and 1216340510160 which is cid number from fileContent line. Select this number.
                      Type = CONTENT
                      ContentID = primaryFile
                      Cached = leave unchecked (if checked, stores file to local cache and does not look to file system any more)

                      Finally, at the very bottom of soapUI notice soapUI log, http log ...... error log .... There should be some clues what's wrong.
                      I hope that this will help.

                      Regards,
                      Boris
                      • 8. Re: Checked in filecontent is nil
                        lkakarla
                        Hi Boris,

                        Your points are helping me to understand more about attachment handling in SOAP UI. Currently I am using SOAP UI 3.6.1 version to call UCM web service. And I tried to call web service by specifying following values and I got response that, "Successfully checked in content item 'UCM_CLUSTER1-000632", but file content on UCM server is still null. Do I need set request properties like Enable MTOM, Encode Attachments etc OR add header properties like Content type in SOAPUI..

                        Also I verified the logs and not found any extra info.

                        Attachment Parameters:
                        Name = E:/InvoiceSample.pdf
                        Content type = application/pdf
                        Size = 148467
                        Part = 211391539693
                        Type = CONTENT
                        ContentID = InvoiceSample
                        Cached = Unchecked

                        SOAP Request in RAW tab:

                        POST http://localhost:16200/_dav/cs/idcplg HTTP/1.1
                        Accept-Encoding: gzip,deflate
                        Content-Type: text/xml;charset=UTF-8
                        SOAPAction: "http://www.stellent.com/CheckIn/"
                        User-Agent: Jakarta Commons-HttpClient/3.1
                        Content-Length: 1815
                        Authorization: Basic cGFud2xzZGV2OndlbGNvbWUx
                        Host: localhost:16200

                        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:chec="http://www.stellent.com/CheckIn/">
                        <soapenv:Header/>
                        <soapenv:Body>
                        <chec:CheckInUniversal>
                        <!--Optional:-->
                        <chec:dDocName/>
                        <!--Optional:-->
                        <chec:dDocTitle>Test5</chec:dDocTitle>
                        <!--Optional:-->
                        <chec:dDocType>Document</chec:dDocType>
                        <!--Optional:-->
                        <chec:dDocAuthor>weblogic</chec:dDocAuthor>
                        <!--Optional:-->
                        <chec:dSecurityGroup>Public</chec:dSecurityGroup>
                        <!--Optional:-->
                        <chec:dDocAccount/>
                        <!--Optional:-->
                        <chec:CustomDocMetaData>
                        <!--Zero or more repetitions:-->
                        <chec:property>
                        <!--Optional:-->
                        <chec:name/>
                        <!--Optional:-->
                        <chec:value/>
                        </chec:property>
                        </chec:CustomDocMetaData>
                        <!--Optional:-->
                        <chec:primaryFile>
                        <!--Optional:-->
                        <chec:fileName>E:/InvoiceSample.pdf</chec:fileName>
                        <!--Optional:-->
                        <chec:fileContent>cid:211391539693</chec:fileContent>
                        </chec:primaryFile>
                        <!--Optional:-->
                        <chec:alternateFile>
                        <!--Optional:-->
                        <chec:fileName/>
                        <!--Optional:-->
                        <chec:fileContent>cid:559708520611</chec:fileContent>
                        </chec:alternateFile>
                        <!--Optional:-->
                        <chec:extraProps>
                        <!--Zero or more repetitions:-->
                        <chec:property>
                        <!--Optional:-->
                        <chec:name/>
                        <!--Optional:-->
                        <chec:value/>
                        </chec:property>
                        </chec:extraProps>
                        </chec:CheckInUniversal>
                        </soapenv:Body>
                        </soapenv:Envelope>

                        Edited by: lkakarla on Aug 14, 2012 3:17 PM
                        • 9. Re: Checked in filecontent is nil
                          875117
                          Based on latest input I can conclude with no doubt that, for some reason we have jet to determine, you don't manage to attach file that should be sent to the WebCenter Content server.
                          There is no need to add header or modify Request Properties (like MTOM etc.). Because of using <chec:fileContent> you can get sucessfull SOAP request and even content item in the Content Server, but it will be nil as it has only name and not a byte of content. While using request without <chec:fileContent> section, there must be an attached file to have successfull request and that's why you receive error message "...The primary file does not exist" in that case.

                          RAW request with attached file will have cid number replaced with actual content so this line will look something like:
                          <chec:fileContent>JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmls ....... and continues on like that for as many bytes content has.

                          First question to be asked is what was really different when you managed to attach and successfully send file located on server and not on the local computer? Server address in SOAP request is http://localhost:16200/_dav/cs/idcplg.
                          Do you work with soapUI installed on the same machine where WebCenter Content is or it is development environment on your local computer?

                          At last one possibly silly question. How do you attach file to the SOAP request. Do you begin with + sign at attachments window and browse to the desired file or there is some other way?

                          Regards,
                          Boris
                          • 10. Re: Checked in filecontent is nil
                            Srinath Menon-Oracle
                            Hi ,

                            What is the version of UCM where you are trying to upload ? Copy the version tag under Administration - Configuration Information and post it .


                            Thanks
                            Srinath
                            • 11. Re: Checked in filecontent is nil
                              lkakarla
                              Hi Boris,

                              Whether I attached a file or not, if I provide local path, the service is checking in the file with content as nil. In case, if I provided a server file path, then the service is checking in the document correctly.

                              And when I kept <filecontent> element and attached file, the RAW request is not showing any data in <filecontent> element even though I mapped attachment to respective cid.

                              But when I removed <filecontent> element and attached file, the RAW request is having the file content at the end of SOAP envelope.

                              Since I am working in customer environment, I replaced server URL with localhost while posting to forum. Sorry if it's misguided you. Both SoapUI & Webcenter suite installed on different machines.

                              Yes, I do attaching file by clicking on + sign at attachments window and browse to the desired file.

                              Thanks,
                              • 12. Re: Checked in filecontent is nil
                                lkakarla
                                Hi Srinath,

                                Currently I am using UCM version 11gR1-11.1.1.4.0-idcprod1-101229T001824 (Build:7.3.0.180). Please let me know how to incorporate these details into SOAP request. Thanks.
                                • 13. Re: Checked in filecontent is nil
                                  Srinath Menon-Oracle
                                  Hi ,

                                  Attachment as in why do you need to do that ?

                                  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:chec="http://www.stellent.com/CheckIn/">
                                  <soapenv:Header/>
                                  <soapenv:Body>
                                  <chec:CheckInUniversal>
                                  <!--Optional:-->
                                  <chec:dDocName>Upload_test</chec:dDocName>
                                  <!--Optional:-->
                                  <chec:dDocTitle>TestingUpload</chec:dDocTitle>
                                  <!--Optional:-->
                                  <chec:dDocType>Document</chec:dDocType>
                                  <!--Optional:-->
                                  <chec:dDocAuthor>weblogic</chec:dDocAuthor>
                                  <!--Optional:-->
                                  <chec:dSecurityGroup>Public</chec:dSecurityGroup>
                                  <!--Optional:-->
                                  <chec:dDocAccount></chec:dDocAccount>
                                  <!--Optional:-->
                                  <chec:CustomDocMetaData>
                                  <!--Zero or more repetitions:-->
                                  <chec:property>
                                  <!--Optional:-->
                                  <chec:name>?</chec:name>
                                  <!--Optional:-->
                                  <chec:value>?</chec:value>
                                  </chec:property>
                                  </chec:CustomDocMetaData>
                                  <!--Optional:-->
                                  <chec:primaryFile>
                                  <!--Optional:-->
                                  <chec:fileName>d:/fmwconfig/hello.txt</chec:fileName>
                                  <!--Optional:-->
                                  <chec:fileContent>cid:702441820616</chec:fileContent>
                                  </chec:primaryFile>
                                  <!--Optional:-->
                                  <chec:alternateFile>
                                  <!--Optional:-->
                                  <chec:fileName>?</chec:fileName>
                                  <!--Optional:-->
                                  <chec:fileContent>cid:819515503753</chec:fileContent>
                                  </chec:alternateFile>
                                  <!--Optional:-->
                                  <chec:extraProps>
                                  <!--Zero or more repetitions:-->
                                  <chec:property>
                                  <!--Optional:-->
                                  <chec:name>?</chec:name>
                                  <!--Optional:-->
                                  <chec:value>?</chec:value>
                                  </chec:property>
                                  </chec:extraProps>
                                  </chec:CheckInUniversal>
                                  </soapenv:Body>
                                  </soapenv:Envelope>


                                  This is the soap wsdl which I am using to upload contents to UCM server . In this case UCM is on a linux box and SoapUI on windows environment .It works fine .

                                  Try this and see .

                                  Thanks
                                  srinath
                                  • 14. Re: Checked in filecontent is nil
                                    lkakarla
                                    Hi Srinath,

                                    I tried as suggested, and I got proper response from UCM. But the uploaded file size in UCM is 2 bytes, it's not the actual size.

                                    Since the service is not picking the file from local system, we tried attachment option, but no luck.

                                    Thanks,
                                    1 2 Previous Next