Need to auto-generate SDK for REST web service.

My company has developed a REST API for some web services, and we'd like to provide users with a Java SDK for consuming those services.
Our services are described by an XSD schema. On the backend, we are using JAXB to create Java classes corresponding to the schema. We create the request objects based on the parameters in the REST url, and JAXB converts our response objects from Java to XML.
We'd like to provide our users with similar Java classes on the client side. They should be able to create the object corresponding to the request, fill in various parameters, and submit it to our web service. The SDK should automatically convert the object into a REST URL, hit the URL with a Get, read the XML response, and convert that response into Java objects.
It seems like we should be able to auto-generate such an SDK based on our schema.
It seems like there are several tools for doing this for SOAP web services. For example, Apache Axis has Java2WSDL and WSDL2Java.
Can anyone recommend tools for creating client-side libraries for consuming RESTful web services? Does anyone have advice on products to avoid?

Replying to my own post here. The WADL2Java project on java.dev seems to be more like what I need. The only user-experience I've seen on the 'net is in this forum post:
http://forum.java.sun.com/thread.jspa?threadID=5239123&tstart=0
Anyone else used it?

Similar Messages

  • Book for REST web services

    Hi,
    Suggest me one good text book for learning RESTful webservices in java from the basic..

    here is a sample the service class handling REST stuff:
    myServices.factory('resService', [ '$resource',
        function($resource) {
            return $resource('http:/server:8080/objects/:objectID', {}, {
                query : {
                    method : 'GET',
                    params:{objectID:'objectID'},
                    isArray: true
                update: {
                    method : 'PUT',
                    params:{objectID:'@objectID'}
                delete:{
                    method:'DELETE',
                    params: {objectID:'@objectID'}
    I hope this will help!
    Best regards,
    Thomas.

  • Which is the best API for creating restful web services.

    Hi guys,
    I have tried a lot of apis to create a restful web service. But none of them has perfect documentation or examples. Which is the best one that has good support and future.

    "Best" automatically implies opinions and speculation; one I personally believe has a bright future is Jersey. Jersey is the reference implementation (RI) for [JSR-311|http://jcp.org/en/jsr/detail?id=311] ("The Java API for RESTful Web Services" or JAX-RS).

  • Using Eclipse 3.1 SDK to implement Web Services

    Hi
    I am using Eclipse3.1 as the SDK for developing Web Services from Java Classes, and I have created two Web Services: X and Y. I need to make X a client to Y; therefore, I have been searching the Internet on how I can implement this. I got many references; some of them uses JAX and others use "com.ibm.cowbell" and "com.ibm.ws packages", but so far I cannot make it. When I try to import "com.ibm.ws", I got an error that the name of the package cannot be resolved. If any one has a suggestion of best practice in this or telling me why I cannot import "com.ibm.cowbell", I will be really appreciating as this is very impotant for my MSc. Thesis.
    Best regards for all
    Sherif

    Kurt:
    It does look like a bug. I can offer the following workaround.
    Create a Manual Web reference as described here:
    http://download-west.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32471/advnc.htm#BABCBBHJ
    section "Creating a Web Service Manually"
    based on the WSDL below, you would enter the following for URL and Action:
    URL: http://xpvm.us.oracle.com:8888/orabpel/default/ItemGet/1.0
    Action: process
    Also, enter a name for an APEX collection to store the response, such as GET_ITEM_RESPONSE.
    For the SOAP Envelope, paste in the one that works from SOAPUI or use BPEL Control to get the envelope. Instead of static values for the parameters you use #ITEM_NAME# substitutions. So if the page generated by the wizard was on page 1, it would look something like:
    <inputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload"><get:Item xmlns:get="http://TargetNamespace.com/GetItemRequest">
    <get:SETID>#P1_SETID#</get:SETID>
    <get:ITEM_ID>#P1_ITEM_ID#</get:ITEM_ID>
    </get:Item>
    </part></inputVariable>
    (with the proper SOAP Envelope wrapper around it)
    Now go to page 1 (assuming that was the page created by the wizard) and remove the current process of type Web service on that page. Add a new process of type Web service, choose Manual, and choose the manual one you created above.
    Follow the instructions in the section titled "Displaying Web Service Results in a Report" at the link above to create a report on the result.
    There is also an advanced tutorial using Manual Web references you may wish to review:
    http://download-west.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32469/web_serv.htm#CHDEFEGH
    Hope that helps,
    Jason

  • Problem with RESTful web service

    I am running into a problem with Flex Web Services (REST) in trying to get the proper format returned. I can see that the HTTP header is set to
    Accept: */*;
    rather than
    Accept: application/xml
    when sending the request. The web service was generated via the web services HTTP data services wizard. I edited it to set the resultFormat to xml
        // Constructor
        public function _Super_UsersService()
            // initialize service control
            _serviceControl = new mx.rpc.http.HTTPMultiService();
             var operations:Array = new Array();
             var operation:mx.rpc.http.Operation;
             var argsArray:Array;
             operation = new mx.rpc.http.Operation(null, "getUsers");
             operation.url = "http://localhost:8888/users";
             operation.contentType = "";
             operation.method = "GET";
             operation.resultFormat = "xml";
             //operation.serializationFilter = serializer0;
             operation.properties = new Object();
             operation.properties["xPath"] = "/";
             operation.resultType = valueObjects.Users;
             operations.push(operation);
             _serviceControl.operationList = operations; 
             model_internal::initialize();
    How does one configure the accept header?

    Hi,
    I have posted a simple application with the RESTful reference:
    http://apex.oracle.com/pls/apex/f?p=13758
    I can give you full privileges on this so you can look at the WEB service reference. Shall I send to you separately for login user?
    It is using the RESTful service: http://apex.oracle.com/pls/apex/nd_pat_miller/demo/employee/{deptno}
    This RESTful service tests fine when I test from within the RESTful web service module of the Workspace.
    I based this on the Video demo tutorial for RESTful web service that Oracle published for 4.2 release. The video seemed to exclude the {deptno} in the URL but when I try that, it doesn't work either.
    This is the error I am getting when I run this on my Apex environment: (it, of course, will not run the web service in the apex.oracle.com environment)
    class="statusMessage">Bad Request</span>                                         
    </h3>                                         
    </div>                                         
    </div>                                         
    <div id="xWhiteContentContainer" class="xContentWide">                                         
    <div class="xWhiteContent">                                         
    <div class="errorPage">                                         
    <p>                                         
    <ul class="reasons"><li class="badRequestReason"><span class="target" style="display:none;">uri</span><span class="reason">Request path contains unbound parameters: deptno</span></li>                                    
    </ul>Thanks,
    Pat
    Edited by: patfmnd on May 8, 2013 3:33 AM

  • ADF Mobile - Securing REST Web Services

    Hi,
    I've developed some REST web services for my ADF Mobile app to use. They work fine but I'm having trouble securing them. According to the developer guide:
    http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/amxwebservices.htm#CHDGFCGD
    10.5.2 How to Enable Access to REST-Based Web Services
    Since only one security policy is supported for REST-based web services, ADF Mobile automatically adds oracle/wss_http_token_over_ssl_client_policy for REST web service over HTTPS, or oracle/wss_http_token_client_policy for REST web service over HTTP protocol to enable Oracle Web Services Manager (OWSM) Lite Mobile ADF Application Agent to inject a proper security header.
    ..so I'm trying to attach the policy oracle/wss_http_token_service_policy to the web service, but deploying it to Weblogic results in the below stack trace.
    I'm trying to attach the policy in JDeveloper by selecting the service class in the java structure pane, then in the Property Inspector, using the "Web Services extension" section to select the policy.
    I'm guessing I've missed a step, but can't find what. Or I'm doing completely the wrong thing. Either way, any help in resolving would be very much appreciated.
    Rich.
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "CDRestServicePort" failed to preload on startup in Web application: "RestServices".
    javax.xml.rpc.JAXRPCException: oracle.wsm.common.sdk.WSMException: WSM-07508 : Oracle WSM Agent initialization failed due to PolicySet validation errors: WSM-07617 Policy: oracle/wss_http_token_service_policy contains unsupported assertions. 
    , with PolicySet=PolicySet [timestamp=Mon Oct 21 13:53:23 BST 2013, subjectPattern=ResourcePattern [pattern=/DefaultDomain/DefaultServer/SOAPServices/WEBs/RestServices.war/WLSWEBSERVICEs/CDRestServiceService/PORTs/CDRestServicePort, subjectType=WLS_SERVICE, terms={PORT=CDRestServicePort, IMPLEMENTATION=WEB, SUBJECT_TYPE=WLS_SERVICE, SERVICE=CDRestServiceService, MODULE=RestServices.war, APPLICATION=SOAPServices, DOMAIN=DefaultDomain, SERVER=DefaultServer}], domainExpression=http://restws.westbourne/#wsdl.endpoint(CDRestServiceService/CDRestServicePort), polmap={oracle/wss_http_token_service_policy={Policy[wsp:http://schemas.xmlsoap.org/ws/2004/09/policy][oralgp:http://schemas.oracle.com/ws/2006/01/loggingpolicy][local-optimization:off][provides:{http://docs.oasis-open.org/ns/opencsa/sca/200903}authentication, {http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication, {http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication.transport][status:enabled][xmlns:http://schemas.xmlsoap.org/ws/2004/09/policy][wsu:http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd][Id:wss_http_token_service_policy][displayName:i18n:oracle.wsm.resources.policydescription.PolicyDescriptionBundle_oracle/wss_http_token_service_policy_PolyDispNameKey][orawsp:http://schemas.oracle.com/ws/2006/01/policy][orasp:http://schemas.oracle.com/ws/2006/01/securitypolicy][description:i18n:oracle.wsm.resources.policydescription.PolicyDescriptionBundle_oracle/wss_http_token_service_policy_PolyDescKey][attachTo:binding.server][Name:oracle/wss_http_token_service_policy][xsi:http://www.w3.org/2001/XMLSchema-instance][category:security][{LogAssertion[Logging][{AssertionBindings[{Config[name:Log Message1_properties][{PropertySet[name:standard-security-properties][{Property[type:string][contentType:optional][name:reference.priority]}]}]}]}][{MessageLog[ Request = all][ Response =all]}]}][{HttpSecurityScenario[http-security][Silent:true][name:Http Security][Enforced:true][category:security/authentication][{AssertionBindings[{Config[name:HttpConfig][configType:declarative][{PropertySet[name:standard-security-properties][{Property[type:string][contentType:constant][name:realm][Value:owsm]}][{Property[type:string][contentType:constant][name:role][Value:ultimateReceiver]}][{Property[type:string][contentType:optional][name:reference.priority]}]}]}]}]}][{LogAssertion[Logging][{AssertionBindings[{Config[name:Log Message2_properties][{PropertySet[name:standard-security-properties][{Property[type:string][contentType:optional][name:reference.priority]}]}]}]}][{MessageLog[ Request = all][ Response =all]}]}]}}}, constraintedDataMap={ConstraintGroup [terms=[], size=0, weight=0]=ConstraintedData [status=FAILURE, localoptimization=null, validationErrors=[Error Code:WSM-07617 Error Context:Policy], overrides=[], polRefs=[PolicyReference [policyURI=oracle/wss_http_token_service_policy, polRefQName={http://schemas.xmlsoap.org/ws/2004/09/policy}PolicyReference, version=-1, attributes={{http://schemas.oracle.com/ws/2006/01/policy}status=enabled, {http://schemas.oracle.com/ws/2006/01/policy}category=security}, overrideProps=null]]]}, locked=true]
      at oracle.wsm.agent.handler.wls.WSMAgentHook.handleException(WSMAgentHook.java:462)
      at oracle.wsm.agent.handler.wls.WSMAgentHook.init(WSMAgentHook.java:274)
      at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory.newHandler(TubeFactory.java:108)
      at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory.createServer(TubeFactory.java:81)
      at weblogic.wsee.jaxws.WLSTubelineAssemblerFactory$TubelineAssemblerImpl.createServer(WLSTubelineAssemblerFactory.java:216)
      at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:213)
      at weblogic.wsee.jaxws.WLSContainer$WLSEndpointFactory$WLSEndpointImpl.<init>(WLSContainer.java:623)

    Hi,
    so have you "Oracle Web Services Manager (OWSM) Lite Mobile ADF Application Agent" installed? Sounds this is a pre-requisite for this work
    Frank

  • Java - rest web services question.

    Hi all,
    I am new to SOAP and Rest based web services.
    In my current standalone application, the request and response payload of a query are in the form of a xml document. This application needs to be accessed by several applications that are written in diffrent programming languages(.net, python etc).
    Thus I want my application to be exposed as a web service. Some web services need to be SOAP based and others need not be.
    I understand that I need to follow the below steps to make Rest based web service :
    1a) I would expose my application interface description and business methods as URIs in a html/xml document.
    1b) If client wants to retrieve data, how will he programatically access the associated URI and set the method parameters (if any)?
    Also how does he send the request back to my application and how will my application understand it?
    1d) Can the code to understand the client request be written in any programming language since Rest does not restrict usage of specific tools.
    1f) It looks like the key feature of Rest is to have URIs in the reponse payload xml.
    Is this always required? In other words, can the reponse xml be one long xml without URIs to the embedded resources?
    Please let me know if Java has any API/tutorials to support the above requirements.
    Your input is highly appreciated.
    Thanks in advance for your valuable time and interest.

    You will be interested in JSR 311 JAX-RS: The JavaTM API for RESTful Web Services. This JSR is in the very early stages. The SWDP (Sun Web Developers Pack) 1.0 contains a very preliminary implementation of RESTBeans which is the basis for this JSR. Download the SWDP and look at the docs/samples in the rest-impl directory. http://developers.sun.com/web/swdp/. Here is a link to some docs on the REST APIs http://developers.sun.com/docs/web/swdp/r1/rest-impl/docs/getting-started.html

  • How to schedule Webi Documents with Prompts with RESTful Web Services

    Hello,
    I am trying to schedule Webi Documents with Prompts using RESTful Web Services with prompts. I am using Simple Rest Client app provided by Google Chrome. We have Business Objects SP6 Patch 1.
    However the documentation for RESTful Web Services has only examples for the following
    1. Schedule Documents without any Prompts to various destinations and recurrences.
    2. Refresh Documents with Prompts.
    Is there any example for scheduling documents with prompts? Please advise
    Thanks in advance

    Hi Peter,
    With Rest Client, on BI4.0 SP6, you can schedule Webi documents with prompts using the following:
    URL: http://<servername>:6405/biprws/raylight/v1/documents/<docid>/schedules
    Method:POST
    Request Body:
    <schedule>
    <name>Enter values for City:</name>
    <format type="webi"/>
    <destination>
    <inbox/>
    </destination>
    <once retriesAllowed="2" retryIntervalInSeconds="60">
    <startdate>2013-08-26T15:58:51.000+02:00</startdate>
    <enddate>2013-08-27T15:58:51.000+02:00</enddate>
    </once>
    <parameters>
    <parameter optional="false" type="prompt" dpId="DP0">
    <id>0</id>
    <technicalName>Enter values for City:</technicalName>
    <answer constrained="false" type="Text">
    <values>
    <value>Austin</value>
    </values>
    </answer>
    </parameter>
    </parameters>
    </schedule>
    Using the above request you can schedule the Webi document with prompts to inbox destination  and set for once.
    The schedule can be sent in different formats to several destinations and set just for once, daily,
    hourly or monthly.
    You can also check the example for this on page 275 of SAP Webi RESTful SDK user guide for BI4.0 SP6 below:
    http://help.sap.com/businessobject/product_guides/boexir4/en/xi4sp6_webi_restful_ws_en.pdf
    Regards,
    Swati
    Message was edited by: Swati Ikhe

  • Problem getting RESTful web service reference working with header value

    Hi,
    I posted this on Apex Listener forum but since I am not sure problem is with my Application RESTful web service reference or a Listener issue, I am posting here as well:
    I am on Apex 4.2.2 and Listener 2.1 and the listener is on WEblogic.
    I succeeded to get a RESTful web service working in an application with no header to obtain a full set of data. The data set is very large, so I am now just trying to set up a web service to get a set of data based on a student ID.
    I followed the examples shown in the RESTful web service module of SQL Workshop and set up a handler of this type:
    https://ourweblogicserver/apex/bnr/ace/students/course_grades/{stid}
    The test for this handler succeeded both for JSON output and CSV output in the Workshop test environment.
    However, when I try it from a Web Service Reference that I created for my application following what looked like the same approach used on the example video, I get NO data back. If I put a 'stid' directly into a URL of a web browser and do the basic authentication I get the data!!
    This is what I have for the Web service reference:
    https://ourweblogicserver/apex/bnr/ace/students/course_grades/{stid}
    Basic auth set to Yes -- and this is working -- I am able to authenticate
    HTTP method Get
    output format Text
    no response Xpath
    no response namespace
    defaults for new record and parameter delimiter
    NO REST input parameters
    Output set for all the fields in the data set queried (same set of data as in my rest service which does not have any http header)
    REST HTTP Header : Name stid
    I there something I am missing. I am not sure how to troubleshoot this further.
    I also tried exactly following the example shown on the Oracle Video for RESTFul web services at
    http://www.youtube.com/watch?v=gkCvd6P8_OU
    and I can't get the 2nd example to work either-- where the header has the bind variable parameter.
    Pat

    I was able to resolve the problem -- in the latest version of the RESTful web service that I created, I had left out the creation of the Header Parameter bind variable. Once I did that everything works fine!! I was able to test in the application and got the record of an individual student.
    Thanks,
    PM

  • Problem with RESTful web service with header value

    Hi,
    I am on Apex 4.2.2 and Listener 2.1 and the listener is on WEblogic.
    I succeeded to get a RESTful web service working in an application with no header to obtain a full set of data. The data set is very large, so I am now just trying to set up a web service to get a set of data based on a student ID.
    I followed the examples shown in the RESTful web service module of SQL Workshop and set up a handler of this type:
    https://ourweblogicserver/apex/bnr/ace/students/course_grades/{stid}
    The test for this handler succeeded both for JSON output and CSV output in the Workshop test environment.
    However, when I try it from a Web Service Reference that I created for my application following what looked like the same approach used on the example video, I get NO data back. If I put a 'stid' directly into a URL of a web browser and do the basic authentication I get the data!!
    This is what I have for the Web service reference:
    https://ourweblogicserver/apex/bnr/ace/students/course_grades/{stid}
    Basic auth set to Yes -- and this is working -- I am able to authenticate
    HTTP method Get
    output format Text
    no response Xpath
    no response namespace
    defaults for new record and parameter delimiter
    NO REST input parameters
    Output set for all the fields in the data set queried (same set of data as in my rest service which does not have any http header)
    REST HTTP Header : Name stid
    I there something I am missing. I am not sure how to troubleshoot this further.
    Pat

    Hi,
    I have posted a simple application with the RESTful reference:
    http://apex.oracle.com/pls/apex/f?p=13758
    I can give you full privileges on this so you can look at the WEB service reference. Shall I send to you separately for login user?
    It is using the RESTful service: http://apex.oracle.com/pls/apex/nd_pat_miller/demo/employee/{deptno}
    This RESTful service tests fine when I test from within the RESTful web service module of the Workspace.
    I based this on the Video demo tutorial for RESTful web service that Oracle published for 4.2 release. The video seemed to exclude the {deptno} in the URL but when I try that, it doesn't work either.
    This is the error I am getting when I run this on my Apex environment: (it, of course, will not run the web service in the apex.oracle.com environment)
    class="statusMessage">Bad Request</span>                                         
    </h3>                                         
    </div>                                         
    </div>                                         
    <div id="xWhiteContentContainer" class="xContentWide">                                         
    <div class="xWhiteContent">                                         
    <div class="errorPage">                                         
    <p>                                         
    <ul class="reasons"><li class="badRequestReason"><span class="target" style="display:none;">uri</span><span class="reason">Request path contains unbound parameters: deptno</span></li>                                    
    </ul>Thanks,
    Pat
    Edited by: patfmnd on May 8, 2013 3:33 AM

  • Report Bursting with RESTful Web Services SDK

    Hi,
    We are looking to upgrade to BI 4.x from BI 3.1.  We are not sure whether RESTful Web Services SDK is the way to go.  We have a requirement where we need to be able to refresh a report, save the whole report content to a specified forma for a team lead/manager, and then section/burst each report to separate files that each is corresponding to the individual employee.  In other words, for example, we have a team constent of 1 manager and 4 employees.  We want to save one report for the manager with all the content from the 4 employees, and then 4 individual reports that each belong to each employee.  We current have a macro code that does this in BI 31 refreshing Deski reports.  We want to upgrade to BI 4.X, but the Deski and macro are no longer supported.  The macro in BI 3.1 we used to control when to refresh, where to save the reports and update our external datasource that the reports finished refreshing and available for view.  We want to keep the same functionality so that it is not a whole redesign of the system when the upgrade happens.  Thank you so much for your help.  Any sample code, tips and guides are helpful.  I am looking to prototype first before I can confirm this will work when upgrading.  I have a code snippet in macro (VBA) from BI 3.1 in the attached file for reference if you know of the equivalent.

    Hi Raghunath,
    Looking at your macro, most of the functionality would be available with REST SDK. With BI 4.x REST is now only SDK which provides APIs to work with webi report. With .NET or Java SDK we could not eeven schedule a webi doc with prompts.
    With BI 4.1 REST APIs include.
    refresh report, schedule report, save report, export which is done by your macro.
    For detailed tasks, such as saving and modifying the report for specific users and send to schedule, you would need to play around with REST Urls to understand the workflow.
    For starters take a look at the devleopers guide for REST here:
    http://help.sap.com/businessobject/product_guides/sbo41/en/sbo41_webi_restful_ws_en.pdf
    Here is the doc which compares the availability of SDK APIs with different BI versions.
    http://scn.sap.com/docs/DOC-53285
    For any Enterprise level tasks, you could always use .NET or Java enterprise SDk and comibe it with your REST app.
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place

  • How to update the Query of an existing WEBI document's dataprovider, through the RESTful Web service SDK.

    Hi,
    I am trying to update the Query of an existing WEBI document's dataprovider, through the RESTful Web service SDK.
    For this, first i will get the Dataprovider information,
    Example:
    URI: http://localhost:6405/biprws/raylight/v1/documents/11111/dataproviders/DP0
    Expected result;
    <dataprovider>
         <id>DP0</id>
         <name>Query 1</name>
         <dataSourceId>1234</dataSourceId>
         <updated>2014-04-18T11:55:21.000-08:00</updated>
         <duration>1</duration>
         <isPartial>false</isPartial>
         <rowCount>113</rowCount>
         <flowCount>11</flowCount>
         <dictionary>
              <expression qualification="Dimension" dataType="String">
                   <id>DP0.DO1</id>
                    <name>EmpID</name>
                   <description>Employee ID.</description>
                    <dataSourceObjectId>DS0.DO1</dataSourceObjectId>
              </expression>
              <expression qualification="Dimension" dataType="String">
                   <id>DP0.DO2</id>
                   <name>EmpName</name>
                   <description>Employee Name.</description>
                   <dataSourceObjectId>DS0.DO2</dataSourceObjectId>
              </expression>
         </dictionary>
         <query>SELECT Employee.EmpID, Employee.EmpName FROM Employee</query>
    </dataprovider>
    Then Changing the above dataprovider's Query to some thing like below,
    <query>SELECT Employee.EmpID, Employee.EmpName FROM Employee where Upper(Employee.EmpName)='RAJ'</query>
    Please let me know the RESTful Call required to do this.
    Thanks in advance.
    Thanks,
    Mahendra.

    FYI, the output of this call returns something like:
    <?xml version="1.0" encoding="UTF-8"?> 
    <queryplan>
        <union>
            <fullOuterJoin>
                <statement index="1">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
                <statement index="2">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.nb_guests) FROM SALES, INVOICE_LINE, SERVICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) AND ( SERVICE.SL_ID=SERVICE_LINE.SL_ID ) AND ( SERVICE_LINE.service_line = 'Accommodation' ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
            </fullOuterJoin>
            <fullOuterJoin>
                <statement index="3">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
                <statement index="4">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.days * INVOICE_LINE.nb_guests * SERVICE.price) FROM SALES, INVOICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
            </fullOuterJoin>
        </union>
    </queryplan>

  • Creating RESTful Web Service for BLOB retrieval

    Hi,
    Just got RESTful web services working in Apex 4.2.1 with new Listener 2.1.
    I have now been asked to create a RESTful web service by which photos in BLOB column can be retrieved upon providing the ID for that photo. Can this be done using the Creating RESTful Service Module of Apex 4.2.1? Looking at the Apex 4.2 documentation, I would assume this can be done, but has anyone used this with BLOB data?
    Thanks,
    Pat

    Hi Pat,
    Yes this can be done using RESTful Services - you just need to ensure the query used is in the required format. To obtain a BLOB for a given ID, you would need create a Resource template and handler with the following settings:
    Resource Template Settings:
    URI template: emppic/{id}
    Resource Handler Settings:
    Source query: select mimetype, product_image from demo_product_info where product_id = :id..where the format of the SQL query is SELECT 'content_type', blob_column FROM . . ., as mentioned in Rick Greenwald's Cloud White paper "RESTful Web Services for the Oracle Database Cloud", under the "SQL Source Type" section (see www.oracle.com/technetwork/database/database-cloud/public/restful-wp-1844130.pdf ):
    where 'content_type' is a string passed to the browser to be used to identify the incoming data, and the column to identify the source of the data being sent back. This data is sent back untouched by the Oracle Database Cloud Service. The Media Resource Source Type is typically used for media objects, such as images, where the data will be directly handled by the recipient making the call.The MIMETYPE column in the sample query above holds the necessary setting for the 'content_type' i.e. 'image/jpeg'. The value of ID is then passed in as a parameter when calling the service e.g. emppic/1234. The item level help text would be more helpful if it included additional information, and this is something we intend on addressing in a future release.
    I hope this example helps.
    Regards,
    Hilary

  • Auto generate index for FK

    Where is option like 'auto generate index for FK' in DataModeler 4.0.3?

    You need to right-click on the Browser node for the Design and select Properties.
    In the Design Properties dialog you will find the Automatic Index Generation option for FKs on the Settings > DDL page.
    David

  • Is it possible to add a user using the RESTful Web Services SDK

    Others have asked before about user management features in the RESTful Web Services SDK.  However I can find no answers or links which provide an answer to the question 'Is it possible to add a user using the BI 4.1 SP2 RESTful Web Services SDK'?
    Any help would be appreciated.
    Regards,
    Steve

    Hi Steve
    Unfortunately, not possible. The BI RESTful can only get "stuff" that is already there. I suppose this would fall under some sort of "Object Creation" API and that is not there. Yet. Rumors abound, but nothing firm. Just as a BTW.; the Business Intelligence platform RESTful Web Service Developer Guide 4.1 is here:
    http://help.sap.com/businessobject/product_guides/sbo41/en/sbo41_bip_rest_ws_en.pdf
    SAP Web Intelligence RESTful web service SDK User Guide, SAP BusinessObjects Business Intelligence platform 4.1
    SAP Crystal Reports RESTful web services - SAP Crystal Reports RESTful web services
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

Maybe you are looking for

  • Simultaneous Bands Question

    Does this mean that with the simultaneous bands, b/g devices won't bring down the speed of the N network? One of the biggest problems with the Time Capsule has been that to really have it work as a backup device, I have to also create a separate G ne

  • Preferred Language per Contact

    I'm quite a fan of iOS. However, as a European Citizen I'm quite used to communicate with different people in different languages. However I generally use the same language with the same person over and over. When writing emails or iMessages, I have

  • Tomcat connection refused from localhost

    I have Tomcat 5.5.7 installed as a stand-alone server on my local machine. I have installed Java jre 1.5.0 (5.0). The OS is Windows 2000 SP3. The install went without incident. I set system variables JAVA_HOME, CATALINA_HOME, TOMCAT_HOME. When I try

  • Error Message for Date Format

    Hi Friends, Could you guys help me with sample code in java script to throw error message if the user enter the wrong date format( my requirements of date format like yyyymmdd)in BSP. Regards CSM Reddy

  • Not being Successful..Please help..

    Off late , I've been hardly trying to compile my JSTL code.. I have used JRUN 4.0 Web S/v and i am facing this error.. 500 The path http:/java.sun.com/jsp/jstl/core does not start with '/' then i tried using Tomcat 5.0.16 viz my normal server for dev