REST and JSON in OC4J?

Hi,
Pardon my ignorance with web technologies as I'm still starting. Just wanted to ask, is it possible to create and deploy RESTful Web Services and JSON format in OC4J?
Thanks,
Allen

I think you can work that within the orion-application.xml file:
<imported-shared-libraries>
     <remove-inherited name="oracle.xml"/>
     <import-shared-library name="xalan" />
     <import-shared-library name="xerces" />
</imported-shared-libraries>
Where you've defined shared-lib entries for the above.
Reference:
http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html
I don't know if this is handled in the same way for the version you are dealing with, however.

Similar Messages

  • Rest method that can support request/responce in both xml and json formats

    Hi,
    I want  to create rest method that can support request/responce in both xml and json formats.
    I am trying in bellow way, but its not working getting error.
    any idea on this?
    Code in IService.cs :
    [OperationContract]       
    [WebGet(UriTemplate = "/Login/{UserID}/{Password}")]
    Responce Login(string UserID, string Password);
    Code in Service.cs :
    public Responce Login(string UserID, string Password)
                try
                    objResponce = new Responce();
                    objResponce.MessageType = Responce.ResponceType.Warning.ToString();
                    string Con = GetConnectionString(UserID, Password);  //Method to check valid user or not
                    if (Con.Trim().Length != 0)            
                        objResponce.Message = "you have logged in Successfully";                   
                    else
                        objResponce.Message = "Please Enter Valid UserID,Password";                
                catch (Exception ex)
                    through ex;             
                return objResponce;
    My Config settings :
    <services>
          <service name="OnePointAPI.OnePointAPIService">
               <endpoint address="JSON" binding="webHttpBinding" contract="OnePointAPI.IOnePointAPIService" behaviorConfiguration="webJSON" ></endpoint>
               <endpoint address="XML" binding="basicHttpBinding" contract="OnePointAPI.IOnePointAPIService" behaviorConfiguration="webXML" ></endpoint>     
          </service>   
     </services>
     <behaviors>
          <serviceBehaviors>
            <behavior>
              <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="webJSON">
              <webHttp defaultOutgoingResponseFormat="Json"/>
            </behavior>
            <behavior name="webXML">
              <webHttp defaultOutgoingResponseFormat="Xml" />
            </behavior>
          </endpointBehaviors>
     </behaviors>  
    Anwar Shaik

    In several days (in the 19th) i will lecture at
    SQLSaturday #360 and my last demo (hopefully I will have the time) is
    Full implementation of JSON, I will show several function using JSON serializer and deserializer, and as mentioned full implementation including fast
    indexes on JSON column (finding specific Node in 10 million rows
    in less then a second). If you want to wait, then I will publish it latter probably, or you can come the lecture if you want :-)
    * I am using Json.NET framework, by the way.
    regarding your question, all you need is to find a nice serializer/deserializer framework (you can use
    Json.NET framework) in order to do what you are looking for (if I understand what you asked)
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Brief explaination of REST,Webservices,CSON and JSON

    brief explaination of REST,Webservices,CSON and JSON

    http://www.simplecodestuffs.com/what-is-the-difference-between-http-and-rest-and-soap-in-web-services/
    SOAP uses WSDL for communication between consumer and provider, whereas REST just uses XML or JSON to send and receive data
    WSDL Defines contract between client and service and is static by its nature. In case of REST contract is somewhat complicated and is defined by HTTP, URI, Media Formats and Application Specific Coordination
    Protocol. It’s highly dynamic unlike WSDL.
    SOAP doesn’t return human readable result, while REST result is readable with is just plain XML or JSON
    This is not true. Plain XML or JSON are not RESTful at all. None of them define any controls(i.e. links and link relations, method information, encoding information etc…) which is against REST as far as messages must be self contained and coordinate interaction
    between agent/client and service.
    With links + semantic link relations clients should be able to determine what is next interaction step and follow these links and continue communication with service.
    It is not necessary that messages be human readable, it’s possible to use cryptic format and build perfectly valid REST applications. It doesn’t matter whether message is human readable or not.
    Thus, plain XML(application/xml) or JSON(application/json) are not sufficient formats for building REST applications. It’s always reasonable to use subset of these generic media types which have strong semantic meaning and offer enough control information(links
    etc…) to coordinate interactions between client and server.
    REST is over only HTTP. HTTP is most widely used and when we talk about REST web services we just assume HTTP. HTTP defines interface with it’s methods(GET, POST, PUT, DELETE, PATCH etc) and various headers
    which can be used uniformly for interacting with resources. This uniformity can be achieved with other protocols as well.
    REST permits many different data formats where as SOAP only permits XML.
    While this may seem like it adds complexity to REST because you need to handle multiple formats, in my experience it has actually been quite beneficial. JSON usually is a better fit for data and parses much faster. REST allows better support for browser clients
    due to it’€™s support for JSON.
    If this helped you resolve your issue, please mark it Answered

  • Calling a rest based json webservice in program

    Hi All,
    How to call a REST bases JSON web service in abap. Please  let me the pre settings for establishing the connection
    Thank you

    Thanks for ur reply. so how to specify the web server IP? I have a xml and needs to be send it to server to get the response.
    Thanks
    Senthil

  • Create flex asset with REST / Javascript / JSON

    Hi
       I was trying to create flex asset by calling REST API with javascript and json. But i am struck in adding mutli valued attribute of type asset. Could you help us with sample code to create asset attribute which is multi valued. Also could you help in adding attribute of type Date. sample code as below
    "name" : "RelatedPlaces",
                            "data" :
                                "assetValue" : "SITE_Place_C:"+ document.getElementById("relPlace").value
    "name" : "EndDate",
                            "data" :
                                "dateValue" : document.getElementById("enddate").value

    There is a sample bundled with webcenter sites at Misc/articles. You have to implement the proxy controller which serve as proxy for xmlhttp request.
    The proxy will redirect the request actual REST resource in the target server

  • Developer-Online New Tutorial Released: Create a Flickr gallery using jquery and JSON

    Create a Flickr gallery using jquery and JSON
    Hello everyone, In this tutorial I'll show how is simple to build your Flickr photo gallery using jQuery framework and JSON. We'll see how to setup thumbnail's numbers, convert your RSS Flickr in a JOSOn format and display theme. Thank You for your attention!
    Posted on:                                       2010-01-11 10:20:48
    Author: patrizio Quatrini
    Best Regards
    Waleed Barakat

    Heya,
    When I first read your post I originally thought you were posting a tutorial about whether a chosen username has already been resigtered or not on the signup page like this tutorial:
    http://DwFAQ.info/signup_demo.php
    Spry Check Username Availability
    Date Created: Sunday, July 5, 2009 2:29 PM
    Then after looking at the page you've linked to and trying to understand the objective of the tutorial I've noticed that you are talking about something like this:
    http://DwFAQ.info/home.php?id=7
    Spry Search
    Date Created: Sunday, March 1, 2009 8:51 PM
    It's pretty simple to do with the link I've referenced. Simply create your database with populated tables, use the mentioned script to convert the database data into xml syntax, then enter your dynamic database script as the location of the xmlDataSet in the spry page linked.
    View source on this page which shows the non-destructive filter in action to see how it's done! You can also spice it up a little for products, etc. by using this method. The key is to create a dynamic xml syntax from your database and then use the dynamic xml script location as your xmlDataSet in the search page.
    I have an example of the auto suggest search on my homepage http://DwFAQ.info
    On the top-left side of the page click on the link that says Search Tutorials to reveal the search form. Then start typing characters into the search box to see the entries instantly filter according to the characters that are typed. You can also filter further by clicking on the category checkboxes to filter by keywords AND category.
    You can view the source code on my homepage to see the location of the dynamic xml syntax referenced as the xmlDataSet location and how it was implemented into the site.

  • REST and ODATA service

    Hi,
    I am using PI 7.4.
    I have few queries regarding REST and ODATA service -
    What is REST based services in PI?
    If there is an ODATA service in SAP, how can we use that in PI for mapping needs?
    Where we need to use BAPIs and where we can consume odata services that are being built for SAP UI5 project.

    Hi
    Kindly check the following links:
    REST Adapter on Advanced Adapter Engine (New) - What's New in SAP NetWeaver 7.4 (Release Notes) - SAP Library
    REST Adapter on Advanced Adapter Engine (New) - What's New in SAP NetWeaver 7.3 EHP1 (Release Notes) - SAP Library
    https://www.advantco.com/product/REST
    PI REST Adapter - Blog Overview
    Regards,
    Xineohpi

  • What are the Advantages and Disadvantages of OC4J ?

    Hi,
    I want to know what are the advantages and disadvantages of OC4J server .
    Can anyone tell me please..
    Regards,
    Ajay

    simple, reliable, extremely fast and low cost of development: re-start takes 10 - 15 seconds. Its disadvantage may be less flexibility in configuration then heavy-weight Weblogic

  • Is it possible to create an Apple Script to import data from a web data feed (RESTful XML/JSON)?

    Before I get started looking for a programmer, does anyone know if it will be possible to create a script that will allow Numbers to connect to an external data feed in either XML or JSON? I want to enable some colleagues who use Mac to connect to the same data feed that Excel for Office connects to.. Thanks,

    It is definitely not hard to import XML or JSON data via an AppleScript. As an amateur tinkerer, I found a way, for example, to bring in OFX data from my bank (OFX is a flavor of XML) using the XML parser built into System Events, which is AppleScriptable.
    How satisfied your colleagues would be with the solution, though, will depend on what you mean by "connect to an external data feed." If you are dealing with datasets in the thousands of rows and need frequent and rapid response, then you may not be happy. In that kind of situation you would need to expect at least a few seconds of wait time every time you "refresh."
    If, as in my case, you have only a few hundred rows and don't need to bring the data in every few seconds, then the AppleScript solution is very practical. The programmer could probably goose the performance and make the job easier by using AppleScript as a wrapper for a script in Python or another language that is faster than AppleScript at parsing XML and JSON.
    SG

  • Cmdline start and stop separate OC4J

    Hi,
    We are working with OAS 10.1.2.0.2 (J2EE and Web Cache)
    On that OAS we have 7 OC4J's with different Webservices
    Is it possible to start and stop a OC4J sepratly using commandline functionalitt without using "opmnctl stopall" and startall
    Based on an event I just want to start and stop one component and not all components.
    Maybe the answer is already given here but please help.
    Hugo Perfors

    i found it in the manual

  • REST and SOAP

    Hi all,
    I just read that REST and SOAP are available for use in APEX.
    Yet I do not know what these terms are, why would I want to use these technologies over the simple forms and reports?
    Where can I get information about REST and SOAP in relation to what I am used to working with (PL/SQL and APEX)?

    Dear all,
    Did I ever say that I needed it explained to me?
    Wasn't I clear enough when I said:
    Hope that somebody read a book and could refer it to me.
    I am already busy looking in google and bing and yahoo.
    Hoping somebody knows who did the research, so i can read up on it and test out the difference. why invent the wheel aggain?
    Dear Tony,
    I see that you have alot of posts, so maybe you were in a bad mood.
    But when people ask questions, you should asume that they done all they could in their power or knowledge.
    Google gives alot of suggestions but not all of them help in peoples questions.
    It is up to people like yourself who volunteerd to join a community to guide them so they can improve. Saying stuff like go google it is like saying somebody whoa asks where he could watch whales to go to the ocean. But my ocean does not have whales, so that would not help someone from my town.
    Sorry if you had a bad day, sorry if I struck a nerve.
    But as we learned when we were young: “If you can’t say something nice . . . don’t say nothing at all.” - Thumper
    And to anwser the question:
    w3school has the basic on soap and rest
    I will have to learn web services first
    oreilly has some books on the subjects. guess i will go for the most popular ones.
    But the difference between (rest, soap) webservices and standard reports and forms i could not find. Will post when I find something.
    Raoul
    Suriname, Paramaribo

  • JSON.parse Response parse failed. I can not open files and JSON.parse Response parse failed. shows up it dosn't happen with I E browser

    JSON.parse Response parse failed.
    I can not open files. And JSON.parse Response parse failed. shows up.
    It doesn't happen when i use the I E browser, so I can't use firefox

    Hi
    I'm trying to make a movie from the JpegImagesToMovie class. But i get a null point exception :(
    java.lang.NullPointerException
         at com.sun.media.multiplexer.video.QuicktimeMux.writeVideoSampleDescription(QuicktimeMux.java:936)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeSTSD(QuicktimeMux.java:925)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeSTBL(QuicktimeMux.java:905)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeMINF(QuicktimeMux.java:806)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeMDIA(QuicktimeMux.java:727)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeTRAK(QuicktimeMux.java:644)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeMOOV(QuicktimeMux.java:582)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeFooter(QuicktimeMux.java:519)
         at com.sun.media.multiplexer.BasicMux.close(BasicMux.java:142)
         at com.sun.media.BasicMuxModule.doClose(BasicMuxModule.java:172)
         at com.sun.media.PlaybackEngine.doClose(PlaybackEngine.java:872)
         at com.sun.media.BasicController.close(BasicController.java:261)
         at com.sun.media.BasicPlayer.doClose(BasicPlayer.java:229)
         at com.sun.media.BasicController.close(BasicController.java:261)
         at movieclear.MovieManager.JpegImagesToMovie.controllerUpdate(JpegImagesToMovie.java:179)
         at com.sun.media.BasicController.dispatchEvent(BasicController.java:1254)
         at com.sun.media.SendEventQueue.processEvent(BasicController.java:1286)
         at com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:65)
         at com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)
    Please please help me out.. I'm totally stuck in this thing. A MOV file is created, but it's a 0kb file.
    Please help me out..
    Sootie.

  • Spry and JSON

    pleases Help!
    I am trying to get a basic example working using spry and
    JSON and i keep getting the following errors:
    Spry.Data.HTTPSourceDataSet has no properties
    Spry.Data.HTTPSourceDataSet has no properties
    I am trying to get my json data from a cfc like this
    var dsEmployees = new
    Spry.Data.JSONDataSet("./model/CS3/Employee.cfc?method=getAllEmployees",{path:"employeeLi st"});
    What am i doing wrong?
    Thank you

    Actually it is the first java file include...
    Below is my code
    dsp_MasterDetail.cfm
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry/">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    <script language="JavaScript"
    src="./SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script language="JavaScript"
    src="./SpryAssets/SpryEffects.js"
    type="text/javascript"></script>
    <script language="JavaScript"
    src="./SpryAssets/SpryJSONDataSet.js"
    type="text/javascript"></script>
    <script language="JavaScript" type="text/javascript">
    <!--
    var dsEmployees = new
    Spry.Data.JSONDataSet("./model/CS3/Employee.cfc?method=getAllEmployees",{path:"employeeLi st"});
    //-->
    </script>
    <style type="text/css">
    <!--
    .selected {
    background-color: #0099FF;
    .hover {
    background-color: #FFFFCC;
    .even {
    background-color: #CCCCCC;
    .style1 {
    font-size: large;
    font-weight: bold;
    -->
    </style>
    </head>
    <body>
    <table border="1">
    <tr>
    <td>
    <div spry:region="dsEmployees">
    <div spry:state="loading">Loading employee data <br
    /><img src="ajax-loader.gif" /></div>
    <div spry:state="error">An error occured loading your
    dataset.</div>
    <div spry:state="ready" style="height:200px;
    width:200px;overflow:auto;">
    <table border="1" >
    <tr>
    <th spry:sort="FullName">Employee</th>
    </tr>
    <tr spry:repeat="dsEmployees" spry:setrow="dsEmployees"
    spry:hover="hover" spry:select="selected"
    onClick="MM_effectAppearFade('Detail_DIV', 1000, 0, 100,
    false)">
    <td>{FULLNAME}</td>
    </tr>
    </table>
    </div>
    </div>
    </td>
    <td valign="top">
    <div align="left" spry:region="dsEmployees"
    spry:state="ready"
    id="details"><strong>Details</strong><br
    /><hr align="left" width="75"/></div>
    <div id="Detail_DIV" spry:detailregion="dsEmployees">
    <table id="Detail_Table" border="0" width="50%">
    <tr>
    <th>NT_ID</th><td>{NT_ID}</td>
    </tr>
    <tr>
    <th>EMPLID</th><td>{EMPLID}</td>
    </tr>
    <tr>
    <th>EMAIL</th><td>{EMAIL}</td>
    </tr>
    <tr>
    <th>PHONE</th><td>{PHONE}</td>
    </tr>
    <tr>
    <th>DEPTID</th><td>{DEPTID}</td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    </table>
    </body>
    </html>
    Employee.cfc
    <cfcomponent displayName="employees" output="yes">
    <cffunction name="getAllEmployees" access="remote"
    output="yes">
    <cfset var allPersons = queryNew("FullName, NT_ID,
    EMPLID,EMAIL,PHONE,DEPTID") />
    <cfset var toXML = "" />
    <cfset var toJSON = "" />
    <cfset var xmlQuery = "" />
    <cfset var JSONQuery = "" />
    <cfquery name="allPersons" datasource="cams_dev"
    blockfactor="100">
    SET CONCAT_NULL_YIELDS_NULL Off;
    SELECT TOP 25 LAST_NAME + ', ' + FIRST_NAME AS FullName,
    NT_ID, EMPLID, EMAIL, PHONE, DEPTID
    FROM dbo.vwKscUsaPerson
    ORDER BY LAST_NAME, FIRST_NAME
    SET CONCAT_NULL_YIELDS_NULL On;
    </cfquery>
    <cfset JSONQuery =
    application.toJSON.queryToJSON(allPersons, "employees")>
    <cfsetting showdebugoutput="no">
    <cfoutput><cfcontent type="text/html"
    reset="true">#htmlcodeformat(JSONquery)#</cfoutput>
    </cffunction>
    </cfcomponent>
    this cfc returns this json code
    {"employees":[{"DEPTID":"014A420","EMAIL":"[email protected]","EMPLID":"025044","FULLNAME":"Aa dsen,
    Ronald","NT_ID":"USATX\AadsenRP","PHONE":"123
    456-7891"},{"DEPTID":"IDI-8011","EMAIL":"[email protected]","EMPLID":"KS997E7R","FULLNAME":"A aron,
    Earnestine","NT_ID":"KSCBOC\AARONED","PHONE":"123
    456-7891"},{"DEPTID":"IDI-KICS","EMAIL":"[email protected]","EMPLID":"KSANC4CD","FULLNAME":"A arts,
    Bryan","NT_ID":"ICDNET\AartsBR","PHONE":"123
    456-7891"},{"DEPTID":"0162230","EMAIL":"[email protected]","EMPLID":"011000","FULLNAME":"Abad ejos,
    Ernesto","NT_ID":"USATX\abadejea","PHONE":"123
    456-7891"},{"DEPTID":"0351480","EMAIL":"[email protected]","EMPLID":"004479","FULLNAME":"Abbe y,
    David","NT_ID":"USAFL\ABBEYDA","PHONE":"123 456-7891"}]}

  • HT2538 what do I do once it starts a single tone and rest again single tone and rests and repeats ?

    what do I do once it starts a single tone and rest again single tone and rests and repeats ?

    If you are still under warranty and/or have AppleCare, call them.

  • Json rpc and json rpc cpp integration

    hi frnds,
    I am new with json rpc and json rpc cpp, all i just need a way to talk to c++ code from my servlet/jsp without using jni, i got following link by searching on google but not able to implement it, so i am looking for json rpc with json rpc cpp
    http://www.ibm.com/developerworks/webservices/library/ws-xml-rpc/
    thanks in advance
    Irfan

    Anyone ?

Maybe you are looking for

  • How can people viewing my iWeb site print a whole slideshow?

    I have several pages of photos and captions on my iWeb site. Many of these are slideshows which are guides to repairing / modifying cars for enthusiasts. The page shows the operations in easy stages. People who use these want to print off all the pho

  • HOW TO UNLOCK MY ITOUCH IF I FORGOT MY PASSCODE

    i just found my itouch after having it been lost for about 3 years and i do not remeber my password so i hooked it up to itunes and they say they cant open it because there is a password on it. how can i get it unlocked????

  • What is my skype account username???

    Hello,  How can I find out what is my skype username? I created skype account with Hotmail.com, but skype doesn't allow me to create username and to choose my password. What I need to do?

  • Mac OSX install disc 1 won't work, it says "no bootable device" and a black screen

    My macbook came already with snow leopard, so I have the osx install disc and the applications install disc. So I'm meant to put in the osx (ie install disc 1) install disc which lets me install bootcamp, which I do, and click on "start the windows i

  • WARNING when running Sample Controllable CacheStore

    Hi, I am trying to run the Sample Controllable CacheStore1 with Coherence 3.4.1 on Linux. The sample may be found here [http://coherence.oracle.com/display/COH34UG/Sample+CacheStores] I configured two distributed cache schemes: the control cache uses