1 Reply Latest reply on Nov 4, 2016 4:46 PM by mark123

    Exposing a webservice that accepts XML input

    954010

      Hello

       

      I want to expose a webservice that will accept an XML input (invoice document with repetitive elements) and insert this information into a staging table in the database.

      What would be the best option for implementing this, ORDS/Apex or XML DB web services.

       

      Regards,

       

      Magnus

        • 1. Re: Exposing a webservice that accepts XML input
          mark123

          XML DB web services are geared around SOAP 1.1 but natively support XML

           

          ORDS web services are geared around REST but don't natively support XML ( I think they might have done once) .

           

          That said,  its easy enough to use the ORDS services to do XML, HTML or any format you can think of. Basically you just need to set up your service as PL/SQL  and grab the XML input using the predefined  :body variable  (which is a BLOB). Then do whatever processing you need to do as normal within the database. Presumably convert the BLOB to a CLOB and use XML DB functions to convert the XML into relational format and then stick it in your staging tables.

          Depending on who and what is likely to be using the service, you may also have to mess about with headers  but that's easy enough as well.

           

          As to what's the  "best" solution , it depends :-)