3 Replies Latest reply on Feb 18, 2014 3:57 PM by rareddy

    odata behind proxy

    gioppoluca

      I have a JBoss with TEIID that exposes some odata stuff.

      The problem is that it is in cloud and is exposed through portmapping so that the internal address is masked, but the odata json answer contains the internal server name.

      How can I make the odata expose the external nale?

      Thanks

      Luca

        • 1. Re: odata behind proxy
          rareddy

          it should be whatever the external URL that cloud provider offered. In the OpenShift, it tells you what external URL you can access the JBoss AS, you would substitute your host and port for that.

           

          Ramesh..

          • 2. Re: odata behind proxy
            gioppoluca

            Ok I try to go further:

            The following is an example of JSON taken from odata published VDB

            {

            "d" : {

            "__metadata" : {

            "uri" : "http://localhost:8080/odata/ricettivitaVDB/ricettivita_csvView('9CENTO')", "type" : "ricettivita_view.ricettivita_csvView"

            }, "Indirizzo completo" : "STRADA BALDICHIERI 51", "Bagni" : "3", "Settore Alberghiero-Extralberghiero" : "Extra-alberghiero", "Telefono" : "014166363/3396009909", "Fax" : null, "E-mail" : "info@bb9cento.it", "Camere" : "3", "Stelle" : "2", "Denominazione struttura" : "9CENTO", "Provincia" : "ASTI", "Qualifica" : "Bed & Breakfast", "Comune" : "TIGLIOLE", "Letti" : "6", "CAP" : "14016"

            }

            }

             

            Let say that I have a tool (like the WSO2 API manager) that map the http://localhost:8080/odata/ricettivitaVDB/ricettivita_csvView to something like http:api.mysite.it/apiname/1.0.0


            Now all goes well for the first call and for all the following call I build on my own, but if I want to use the "uri" for what is meant I need it to become the exposed one and not the internal.

            Is it possible to tell odata process to substitute the internal host and path (at least including odata) to the external one.

            Thanks

            • 3. Re: odata behind proxy
              rareddy

              Not currently, I guess it could be added based on some configuration through web.xml. You can log an enhancement request for it.