Exec procedure as parsing schema, not APEX_PUBLIC_USER

We have a package with a procedure:
CREATE OR REPLACE PACKAGE XGN4.xgn_generator$pck
AUTHID DEFINER AS
PROCEDURE cr_tab(tab_id IN NUMBER);
END;
CREATE OR REPLACE PACKAGE BODY XGN4.xgn_generator$pck
PROCEDURE cr_tab(tab_id IN NUMBER)
IS
BEGIN
execute immediate('CREATE TABLE test(......)');
END;
END;
When I call this procedure from apex, it's always executed as 'APEX_PUBLIC_USER', but it should be as the parsing schema 'XGN4'.
I thought 'AUTHID DEFINER' should do the trick (it's standard when you're not using AUTHID), but it looks like it has no effect on APEX...
Anyone?

Ok Scott, you are right.
I used sys_context('USERENV','CURRENT_USER') to identify the user and it's the right parsing schema (XGN4).
But why won't my code execute right in apex when it does straight from SQL-DEVELOPER (or another tool)?
Eg:
In toad: EXEC packagename.procedure(parameter);
in Apex: begin; packagename.procedure(parameter); end;
the procedure contains an execute immediate('alter tabel ...') and will do his job in the first case, but returns an error insufficient privs from apex.

Similar Messages

  • How to download a file from a table not in the parsing schema

    We have a table in another schema which holds files in a blob column. I can create a form on this table and the file upload works fine. The file browse page item has the source as the blob column and storage type "BLOB column specified in Item Source attribute". The download link generated for the page shows a call to apex_util.get_blob_file and the parameters are correct. However, when you click on the link you get a Page Not Found 404 error. Same error in Apex 4.1.1. The plsql error is:
    ORA-20544: Invalid table owner
    ORA-06512: at "APEX_040000.WWV_FLOW_DML", line 1628
    ORA-06512: at "APEX_040000.HTMLDB_UTIL", line 2244
    ORA-06512: at line 31
    Is there a way to use apex_util.get_blob_file to download a file when the table is in another schema?
    Rod West

    Hi,
    I am not sure that the post explains everything as the "Automatic Row Processing" and "Automatic Row Fetch" process work fine on this page and therefore security should not be an issue.
    Thanks for the view suggestion, but I am not sure that a view is a good option for us because the parsing schema does not have create view privilege and therefore the view would be difficult to install and maintain. We will problably end up with a custom download file process.
    Rod West

  • Random Bingads WSDL errors: Parsing WSDL: Couldn't load from...failed to load external entity, Could not connect to host, Parsing Schema: can't import schema from

    Hi,
    I am developing a web tool that accesses client's Bingads accounts via OAUTH2 granting. I am downloading data from clients daily.
    Generally it worked, but for 2 days I am experiencing a weird issue, that in random times (but more and more often though) I receive random error messages from Bing server. I am pasting below a few example from my logs (with timestamp and request/response).
    Must note that I launch these requests from the server where we have the webapp but also I launch it locally. The same is the result.
    The timestamp is in France time (GMT+1).
    Thanks ahead!
    Best regards,
    Steve
    2015-01-14 15:08:05: Service\BingAds::initService => SOAP-ERROR: Parsing Schema: can't import schema from 'https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V9/ReportingService.svc?xsd=xsd0'
    ---------Soap Request:--------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9"><SOAP-ENV:Header><ns1:CustomerAccountId>XXX</ns1:CustomerAccountId><ns1:CustomerId/><ns1:DeveloperToken>XXX</ns1:DeveloperToken><ns1:UserName/><ns1:Password/><ns1:AuthenticationToken>XXX</ns1:AuthenticationToken></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetDetailedBulkDownloadStatusRequest><ns1:RequestId>108277125</ns1:RequestId></ns1:GetDetailedBulkDownloadStatusRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ---------Response:------------------------------------------------
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId xmlns:h="https://bingads.microsoft.com/CampaignManagement/v9">XXXXX</h:TrackingId></s:Header><s:Body><GetDetailedBulkDownloadStatusResponse
    xmlns="https://bingads.microsoft.com/CampaignManagement/v9"><Errors i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/><ForwardCompatibilityMap xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic"
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/><PercentComplete>100</PercentComplete><RequestStatus>Completed</RequestStatus><ResultFileUrl>https://download.api.bingads.microsoft.com/ReportDownload/Download.aspx?q=XXX</ResultFileUrl></GetDetailedBulkDownloadStatusResponse></s:Body></s:Envelope>
    2015-01-15 05:41:39: Service\BingAds::getCampaigns => SoapFault: Could not connect to host
    ---------Soap Request:--------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9"><SOAP-ENV:Header><ns1:CustomerAccountId>XXX</ns1:CustomerAccountId><ns1:CustomerId/><ns1:DeveloperToken>XXX</ns1:DeveloperToken><ns1:UserName/><ns1:Password/><ns1:AuthenticationToken>XXX</ns1:AuthenticationToken></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>XXX</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ---------Response:------------------------------------------------
    (empty response logged)
    2015-01-15 05:45:00: Service\BingAds::initService => SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl' : failed to load external entity "https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl"
    2015-01-15 11:58:46: Service\BingAds::getCampaigns =>
    ---------Soap Fault:--------------------------------------------
    SoapFault catched:
    Could not connect to host
    ---------Soap Request:--------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9"><SOAP-ENV:Header><ns1:CustomerAccountId>XXXX</ns1:CustomerAccountId><ns1:CustomerId/><ns1:DeveloperToken>XXXX</ns1:DeveloperToken><ns1:UserName/><ns1:Password/><ns1:AuthenticationToken>XXX</ns1:AuthenticationToken></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>XXXX</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ---------Response:------------------------------------------------
    (empty response logged)
    2015-01-15 11:59:50: Service\BingAds::initService =>
    ---------Soap Fault:--------------------------------------------
    SoapFault catched:
    SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl' : failed to load external entity "https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl"
    ---------Soap Request:--------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9"><SOAP-ENV:Header><ns1:CustomerAccountId>XXX</ns1:CustomerAccountId><ns1:CustomerId/><ns1:DeveloperToken>XXXXX</ns1:DeveloperToken><ns1:UserName/><ns1:Password/><ns1:AuthenticationToken>XXXX</ns1:AuthenticationToken></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>XXX</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ---------Response:------------------------------------------------
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId xmlns:h="https://bingads.microsoft.com/CampaignManagement/v9">XXXXX</h:TrackingId></s:Header><s:Body><GetCampaignsByAccountIdResponse
    xmlns="https://bingads.microsoft.com/CampaignManagement/v9"><Campaigns xmlns:i="http://www.w3.org/2001/XMLSchema-instance"></Campaign>........</Campaigns></GetCampaignsByAccountIdResponse></s:Body></s:Envelope>
    2015-01-15 12:05:55: Service\BingAds::getCampaigns =>
    ---------Soap Fault:--------------------------------------------
    SoapFault catched:
    Could not connect to host
    ---------Soap Request:--------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9"><SOAP-ENV:Header><ns1:CustomerAccountId>XXXXX</ns1:CustomerAccountId><ns1:CustomerId/><ns1:DeveloperToken>XXXXX</ns1:DeveloperToken><ns1:UserName/><ns1:Password/><ns1:AuthenticationToken>XXXXXX</ns1:AuthenticationToken></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>XXXXX</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ---------Response:------------------------------------------------
    (empty response logged)

    Hi,
    1. I am using the older version of the PHP library provided by Bing (updated on 1/20/2014), so that is doing the WSDL loadings. I initialize the proxy calling OpticoBingAdsClientProxy providing what it needs, and then do the requests.
    2. I have a cron that reads data from client's accounts. I make several calls, like get search query report, get keyword performance report, get keyword bulk data. As the script progressed the first 2 worked and the third gave error. Or in other cases the
    first request failed. The calls have quite some time in between them since I process data (sometimes even 160 seconds)
    3. I did not change the code ion terms of requests, since as I said I use the PHP library (same credentials, ...).
    As of today (2015-01-16 10:30 GMT + 2) running my script, still have the same issues.
    Thank you!
    Steve

  • Schema not available as a Parsing Schema

    Hello,
    I have apex running on an existing Oracle instance pointing to a specific schema. I created a new schema in this same instance and I want to repoint my apex app to this schema. The schema is not available under Edit Application Properties -> Security -> Database Schema -> Parsing Schema. When I try and hardcode the schema name, I get this error:
    "No privilege to build in schema Use the list of values on the previous page to select a schema that you have privilege to build in."
    Is there a grant or something I am missing to make my new schema available from this list? I am running apex 4.2, oracle 11g.
    Thanks in advance,
    John

    You have to add the schema to the workspace from the administration UI

  • HOW TO have LOV display values from a table not contained in parsing schema

    I am using DAD to log in and have been able to get around the problems associated with the login schema being different than the parsing schema. However, I want to have a list of values to be shown to the user based on a table in the DAD schema that they log into rather than the parsing schema.
    Anyone know how this might be done?

    GOT IT:
    RETURN 'select xxxxxxx' does it

  • Grants needed for form on procedure in other schema

    Hi,
    I'm running Apex 4.1.0.00.32 and want to create a form on a procedure in a package.
    My package is not in the parsing schema.
    The wizard lets me select the schema of the package ("procedure owner") and lists package.procedure in the list.
    When I click next I get
    Error User APEXDEV has no privileges on the RIS schema.
    Contact your application administrator.
    A strange thing here is that APEXDEV is the Apex user I'm logged in as in Apex. There is no schema called that...
    RIS is the schema owning the package, so that's correct.
    I have granted execute on the package to APEXRUN (the parsing schema of the workspace).
    I tried to granet execute to both APEX_PUBLIC_USER and PUBLIC but got the same error.
    A public synonym had no effect either.
    Does anyone know what grants are needed?
    Kind regards
    Tomas

    Well, OOW is over by now...

  • Java Stored Procedure SAXParser XML Schema Validation

    Using Oracle XML Developers Kit 10.2.0.2.0 - Production.
    Attempting to validate using XML Schema in a Java stored procedure with the code:
                   if ( schemaDoc == null )
                        // Obtain default connection
                        Connection conn = new OracleDriver().defaultConnection();
                        OraclePreparedStatement stmt = (OraclePreparedStatement) conn.prepareStatement("SELECT XmlDocObj FROM XmlDoc WHERE XmlDocNbr = 2");
                        OracleResultSet rset = (OracleResultSet)stmt.executeQuery();
                        if ( rset.next() )
                             // get the XMLType
                             XMLType schemaXml = (XMLType)rset.getObject(1);
                             XSDBuilder builder = new XSDBuilder();
                             XMLSchema schemaDoc = (XMLSchema)builder.build(new InputSource(schemaXml.getInputStream()));
                   if ( inst == null )
                        inst = new ValidateCoreRequest();
                   ErrorHandlerImpl handler = inst.getNewErrorHandler();
    SAXParser saxParser = new SAXParser();
    saxParser.setXMLSchema(schemaDoc);
    saxParser.setValidationMode(XMLParser.SCHEMA_VALIDATION);
    saxParser.setErrorHandler(handler);
    saxParser.parse(new InputSource(new StringReader(docStr)));
    if( handler.validationError )
                        errorMsg[0] = handler.saxParseException.getMessage().substring(0, Math.min(199, handler.saxParseException.getMessage().length()));
    Never reports validation errors in the XML. Although the XDK Programmers Guide states "...you can use
    the oracle.xml.parser.schema.XSDBuilder class to build an XML schema and
    then configure the parser to use it by invoking the XMLParser.setXMLSchema()
    method. In this case, the XML parser automatically sets the validation mode to
    SCHEMA_STRICT_VALIDATION and ignores the schemaLocation and
    noNamespaceSchemaLocation attributes." No validation seems to occur. I have tried to set an xsi:noNamespaceSchemaLocation attribute on the root XML node, but this results in URL errors if the URL is not valid or schema build errors if the URL is valid, but does not point to a real location.
    It appears that without a schema location attribute, no schema validation occurs. Using setXMLSchema() with a database source does not seem to cause the schema location attributes to be ignored. At least for Java stored procedures.
    Does XML Schema validation work in the database for externally referenced schemas?
    Thank You,
    Art

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jan Vissers ([email protected]):
    I have two schemas A and B. A contains a java stored procedure which calls a java stored procedure stored in B. Upon resolving the "A" Java Stored Procedures I get the following error:
    ORA-29545: badly formed class: at offset 3093 of Adapter.TFADPBeschikbaarheid.sendAanvraag expecting a class-oracle.xml.parser.v2.XMLDocument but encountered a class-oracle.xml.parser.v2.XMLDocument.
    ... Question:
    it is expecting something which it has in fact encountered... SO!!!! What is the error.
    Thx,
    Jan<HR></BLOCKQUOTE>
    Try this:
    Edit your XSU installation script located on lib directory of Oracle XSU's distribution:
    Find the line:
    loadjava -r -v -u $USER_PASSWORD xmlparserv2.jar
    Replace by:
    loadjava -r -v -g public -u $USER_PASSWORD xmlparserv2.jar
    And installs your Oracle XSU again.
    Best regards, Marcelo.

  • Calling PL/SQL Procedure In Another Schema Gives Unexpected Result

    I have a SQL Script that does this:
    conn pnr/<password for user pnr>;
    set serveroutput on;
    exec vms.disable_all_fk_constraints;
    SELECT owner, constraint_name, status FROM user_constraints WHERE constraint_type = 'R';
    and the disable_all_fk_constraints procedure that is owned by user 'vms' is defined as:
    create or replace
    procedure disable_all_fk_constraints is
    v_sql   VARCHAR2(4000);
    begin
    dbms_output.put_line('Disabling all referential integrity constraints.');
    for rec in (SELECT table_name, constraint_name FROM user_constraints WHERE constraint_type='R') loop
    dbms_output.put_line('Disabling constraint ' || rec.constraint_name || ' from ' || rec.table_name || '.');
    v_sql := 'ALTER TABLE ' || rec.table_name || ' DISABLE CONSTRAINT ' || rec.constraint_name;
    execute immediate(v_sql);
    end loop;
    end;
    When I run the SQL script, the call to vms.disable_all_fk_constraints disables the FK constrains in the 'vms' schema, whereas I wanted it to disable the FK constraints in the 'pnr' schema (the invoker of the procedure). I know that I could make this work by copying the disable_all_fk_constraints procedure to the 'pnr' schema and calling it as "+exec disable_all_fk_constraints;+" from within the SQL script but I want to avoid having to duplicate the PL/SQL procedure in each schema that uses it.
    What can I do?
    Thank you

    You have two issues to solve.
    First you need to write a packaged procedure that works with INVOKER rights. The default is DEFINER rights.
    The difference is excatly what you need. Usually the package has the rights from the schema where it is defined (=Definer rights). In your case schema VMS. Whereas you need the privileges from the user that calls the package (PNR).
    => Check out the documentation for INVOKER rights
    The second problem is that the view "user_constraints" will not give the results you expect when called from inside a procedure in another schema. An alternative could be to use the view DBA_CONSTRAINTS with a filter on the owner (where owner = 'PNR'). Not sure if there are other working possibilities. Well you could create a list of constraint names that you want to disable, instead of creating the list dynamically.
    And you could have another potential disaster creeping up upon you. If you run this thing, then at this moment you don't have any referential integrity anymore. You can't be sure that you can create the FKs again after this action. This is EXTREMLY DANGEROUS. I would never ever do this in any kind of production or test database. I would be very careful when I do it on a development database.

  • Priveleges to create procedures/functions in schemas

    Greetings,
    I have a default schema associated with my user account. Can permissions be given for my user account to create functions and procedures in another schema without giving that user priveleges to create in ANY schema.
    Our default schema for HTMLDB is not the schema associated with my user account. I want to be able to create my functions inside that schema, but our DBA's havent been able to find out how to give the privelege without opening up all schemas to that account.
    hope this made sense,
    Cliff Moon

    Okay Cliff, no problem.
    Now, Michael, I don't know of any prepared docs specifically about this but fwiw, I'll try to recap how it works.
    1. HTML DB uses a public account to create (or reclaim) a distinct database session to service each page request. The connection is configured with the modplsql DAD and the database user (schema) that owns the session is HTMLDB_PUBLIC_USER. (The exception to this is when you configure a DAD for basic authentication.)
    2. The public packages (like wwv_flow) and procedures (like f) invoked through each HTTP request are owned by schema FLOWS_xxxxxx. Packages like wwv_flow use definers rights. This means, among other things, that they can execute any other packages owned by the FLOWS_xxxxxx schema, including the highly privileged, non-public packages that execute user code.
    3. The more privileged non-public packages do all the real work of rendering pages and processing POSTed pages. During these phases, your application code is executed (your report region queries, your DML operations, your page processes, validations, condition evaluation, your API calls, everything). All of this code is "parsed as" the database user (schema) assigned to your application. (Only one schema is assigned to a given application, although the assigned schema can be changed using the builder whenever you like.) The HTML DB engine can execute all of your application code as the "parse as" schema because it has SYS privileges to do so.
    4. Any of your code that HTML DB executes dynamically runs with the security privileges of your application schema. These privileges must have been granted explicitly and not through roles. So if your report query does 'select * from emp' it's necessary for emp (or a synonym for it) to exist in your application schema and for that schema to have select privilege on emp.
    5. The SQL Workshop works the same way, except things happen there at a workspace level, not at an application level. A workspace has one or more database schemas mapped to it. This means only that a conscious decision has been made (by an admin) to allow each workspace to access specific schemas. The list of schemas mapped to a given workspace appears in LOVs in various places, such as the SQL Command Processor. Selecting a schema from this LOV allows you to perform operations in that schema. You can perform operations in any of the other mapped schemas by selecting them from the LOV in turn.
    Note: so far we've said nothing about who the authenticated user is using your application (or the SQL Workshop application), because it has absolutely no bearing on anything so far.
    6. HTML DB allows developers to specify a plan to be used by the engine at the start of every page request to perform the chores of authentication, initial session registration and session management. This plan is called an authentication scheme. HTML DB provides standard schemes that are used by most developers, but developers can also design and build custom authentication schemes over which developers have complete control.
    7. During the execution of the authentication scheme for a page view (show) or page processing (accept) request, it is common for the scheme to cause a branch/redirect to a login page if it determines that no valid session yet exists. The operation of the login page results in the user being challenged for credentials and for those credentials to be verified. If they check out, related housekeeping tasks are performed such as recording the session ID in a table and session cookie creation. And a token is established to be used to identify the authenticated user for the duration of the HTML DB session. This value is stored in APP_USER and can be queried by developer-owned code and HTML DB-owned code as required.
    8. The credentials verification step is where user accounts come into play. It doesn't matter to HTML DB whether your application uses custom tables, an LDAP directory, an SSO infrastructure, or database accounts to verify credentials -- the verification takes place, usually once per HTML DB session, and that's that. The authentication scheme determines the exact method used.
    9. One example of an application that uses its own custom tables to hold account information (usernames/passwords) is HTML DB itself. You get the first account created for you during product installation and then you create administrator and developer accounts as you create multiple workspaces for developers at the site. These accounts are just rows in tables, a username, a password, an email address, the ID of the workspace, basic stuff like that. They are not database user accounts (schemas). And with these accounts, you can authenticate to HTML DB and use the Builder, the SQL Workshop, and the administration functions. Just remember, the database knows nothing of these accounts (they are like Oracle Applications user accounts).
    10. These HTML DB user accounts exist primarily to allow developers to use HTML DB. But they can also be used to allow end users to authenticate to applications created using HTML DB. That relieves each developer of having to "reinvent the wheel" and set up account repository tables and to have to write APIs to store/manage passwords, the work we did for HTML DB itself. Your application can simply use the built-in HTML DB authentication scheme which uses the account repository for credentials verification. It's not the only way for your application to verify credentials. In fact it's best suited for experimental applications, small workgroup applications, prototypes, apps on that scale. Applications that are slated for actual production deployment should be fitted with enterprise-level identity management solutions.
    11. Finally, HTML DB provides a very, very basic group-membership model that allows developer accounts (not database schemas) to be assigned to arbitrarily organized named groups. There is a supporting API for queries against these groups and an admin UI to create/maintain these groups. The same caveats given for using developer accounts for production applications apply to this facility.
    Recap:
    Database accounts: HTML DB does not use these accounts, their roles, or their privileges except to dynamically execute application code using these schemas as the "parsing schema".
    HTML DB user accounts: No relation to database schemas (*). They exist in custom tables owned by the HTML DB product. Accounts can be created and used by application developers as an out-of-the-box credentials verification method for authentication.
    *Exception: The "default schema" associated with an HTML DB user account is the name of a schema used to prime an LOV when the user sees a list-of-schemas LOV in places like the SQL Workshop.
    Scott

  • SOAP-ERROR: Parsing Schema: element has both 'type' attribute and subtype

    Hi,
    i have created web service link which deals with calling a Pl/sql procedure with the help of DBAdapter in jdev 10.1.3.4 .here i am trying to insert a row in tables.my webservice is working fine from BPEL console
    my collegue who is working on PHP is trying to access the the wsdl link with the help of Appcelator and php
    code for php
    <?php
    //include("general.php");
    $wsdl_url = 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/CreateRepairOrder/1.0/CreateRepairOrder?wsdl';
    //$wsdl_url = 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl';
    $client = new SoapClient($wsdl_url,array('trace' => 1,'exceptions' => 0));
    print_r($client);
    exit;
    class CreateOrderNd
    var $PARTY_ID="";
    var $CUST_ACCOUNT_ID="";
    var $INVENTORY_ITEM_ID="";
    var $SERIAL_NUMBER="";
    var $UNIT_OF_MEASURE="";
    var $QUANTITY="";
    var $ITEM_CROSS_REFERENCE="";
    var $PROBLEM_DESCRIPTION="";
    function CreateOrderNd($PartyNam,$AccountId,$ItemId_requestdata,$SerialNumber_requestdata,$uom_requestdata,
    $quantity_requestdata,$ItemCrossReference_requestdata,$ProblemDescription_requestdata)
    $this->PARTY_ID=$PartyName;
    $this->CUST_ACCOUNT_ID=$AccountId;
    $this->INVENTORY_ITEM_ID=$ItemId_requestdata;
    $this->SERIAL_NUMBER=$SerialNumber_requestdata;
    $this->UNIT_OF_MEASURE=$uom_requestdata;
    $this->QUANTITY=$quantity_requestdata;
    $this->ITEM_CROSS_REFERENCE=$ItemCrossReference_requestdata;
    $this->PROBLEM_DESCRIPTION=$ProblemDescription_requestdata;
    $parm = new CustomerNd($PartyName_requestdata,$AccountId_requestdata,$ItemId_requestdata,$SerialNumber_requestdata,$uom_requestdata,
    $quantity_requestdata,$ItemCrossReference_requestdata,$ProblemDescription_requestdata);
    $parm = new CustomerNd('Bus%','');
    $parm = new CreateOrderNd(4429,1608,6761,'0722AB05','Ea',1,'abc123','Network error');
    $ret=$client->process($parm);
    print_r($ret);
    ?>
    when she/he access it they are facing a error
    SOAP-ERROR: Parsing Schema: element has both 'type' attribute and subtype
    and some times it will give
    Warning: SoapClient::SoapClient(http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl) http://function.SoapClient-SoapClient: failed to open stream: HTTP request failed! in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6
    Warning: SoapClient::SoapClient() http://function.SoapClient-SoapClient: I/O warning : failed to load external entity "http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl" in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6
    Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl' in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6

    Hi,
    i have created web service link which deals with calling a Pl/sql procedure with the help of DBAdapter in jdev 10.1.3.4 .here i am trying to insert a row in tables.my webservice is working fine from BPEL console
    my collegue who is working on PHP is trying to access the the wsdl link with the help of Appcelator and php
    code for php
    <?php
    //include("general.php");
    $wsdl_url = 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/CreateRepairOrder/1.0/CreateRepairOrder?wsdl';
    //$wsdl_url = 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl';
    $client = new SoapClient($wsdl_url,array('trace' => 1,'exceptions' => 0));
    print_r($client);
    exit;
    class CreateOrderNd
    var $PARTY_ID="";
    var $CUST_ACCOUNT_ID="";
    var $INVENTORY_ITEM_ID="";
    var $SERIAL_NUMBER="";
    var $UNIT_OF_MEASURE="";
    var $QUANTITY="";
    var $ITEM_CROSS_REFERENCE="";
    var $PROBLEM_DESCRIPTION="";
    function CreateOrderNd($PartyNam,$AccountId,$ItemId_requestdata,$SerialNumber_requestdata,$uom_requestdata,
    $quantity_requestdata,$ItemCrossReference_requestdata,$ProblemDescription_requestdata)
    $this->PARTY_ID=$PartyName;
    $this->CUST_ACCOUNT_ID=$AccountId;
    $this->INVENTORY_ITEM_ID=$ItemId_requestdata;
    $this->SERIAL_NUMBER=$SerialNumber_requestdata;
    $this->UNIT_OF_MEASURE=$uom_requestdata;
    $this->QUANTITY=$quantity_requestdata;
    $this->ITEM_CROSS_REFERENCE=$ItemCrossReference_requestdata;
    $this->PROBLEM_DESCRIPTION=$ProblemDescription_requestdata;
    $parm = new CustomerNd($PartyName_requestdata,$AccountId_requestdata,$ItemId_requestdata,$SerialNumber_requestdata,$uom_requestdata,
    $quantity_requestdata,$ItemCrossReference_requestdata,$ProblemDescription_requestdata);
    $parm = new CustomerNd('Bus%','');
    $parm = new CreateOrderNd(4429,1608,6761,'0722AB05','Ea',1,'abc123','Network error');
    $ret=$client->process($parm);
    print_r($ret);
    ?>
    when she/he access it they are facing a error
    SOAP-ERROR: Parsing Schema: element has both 'type' attribute and subtype
    and some times it will give
    Warning: SoapClient::SoapClient(http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl) http://function.SoapClient-SoapClient: failed to open stream: HTTP request failed! in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6
    Warning: SoapClient::SoapClient() http://function.SoapClient-SoapClient: I/O warning : failed to load external entity "http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl" in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6
    Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl' in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6

  • How to change parsing schema for REST

    Hi all,
    I'm trying to test the new REST Webservice feature, but this leads to an error:
    Using Apex 4.2.1.00.08, Listener 2.0.1.64.14.25 I set up a simple WebService (method: GET, format: JSON) which
    querys a table.
    When I try to test my webservice (using "Test" button) the following error is shown:
    Request Path passes syntax validation
    Mapping request to database pool: PoolMap [_poolName=apex, _regex=null, _workspaceIdentifier=null, _failed=false, _lastUpdate=-1, _template=null, _type=REGEX]
    Applied database connection info
    Attempting to process with PL/SQL Gateway
    Not processed as PL/SQL Gateway request
    Attempting to process as a RESTful Service
    Determining if request can be dispatched as a Tenanted RESTful Service
    Request path has one path segment, continuing processing
    No Tenant Principal established yet, continuing processing
    APEX_LISTENER pool exists, continuing processing
    Matching tenant exists, continuing processing
    modul/template/ matches: modul/template/ score: 0
    Choosing: oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as current candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=1019223475312614|5204902308237886, uriTemplate=modul/template/], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true]
    Determining if request can be dispatched as a Tenanted RESTful Service
    Request path has one path segment, continuing processing
    Tenant Principal already established, cannot dispatch
    Chose oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as the final candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=1019223475312614|5204902308237886, uriTemplate=modul/template/], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true] for: GET modul/template/
    Choosing: oracle.dbtools.rt.jdbc.entity.JDBCTenantDispatcher as current candidate with score: Score [handle=oracle.dbtools.rt.jdbc.entity.JDBCTenantDispatcher$TenantTarget@1537060, score=1, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true]
    Chose oracle.dbtools.rt.jdbc.entity.JDBCTenantDispatcher as the final candidate with score: Score [handle=oracle.dbtools.rt.jdbc.entity.JDBCTenantDispatcher$TenantTarget@1537060, score=1, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true] for: GET prx/modul/template/
    prx/modul/template/ is a public resource
    modul/template/ is a public resource
    Using generator: oracle.dbtools.rt.json.query.JSONQueryGenerator
    Performing JDBC request as: POFFICE
    Error during evaluation of resource template: ORA-00942: Tabelle oder View nicht vorhanden
    I see what is going wrong: "Performing JDBC request as: POFFICE". JDBC is using a wrong schema ("POFFICE").
    So, my question is, how to change the parsing schema for JDBC/WebService?
    Thanks a lot,
    Michael

    jfle wrote:
    Yes - this is the reason,
    but is there a way to change or delete the first schema provisioned?See {message:id=3757162}
    We have deleted the poffice assignment to the workspace, but the REST-service executes with poffice?Don't know could be a bug.
    May be try exporting you restful webservice definition > Edit the export file in textpad/notepad and verify the parsing schema
    You will see a block something like below, there just amend the p_parsing_schema to desired > and then import it back
    wwv_flow_api.create_restful_module (
      p_id => 7113266627142076447 + wwv_flow_api.g_id_offset
    ,p_name => 'oracle.example.vikram2'
    ,p_parsing_schema => 'APX'
    ,p_items_per_page => 25
    ,p_status => 'PUBLISHED'
      );

  • Problem in compiling procedure from another schema

    Hi all
    I have got 2 schemas, say A and B.
    Schema A owns a procedure P which selects data from table T1 ( external table ) and updates table T2.
    i have granted Schema B
    1) read, write privilege on the directory that table T1 refrences.
    2) all on table T1
    3) all on table T2
    4) execute on P
    I have created public synonyms for T1, T2 and P ( same name ).
    Now when i try to compile procedure P from schema B I get error
    ORA-01031: insufficient privileges
    Where am i wrong?
    Please Help

    You'll need CREATE ANY PROCEDURE privilege for that.
    Is there any reason why you don't post the one thing on which you are asking about : the alter procedure statement?
    (apart from also not posting the version, which you always should include)
    Sybrand Bakker
    Senior Oracle DBA

  • Dbms_metadata.GET_DDL for all procedures for a schema

    I am trying to capture all the procedure DDLs for schema CUSTOM
    I am using 11g on Linux.
    I run this command...
    SELECT dbms_metadata.GET_DDL('PROCEDURE',NULL,'CUSTOM') FROM DUAL;
    And get this error:
    ORA-31600: invalid input value NULL for parameter VALUE in function SET_FILTER
    ORA-06512: at "SYS.DBMS_METADATA", line 4018
    ORA-06512: at "SYS.DBMS_METADATA", line 5843
    ORA-06512: at line 1
    Thanks in advance.

    user13716252 wrote:
    I am trying to capture all the procedure DDLs for schema CUSTOM
    I am using 11g on Linux.
    I run this command...
    SELECT dbms_metadata.GET_DDL('PROCEDURE',NULL,'CUSTOM') FROM DUAL;
    And get this error:
    ORA-31600: invalid input value NULL for parameter VALUE in function SET_FILTER
    ORA-06512: at "SYS.DBMS_METADATA", line 4018
    ORA-06512: at "SYS.DBMS_METADATA", line 5843
    ORA-06512: at line 1
    Thanks in advance.specify actual procedure name; not NULL

  • Help with truncating a table using plsql procedure in different schema

    I have a plsql procedure in schema A that truncates a table that is given in as parameter.
    create or replace procedure truncate_table(schema, table_name)
    EXECUTE IMMEDIATE 'TRUNCATE TABLE '||schema||'.'||table_name;
    end;
    The above procedure has public execute grant.
    I need to truncate a table in schema B. I have a plsql procedure in schema B that calls the truncate_table procedure and passes in the schema B table name.
    Since the table is in schema B, should the delete grant on the table be given to user A or user B to truncate the table in schema B?
    Thanks in advance.

    Procedure created in schema A
    create or replace
    procedure truncate_table(l_schema varchar2, table_name varchar2) authid current_user
    as
    begin
    EXECUTE IMMEDIATE 'TRUNCATE TABLE '||l_schema||'.'||table_name;
    end;from schema B
    grant delete on table1 to Schema_A
    from schema A
    exec truncate_table('Schema_B','Table1');
    Hope this helps.
    Alvinder

  • Application Builder Applications List View Detail - Parsing Schema

    When viewing all applications in the Application Builder using the View Detail option the list of applications is shown with the Parsing Schema showing APEX_040100 or APEX_040200 according to the apex version. Shouldn't it show the actual schema that the application will use?

    Prabodh wrote:
    Hi,
    How will Apex know the actual schema without getting into the code and analyzing it?
    I meant just showing the actual "parsing schema" which is set for the application, not all the possible schemas the application may actually reference. The parsing schema is one of the parameters asked for when importing an application. It is also defined in the application definition.
    A workspace can have any number of schema assigned to it, other than the Default Parsing one. So, the only other option would be to list all the assigned schema. Which in my opinion (and most probably in the mind of the designers of Apex as well ) will be an unnecessary long list.In my opinion it seems unnecessary and fairly useless to show the APEX schema (APEX040100, APEX040200) when listing a few details of the application. Just wondering if it is on purpose or an overlooked bug.

Maybe you are looking for

  • Browser Incompatibilities

    All right. I'll admit it. I'm new to Java. But after multiple weeks of hard work, I finally wrote The Ultimate Java Applet. At least, in my own mind. It's that pride thing again, gotta watch that. Finally had all the bugs ironed out, and it worked be

  • My Apple TV can no longer find my network - help?

    I've been using my apple tv for a LONG tme successfully until tonight. It can no longer find my network (airport network)! Resetting/restarting the apple tv has not helped. I can't update anything because it can't connect to the internet (even though

  • Scheduling not working correctly

    Ever since I installed the latest kernel 2.6.38.x, my system gets totally crippled when a high CPU process like an extraction of a big rar file gets started. The system loses all responsiveness: google doesn't respond anymore and even urxvt has troub

  • Ignition Switch to use in a Labview panel?

    Has anybody programed vehicle ignition switch to use in a Labview panel to interface to a simulator?

  • Code in Inbound Processing FM for IDOC

    Hi I have a Scenario. Loop at idoc records. Step 1: Thru User Exit Before Posting I Called a BAPI but did not Commit. Step 2.Idoc is proccessed. If Idoc _status = successfull Will My BAPI will commit Automatically ? Endloop. Let me know wether my BAP