Product Master Data Management

Get Involved. Join the Conversation.

Topic

    Vignesh Chandran
    Upload file to UCM - using webservice
    Topic posted January 8, 2018 by Vignesh ChandranBlue Ribbon: 750+ Points 
    2467 Views, 12 Comments
    Title:
    Upload file to UCM - using webservice
    Summary:
    Upload file to UCM - using webservice
    Content:

    Hi 

     

    I want to upload some files to UCM.

    That I want to do, using webservice. Do you guys know the WSDL for that. 

    Note : SCM domain.

     

    Regards,

    Vignesh Chandran

    Comment

     

    • Gaurav Kasliwal

      Hi Vignesh,

       https://<your pod detail>/idcws/GenericSoapPort?wsdl is the WSDL used to upload file. Below is the sample payload that you can try in SOAP UI. In the below payload Contents tag contain the base64 format of the file that you want to upload. Make the necessary changes in the file location. In addition, you need to provide user name and password in Auth(Basic) tab in SOAP UI.

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ucm="http://www.oracle.com/UCM">
         <soapenv:Header>
          </soapenv:Header>
         <soapenv:Body>
            <ucm:GenericRequest webKey="cs">
               <ucm:Service IdcService="CHECKIN_UNIVERSAL">
                  <ucm:Document>
                        <ucm:Field name="dDocTitle">PersonAccrualDetail</ucm:Field>
                        <ucm:Field name="dDocType">Document</ucm:Field>
                        <ucm:Field name="dDocAuthor">HCM.USER</ucm:Field>
                        <ucm:Field name="dSecurityGroup">FAFusionImportExport</ucm:Field>
                        <ucm:Field name="dDocAccount">hcm$/dataloader$/import$</ucm:Field>
                        <ucm:File name="primaryFile" href="PersonAccrualDetail.zip" >
                           <ucm:Contents>UEsDBBQAAAAIAJyL7krm624TqAAAAO4AAAAXAAAAUGVyc29uQWNjcnVhbERldGFpbC5kYXRtjssKwjAURPeC/+AfNJVC6TKQYBX7oA3qTmJ6F9UmkTRBCvfjrVDBhcuZ4TCn4IIyKijW4EZrqFIuyIGBl/2ASxLTE5a9DPoGDutBmlJqwLN1DwFOj9/BWdUx6QFPcgiAtLuH0WswvgE589ja4BS00+hBVy8zI7/NvluvCt7s+H8ddqhEjpdLRkg2Hyjpe2s2HxnkYqm3JE4jkkZxgjFB5EXOjgtyTd5QSwECFAAUAAAACACci+5K5utuE6gAAADuAAAAFwAAAAAAAAABACAAAAAAAAAAUGVyc29uQWNjcnVhbERldGFpbC5kYXRQSwUGAAAAAAEAAQBFAAAA3QAAAAAA</ucm:Contents>
                        </ucm:File>
                     </ucm:Document>
               </ucm:Service>
            </ucm:GenericRequest>
         </soapenv:Body>
      </soapenv:Envelope>

       

       

      Thanks!

      • Vignesh Chandran

        Thanks Gaurav !

        I tried with another way . Please see the below information. 

        Upload the document to UCM - using webservice:

         

        Webservice WSDL : https://XXXXXXX/publicFinancialCommonErpIntegration/ErpIntegrationService?WSDL

         

        We can upload the csv, txt or zip(it contain any). The only thing we need to convert that file into base64 encoding. That encoded detail we need to use in content tag of the xml request payload.

         

        Request payload:

        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/" xmlns:erp="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">

           <soapenv:Header/>

           <soapenv:Body>

              <typ:uploadFileToUcm>

                 <typ:document>

                    <erp:Content>UEsDBBQAAAAIACFkKUzuzkTbVIUEANzXBAAHAAAASUNTLnBkZqxaBVxT3xfHn4FOsRgiUkNAhgijkVZSOmVKSgwYscGAUQIqDqRDQloGiEgp3SgoHdKMbYR0i5T0/yH/…MIME ENCODED CONTENT…+bTci/3qP+aWLmLu4/bLp/piSqDCYioKLS15N4Y+dWPi/SU5I3QXuAfglp5+7sJabI+CXt3YmbxgIBPo17x8AUEsBAj8AFAAAAAgAIWQpTO7ORNtUhQQA3NcEAAcAJAAAAAAAAAAgAAAAAAAAAElDUy5wZGYKACAAAAAAAAEAGAAPl4XjF4nTAan6hOMXidMBW6GKwBeJ0wFQSwUGAAAAAAEAAQBZAAAAeYUEAAAA</erp:Content>

                 <erp:FileName>Attach10.zip</erp:FileName>

                    <!--Optional:-->

                    <erp:ContentType>zip</erp:ContentType>

                    <!--Optional:-->

                    <erp:DocumentTitle>attachzip</erp:DocumentTitle>

                    <!--Optional:-->

                    <erp:DocumentAuthor>ICS.admin</erp:DocumentAuthor>

                    <!--Optional:-->

                    <erp:DocumentSecurityGroup>FAFusionImportExport</erp:DocumentSecurityGroup>

                    <!--Optional:-->

                    <erp:DocumentAccount>scm$/item$/import$</erp:DocumentAccount>

                    <!--Optional:-->

                    <erp:DocumentName>ATTACH10000010</erp:DocumentName>

                 </typ:document>

              </typ:uploadFileToUcm>

           </soapenv:Body>

        </soapenv:Envelope> 

      • Swathi gogula

        Can I load the file by giving the file location. Here you have placed the file text in Base 64 format in <Contents> Tag. My file size is huge. Looking to place the file in ucm by giving file location

        • Magesh Kesavapillai

          yes. You can specify the UCM (webcenter) location/file and attach it with item. Sample payload below:

          <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

              <soap:Body>

                  <ns1:createItem xmlns:ns1="http://xmlns.oracle.com/apps/scm/productModel/items/itemServiceV2/types/">

                      <ns1:item xmlns:ns2="http://xmlns.oracle.com/apps/scm/productModel/items/itemServiceV2/">

                          <ns2:OrganizationCode>V1</ns2:OrganizationCode>

                          <ns2:ItemClass>Root Item Class</ns2:ItemClass>

                          <ns2:Template>Finished Goods</ns2:Template>

                          <ns2:ItemNumber>Compressor10HP_RP4</ns2:ItemNumber>

                          <ns2:ItemDescription>Reciprocating Compressor 10HP</ns2:ItemDescription>

                          <ns2:ItemAttachment>

                              <ns2:DatatypeCode>FILE</ns2:DatatypeCode>

                                                                                          <ns2:DatabaseDescription>desc</ns2:DatabaseDescription>

                              <ns2:FileName>assembly.png</ns2:FileName>

                              <ns2:UsageType>S</ns2:UsageType>

                                                                                          <ns2:DmFolderPath>/Contribution Folders/PIM</ns2:DmFolderPath>

                              <ns2:DatabaseTitle>assembly.png</ns2:DatabaseTitle>

                              <ns2:DmRepository>FusionAppsContentRepository</ns2:DmRepository>

                              <ns2:DocumentAttributes></ns2:DocumentAttributes>

                              <ns2:CategoryName>MISC</ns2:CategoryName>

                                                                                          <ns2:DmType>Document</ns2:DmType>

                              <ns2:DownloadStatus>N</ns2:DownloadStatus>                                                                         

                          </ns2:ItemAttachment>

                      </ns1:item>

                  </ns1:createItem>

              </soap:Body>

          </soap:Envelope>

      • Mohammed Kaja Nawaz L J

        Hi Gaurav,

        Do you know limitation on the </ucm:Contents> file size that we can pass it through GenericSoapPort webservice?

      • sameer ashturkar

        Hi Vignesh,

        From where do you get base64 encoding format.?

         

        Thanks,

        Sameer 

    • Gaurav Kasliwal

      Cool. Thanks!

    • Ramesh Nayak

      Vignesh,

      I am trying to automate this process please share with me if you have sample code.

      Thanks in advance.

      Thanks and Regards,

      Ramesh