WebService, SBODI_Server, Sample

Hi,
I have SAP BO 2004 patch 28.
I try run Sample "DIServerBP" in VB. First I run server side "DISSample" and again client side "WSClient" in deguge mode.
I see error:
An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll
Additional information: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.UnauthorizedAccessException: Access deny.
   at DISSample.Sample.Login(String DataBaseServer, String DataBaseName, String DataBaseType, String DataBaseUserName, String DataBasePassword, String CompanyUserName, String CompanyPassword, String Language, String LicenseServer) in D:\Inetpub\wwwroot\DISSample\Sample.asmx.vb:line 56
   --- End of inner exception stack trace ---
I don't understend - what is wrong?
Can you help me?
Thanks
Tomasz

Try this:
Do you have created the ASPNET windows account?
Does the ASPNET account have rights to access the Company's database?
Solving this two problems, you can run the webservices without troubles
Sir Harold

Similar Messages

  • Problem while calling webservice from a plsql stored procedure

    Hi everybody,
    I need to call a webservice from a plsql stored procedure.
    I was following documentation published in the otn at the following link.
    "http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html"
    I am encountering the following error on my sql prompt-
    SQL> exec dbms_output.put_line(time_service.get_local_time('94065'));
    BEGIN dbms_output.put_line(time_service.get_local_time('94065')); END;
    ERROR at line 1:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1022
    ORA-12545: Connect failed because target host or object does not exist
    ORA-06512: at "APPS.DEMO_SOAP", line 65
    ORA-06512: at "APPS.TIME_SERVICE", line 13
    ORA-06512: at line 1
    Has anybody worked on the same example. Please direct me.
    Thanks & Regards
    Kiran Kumar

    Kiran, were you able to solve this?
    I am facing the same error.
    Oracle Server is Unix and webservice is .NET.
    I am able to connect to Java web service.

  • Webservice proxy generation

    I am using JDeveloper 10.1.3 to generate a proxy for an existing webservice.
    After running the wizard "WebService proxy" (from Gallery), I find that not all of expected classes are being generated. (conclusion drawn after comparing classes generated against webservice provider samples)
    Is there any additional step to be performed to generate all classes?
    thanks,

    Select the Proxy node in the Application Navigator and View the Structure Pane, which will display all the related files for the proxy node..
    Regards,
    Sunil..

  • Is it possible to have the result from webservices with oracle8i

    hi,
    i call webservices MS .net with package utl_http under oracle 8i.
    exemple:
    DECLARE
    x utl_http.html_pieces;
    msg varchar2(12);
    BEGIN
    x := utl_http.request_pieces('http://localhost/ServiceNotification/Notification.asmx/NotifT?messagetmp=' || msg);
    END;
    I don't know how to have a result from a webservices!
    thanks for helping me.

    While the following paper is Oracle9i DB specific, conceptually, what is done should work with Oracle8i.
    Bear in mind that the use of XMLType is specific to Oracle9i DB R2 so if you were to follow the example, you would have to use varchars and probably acept the result into the PL/SQL XML Parser. See:
    http://otn.oracle.com/tech/webservices/htdocs/samples/dbwebservice/DBWebServices.html
    Mike.

  • Oracle db to SAP R/3 synchronous solution ?

    Hi,
    I am looking for some comments from SDN members to come up with a solution.
    <u>Requirement:</u> Automatically update the R/3 system based on the updates in the "external" Oracle database.
    In order to accomplish this, currently we are working on the JDBC (Sender)> XI> R/3 ( RFC receiver) asynchronous scenario using poll interval to pull the data from Oracle db to R/3.
    Instead we are looking for a synchronous sort of solution where Oracle pushes the data into R/3 as soon as update happens in the Oracle tables.
    One of the possibility is to have a trigger in the database to generate the XML files using XMLGen.getxml utility.
    Thanks for your time,
    Sunil

    Hi Sunil.
    If I understand correctly, you want to push data from Oracle to XI rather than polling the database from XI and retrieving data.
    You may consider exposing your outbound interface in XI as a web service and then calling the web service from the triggers in Oracle. Thus data would be passed from the Oracle trigger to XI over SOAP.
    This link would help you on how to call web service from PL/SQL
    http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    These links would help you on how to expose a web service from XI.
    http://help.sap.com/saphelp_nw04/helpdata/en/31/daa0404dd52b54e10000000a1550b0/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/336365d3-0401-0010-9884-a651295aeaa9
    You can write the trigger for the appropriate action (INSERT, UPDATE, DELETE) on the database table and then call the web service.
    Hope this help ,
    Gaurav

  • How to access existing Web Service

    I want to access the web service (SOAP) from java classes.
    Can Any body help me by sending sample code providing that how to send my XML content to the existing web service and get the response from that.
    I want to further analyse that it is succedded or not from the response of web service (the response is also in XML).
    Thanks,
    Dipen.

    You are in the wrong forum - web services are not available with Sun webserver. Speaking of examples to check out, I would recommend you to install Sun appserver 8.1 or 8.2 and check examples that come with it, specifically in "samples/webservices" and "samples/xml" directories.

  • How to access remote web service?

    I try the demo in get start document(chapter 18).but I can
    not get any data.
    Do I have to change settings?Do I have to use FDS?
    Thanks
    Mark

    You are in the wrong forum - web services are not available with Sun webserver. Speaking of examples to check out, I would recommend you to install Sun appserver 8.1 or 8.2 and check examples that come with it, specifically in "samples/webservices" and "samples/xml" directories.

  • WSIT: Unable to run WSIT tutorial document's Using Atomic Transaction

    Hi,
    I've to implement a sample web service demonstrating the use of WS Transaction and so I downloaded NetBeans 6.7.1, installed all web services related plug ins. Downloaded and installed Java SDK 6 and latest java run time. Installed Glassfish 2.x and Glassfish 3 prelude. I also downloaded the zip files required for the tutorials mentioned in the WSIT tutorials.
    I've followed all the instructions so far from the tutorial for configuring the system after installation of the required software. Like setting up the PATH, the ANT_HOME and JAVA_HOME variables and stuff.
    In the transaction tutorial the sample downloaded for the tutorial has some build files and i've configured them accordingly. Pasting the build.properties mentioned in the document after my edit changes below:
    <br />
    <pre><strong># Save this file as build.properties in the =${wsit.tutorial.home}/examples/bp-project
    # directory.  Then set the javaee.home property to the location of your GlassFish
    # installation and the wsit.tutorial.home property to the location of your WSIT
    # Tutorial installation.
    javaee.home=C:/Sun/AppServer
    wsit.tutorial.home=C:/Documents and Settings/Navina GK/My Documents/UoSouthampton/MSc Web Tech/Semester 1/COMP6017 - Advanced Topics on WebServices/Ebook/Samples/wsittutorial</strong></pre><pre><strong># machine name (or the IP address) where the applications will be deployed.
    javaee.server.name=localhost
    # port number where the app-server is accessed by the users
    javaee.server.port=8080</strong></pre><strong># port number where the admin server of the app-server is available</strong><pre><strong>javaee.adminserver.port=4848</strong></pre><pre><strong># Uncomment the property j2ee.server.username,</strong></pre><pre><strong># and replace the administrator username of the app-server</strong></pre><pre><strong>javaee.server.username=eakangk</strong></pre><pre><strong># Uncomment the property j2ee.server.passwordfile,</strong></pre><pre><strong># and replace the following line to point to a file that</strong></pre><pre><strong># contains the admin password for your app-server.</strong></pre><pre><strong># The file should contain the password in the following line:</strong></pre><pre><strong>#</strong></pre><pre><strong># AS_ADMIN_PASSWORD=adminadmin</strong></pre><pre><strong>#</strong></pre><pre><strong># Notice that the password is adminadmin since this is</strong></pre><pre><strong># the default password used by the glassfish app-server installation.</strong></pre><pre><strong>#</strong></pre><pre><strong>javaee.server.passwordfile=${wsit.tutorial.home}/examples/bp-project/admin-password.txt</strong></pre><pre><strong>appserver.instance=server</strong></pre><pre><strong># Uncomment and set this property to the location of the browser you</strong></pre><pre><strong># choose to launch when an application is deployed.</strong></pre><pre><strong># On Windows and Mac OS X the default browser is used.</strong></pre><pre><strong>#default.browser=/Applications/Firefox.app/Contents/MacOS/firefox-bin</strong></pre><pre><strong># Database vendor property for db tasks</strong></pre><pre><strong>db.vendor=javadb</strong></pre><pre><strong># Digital certificate properties for mutual authentication</strong></pre><pre><strong>truststore=${javaee.home}/domains/domain1/config/cacerts.jks</strong></pre><pre><strong>keystore.password=changeit</strong></pre><pre><strong>truststore.password=changeit</strong></pre>and all i have to do after that is go to the directory mentioned in the tutorial (https://wsit-docs.dev.java.net/releases/1.1/WSITTutorial.pdf
    ) in page 204 and run "ant setup"
    But after runningthe command i get a huge report with an error at the end saying BUILD FAILED.
    Pasting it below
    <br />
    <strong>C:\xx\xx\Samples\wsittutorial\exam<br />
    ples\wstx\basicWSTX\SampleService>ant setup<br />
    Buildfile: build.xml<br />
    <br />
    check:<br />
    <br />
    tools:<br />
    <br />
    setup:<br />
         [echo]    Starting C:/Sun/AppServer domain1<br />
         [echo] domain1 started.<br />
    Duplicated project name in import. Project SampleService-impl defined first in C<br />
    :\xx\xx\Samples\wsittutorial\examp<br />
    les\wstx\basicWSTX\SampleService\nbproject\ant-deploy.xml and again in C:\xx\xx\Samples\wsittutorial\examples\wstx<br />
    \basicWSTX\SampleService\nbproject\build-impl.xml<br />
    <br />
    check:<br />
    <br />
    tools:<br />
    <br />
    setup-resources:<br />
    Duplicated project name in import. Project SampleService-impl defined first in C<br />
    :\xx\xx\Samples\wsittutorial\examp<br />
    les\wstx\basicWSTX\SampleService\nbproject\ant-deploy.xml and again in C:\xx\xx\Samples\wsittutorial\examples\wstx<br />
    \basicWSTX\SampleService\nbproject\build-impl.xml<br />
    <br />
    create-queue:<br />
    Duplicated project name in import. Project SampleService-impl defined first in C<br />
    :\xx\xx\Samples\wsittutorial\examp<br />
    les\wstx\basicWSTX\SampleService\nbproject\ant-deploy.xml and again in C:\xx\xx\Samples\wsittutorial\examples\wstx<br />
    \basicWSTX\SampleService\nbproject\build-impl.xml<br />
    <br />
    check:<br />
    <br />
    tools:<br />
    <br />
    create-jms-resource:<br />
         [exec] Usage: create-jms-resource --restype resource_type [--terse=false] [<br />
    --echo=false] [--interactive=true] [--host localhost] [--port 4848|4849] [--secu<br />
    re | -s] [--user admin_user] [--passwordfile file_name] [--enabled=true] [--desc<br />
    ription text] [--property (name=value)[:name=value]*] [--target target(Default s<br />
    erver)] jndi_name<br />
    continued..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    [exec] CLI014 restype is a required option.
    Duplicated project name in import. Project SampleService-impl defined first in C
    :\xx\xx\Samples\wsittutorial\examp
    les\wstx\basicWSTX\SampleService\nbproject\ant-deploy.xml and again in C:\xx\xx\Samples\wsittutorial\examples\wstx
    \basicWSTX\SampleService\nbproject\build-impl.xml
    check:
    tools:
    create-xa-cf:
    [exec] Usage: create-connector-connection-pool --raname resource_adapter_na<br />
    me --connectiondefinition connection_definition_name [--terse=false] [--echo=fal<br />
    se] [--interactive=true] [--host localhost] [--port 4848|4849] [--secure | -s] [
    --user admin_user] [--passwordfile file_name] [--steadypoolsize 8] [--maxpoolsiz<br />
    e 32] [--maxwait 60000] [--poolresize 2] [--idletimeout 300] [--failconnection=f<br />
    alse] [--transactionsupport transaction_support] [--isconnectvalidatereq=false]
    [--description text] [--property (name=value)[:name=value]*] poolname
    [exec] CLI014 raname is a required option.
    Duplicated project name in import. Project SampleService-impl defined first in C
    :\xx\xx\Samples\wsittutorial\examp
    les\wstx\basicWSTX\SampleService\nbproject\ant-deploy.xml and again in C:\xx\xx\Samples\wsittutorial\examples\wstx
    \basicWSTX\SampleService\nbproject\build-impl.xml
    check:
    tools:
    create-jms-connection-factory:
    [exec] Usage: create-jms-resource --restype resource_type [--terse=false] [
    --echo=false] [--interactive=true] [--host localhost] [--port 4848|4849] [--secu<br />
    re | -s] [--user admin_user] [--passwordfile file_name] [--enabled=true] [--desc<br />
    ription text] [--property (name=value)[:name=value]*] [--target target(Default s<br />
    erver)] jndi_name
    [exec] CLI014 restype is a required option.
    [echo] Created required resources and added them to domain1 ...
    [echo] Now creating C:/Sun/AppServer domain2 ...
    [exec] Usage: create-domain [--user admin] [--adminport port_number] [--ter<br />
    se=false] [--echo=false] [--interactive=true] [--domaindir domain_directory] [--<br />
    profile profile_name] [--template domain_template] [--passwordfile filename ] [
    --instanceport port_number] [--savemasterpassword=false] [--domainproperties (na<br />
    me=value)[:name=value]*] [--portbase portbase] [--savelogin=false] [--checkports<br />
    =true] domain_name
    [exec] CLI019 Invalid number of operands. Number of operands should be equ
    al to 1.
    [echo] Created C:/Sun/AppServer domain2 successfully
    Duplicated project name in import. Project SampleService-impl defined first in C
    :\xx\xx\Samples\wsittutorial\examp
    les\wstx\basicWSTX\SampleService\nbproject\ant-deploy.xml and again in C:\xx\xx\Samples\wsittutorial\examples\wstx
    \basicWSTX\SampleService\nbproject\build-impl.xml
    check:
    tools:
    trust-domains:
    Duplicated project name in import. Project SampleService-impl defined first in C
    :\xx\xx\Samples\wsittutorial\examp
    les\wstx\basicWSTX\SampleService\nbproject\ant-deploy.xml and again in C:\xx\xx\Samples\wsittutorial\examples\wstx
    \basicWSTX\SampleService\nbproject\build-impl.xml
    check:
    tools:
    trust-other-domain:
    [exec] Certificate stored in file <s1as.cer>
    [exec] Certificate was added to keystore
    [exec] keytool error: java.io.FileNotFoundException: C:\Sun\AppServer\domai
    ns\domain2\config\cacerts.jks (The system cannot find the path specified)
    BUILD FAILED
    C:\xx\xx\Samples\wsittutorial\exam
    ples\wstx\basicWSTX\SampleService\build.xml:136: The following error occurred wh
    ile executing this line:
    C:\xx\xx\Samples\wsittutorial\exam
    ples\wstx\basicWSTX\SampleService\build.xml:142: The following error occurred wh
    ile executing this line:
    C:\xx\xx\Samples\wsittutorial\exam
    ples\wstx\basicWSTX\SampleService\build.xml:178: exec returned: 1
    Total time: 2 minutes 7 seconds
    C:\xx\xx\Samples\wsittutorial\exam
    ples\wstx\basicWSTX\SampleService>
    </strong>
    <br />
    <br />
    I really would like to know who created the tutorial if it is not working with the newer version of java. I've wasted quite some time on this now. around 5 hours. trying to figure out wat could be wrong. I would highly appreciate a prompt response from an expert who could explain in layman terms about what is the problem.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Calling Web Service from PL/SQL in 9.2.0.4

    We're having some problems getting the "Calling Web Services Sample from PL/SQL" sample working with our 9.2.0.4 database. After downloading the sample from http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html, we try to run the sample but get the following error stack:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00243: element attribute value must be enclosed in quotes
    Error at line 20
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at "TODDH.DEMO_SOAP", line 81
    ORA-06512: at "TODDH.TIME_SERVICE", line 15
    ORA-06512: at line 2
    Has anyone encountered a similar problem? Any help is much appreciated.
    Todd.

    the message looks very much like the one posted at http://asktom.oracle.com/pls/ask/f?p=4950:8:5812357525663697256::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:16568950771220
    b.t.w. i don't think that any packages are missing. it seems that the XML is invalid. Did you use dbms_output commands to show the generated XML?

  • Access a web service from pl/sql

    I am trying to access a web service from pl/sql. I have downloaded the code from
    http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    But when I try to execute the sql, I am getting the following error:
    SQL> @local.sql
    Package created.
    Package body created.
    No errors.
    BEGIN dbms_output.put_line(time_service.get_local_time('94065')); END;
    ERROR at line 1:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1022
    ORA-12545: Connect failed because target host or object does not exist
    ORA-06512: at "WEB.DEMO_SOAP", line 71
    ORA-06512: at "WEB.TIME_SERVICE", line 15
    ORA-06512: at line 1
    It is failing at:
    resp := demo_soap.invoke(req,
    'http://www.ripedev.com/webservices/LocalTime.asmx',
    'http://ripedev.com/xsd/ZipCodeResults.xsd/LocalTimeByZipCode');
    But in the examples that I got from downloading source code, site used was:
    'http://www.alethea.net/webservices/LocalTime.asmx',
    'http://www.alethea.net/webservices/LocalTimeByZipCode');
    This site was not accessible. So I changed to the working site as follows, but still I
    am getting the above error.
    But I can access this site, if I type in the above address in the address bar of IE.
    Can any body help?
    I have oracle9i client installed on my machine and able to connect to server thru toad and sql plus.
    or IF any body refers me to a good website for the topic of "using webservies from pl/sql" that would be great too!

    Here is the complete code:
    time_service:
    CREATE OR REPLACE PACKAGE time_service AS
    FUNCTION get_local_time(zipcode IN VARCHAR2) RETURN VARCHAR2;
    END;
    CREATE OR REPLACE PACKAGE BODY time_service AS
    -- Location of Web service definition
    -- http://www.alethea.net/webservices/LocalTime.asmx?WSDL
    -- http://www.ripedev.com/webservices/LocalTime.asmx?WSDL
    -- http://www.xmethods.com/sd/2001/CurrencyExchangeService.wsdl
    --'http://ripedev.com/xsd/ZipCodeResults.xsd/LocalTimeByZipCode style=document');
    FUNCTION get_local_time(zipcode IN VARCHAR2) RETURN VARCHAR2 IS
    req demo_soap.request;
    resp demo_soap.response;
    BEGIN
    dbms_output.put_line('before new request..');
    req := demo_soap.new_request('LocalTimeByZipCode',
    'xmlns="http://ripedev.com/xsd/ZipCodeResults.xsd"');
    dbms_output.put_line('before add param..');
    demo_soap.add_parameter(req, 'ZipCode', 'xsd:string', zipcode);
    dbms_output.put_line('before invoke..');
    resp := demo_soap.invoke(req,
    'http://www.ripedev.com/webservices/LocalTime.asmx',
    'http://ripedev.com/xsd/ZipCodeResults.xsd/LocalTimeByZipCode');
    dbms_output.put_line('before return..');
    RETURN demo_soap.get_return_value(resp, 'LocalTimeByZipCodeResult',
    'xmlns="http://www.ripedev.com/webservices/"');
    END;
    BEGIN
    dbms_output.put_line('inside main time_service..');
    END;
    show errors
    SET serveroutput ON
    exec dbms_output.put_line(time_service.get_local_time('94065'));
    Here is demo_soap.sql:
    Rem
    Rem $Header: soapdemo.sql 21-may-2002.13:48:17 rpang Exp $
    Rem
    Rem soapdemo.sql
    Rem
    Rem Copyright (c) 2002, Oracle Corporation. All rights reserved.
    Rem
    Rem NAME
    Rem soapdemo.sql - <one-line expansion of the name>
    Rem
    Rem DESCRIPTION
    Rem A PL/SQL demo package for making SOAP RPC calls.
    Rem
    Rem NOTES
    Rem This demo package can only be used in oracle 9ir2. It utilizes 9iR2's
    Rem XDB (XMLType and HttpUriType) and 9iR1's enhancements to UTL_HTTP to
    Rem make SOAP RPC calls.
    Rem
    Rem MODIFIED (MM/DD/YY)
    Rem rpang 05/21/02 - created
    Rem
    Rem A PL/SQL demo package that makes a SOAP RPC calls.
    Rem
    CREATE OR REPLACE PACKAGE demo_soap AS
    /* A type to represent a SOAP RPC request */
    TYPE request IS RECORD (
    method VARCHAR2(256),
    namespace VARCHAR2(256),
    body VARCHAR2(32767));
    /* A type to represent a SOAP RPC response */
    TYPE response IS RECORD (
    doc xmltype);
    * Create a new SOAP RPC request.
    FUNCTION new_request(method IN VARCHAR2,
    namespace IN VARCHAR2)
    RETURN request;
    * Add a simple parameter to the SOAP RPC request.
    PROCEDURE add_parameter(req IN OUT NOCOPY request,
    name IN VARCHAR2,
    type IN VARCHAR2,
    value IN VARCHAR2);
    * Make the SOAP RPC call.
    FUNCTION invoke(req IN OUT NOCOPY request,
    url IN VARCHAR2,
    action IN VARCHAR2) RETURN response;
    * Retrieve the sipmle return value of the SOAP RPC call.
    FUNCTION get_return_value(resp IN OUT NOCOPY response,
    name IN VARCHAR2,
    namespace IN VARCHAR2) RETURN VARCHAR2;
    END;
    show errors
    CREATE OR REPLACE PACKAGE BODY demo_soap AS
    FUNCTION new_request(method IN VARCHAR2,
    namespace IN VARCHAR2)
    RETURN request AS
    req request;
    BEGIN
    req.method := method;
    req.namespace := namespace;
    RETURN req;
    END;
    PROCEDURE add_parameter(req IN OUT NOCOPY request,
    name IN VARCHAR2,
    type IN VARCHAR2,
    value IN VARCHAR2) AS
    BEGIN
    req.body := req.body ||
    '<'||name||' xsi:type="'||type||'">'||value||'</'||name||'>';
    END;
    PROCEDURE generate_envelope(req IN OUT NOCOPY request,
                   env IN OUT NOCOPY VARCHAR2) AS
    BEGIN
    env := '<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body><'||req.method||' '||req.namespace||'
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'||
    req.body||'</'||req.method||'></SOAP-ENV:Body></SOAP-ENV:Envelope>';
    END;
    PROCEDURE show_envelope(env IN VARCHAR2) AS
    i pls_integer;
    len pls_integer;
    BEGIN
    i := 1; len := length(env);
    WHILE (i <= len) LOOP
    dbms_output.put_line(substr(env, i, 60));
    i := i + 60;
    END LOOP;
    END;
    PROCEDURE check_fault(resp IN OUT NOCOPY response) AS
    fault_node xmltype;
    fault_code VARCHAR2(256);
    fault_string VARCHAR2(32767);
    BEGIN
    fault_node := resp.doc.extract('/soap:Fault',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/');
    IF (fault_node IS NOT NULL) THEN
    fault_code := fault_node.extract('/soap:Fault/faultcode/child::text()',
         'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
    fault_string := fault_node.extract('/soap:Fault/faultstring/child::text()',
         'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
    raise_application_error(-20000, fault_code || ' - ' || fault_string);
    END IF;
    END;
    FUNCTION invoke(req IN OUT NOCOPY request,
    url IN VARCHAR2,
    action IN VARCHAR2) RETURN response AS
    env VARCHAR2(32767);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp response;
    BEGIN
    generate_envelope(req, env);
    -- show_envelope(env);
    http_req := utl_http.begin_request(url, 'POST','HTTP/1.0');
    utl_http.set_header(http_req, 'Content-Type', 'text/xml');
    utl_http.set_header(http_req, 'Content-Length', length(env));
    utl_http.set_header(http_req, 'SOAPAction', action);
    utl_http.write_text(http_req, env);
    http_resp := utl_http.get_response(http_req);
    utl_http.read_text(http_resp, env);
    utl_http.end_response(http_resp);
    resp.doc := xmltype.createxml(env);
    resp.doc := resp.doc.extract('/soap:Envelope/soap:Body/child::node()',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
    -- show_envelope(resp.doc.getstringval());
    check_fault(resp);
    RETURN resp;
    END;
    FUNCTION get_return_value(resp IN OUT NOCOPY response,
    name IN VARCHAR2,
    namespace IN VARCHAR2) RETURN VARCHAR2 AS
    BEGIN
    RETURN resp.doc.extract('//'||name||'/child::text()',
    namespace).getstringval();
    END;
    END;
    show errors

  • Using sockets with java from PL/SQL in Oracle 8.1.7 DBA

    Hey all,
    I've been struggling for a couple of weeks now with a problem. I wrote a framework around a toolkit which makes socket connections to another server. I am attempting to use the framework from within a PL/SQL script, which is calling the framework class files which have been loaded into Oracle 8.1.7 database. The problem seems to be if I grant all permissions, or socket permissions for all hosts/ports, or even the ones I know about are being used, I get a hang when trying to connect. The funny thing is, using the toolkit, if I invoke their classes directly within code written from Oracle's code editor, it will work.
    I suspect there is
    a) Some hidden permission issue
    b) A bug in the sockets implementation Oracle is using for their JVM.
    Can anyone offer insight to this problem?
    Thanks,
    Dave Blake
    [email protected]

    Hello,
    I'm trying to investigate the same thing.
    I want to make a soap-client with PL/SQL with 8i 8.1.6.0.0
    Did you succeed some additional information ??
    I tried to run the following example:
    http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    but it only works with 9i.
    With 8i the errors encountered were : XMLTYPE undefined
    Perhaps if we find the definition of XMLTYPE and we process it to 8i we'll be able to run the example ??
    thank's

  • Attribute 'bindingStyle' is not allowed to appear in element 'jxb:globalBin

    I am using JAXB version
    xjc version "2.0-b26-ea3"
    JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build 2.0-b26-ea3)
    I have defined an external binding file
    <jxb:bindings
    version="1.0"
    xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    schemaLocation="address.xsd" node="/xsd:schema">
         <jxb:globalBindings bindingStyle="modelGroupBinding"/>
              <jxb:schemaBindings>
                        <jxb:package name="com.oracle.test.address"/>
                        <jxb:nameXmlTransform>
                                  <jxb:modelGroupName suffix="Group"/>
                        </jxb:nameXmlTransform>
              </jxb:schemaBindings>
    /jxb:bindings>
    and my XSD is
    <?xml version = "1.0" encoding = "UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xmlns.oracle.com/address"
    xmlns:tns="http://xmlns.oracle.com/address">
    <xsd:element name="address">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="street" type="xsd:string"/>
    <xsd:element name="city" type="xsd:string"/>
    <xsd:group ref="tns:pinorzip"/>
    <xsd:element name="state" type="xsd:string"/>
    <xsd:element name="streetNext" type="xsd:string"/>
    <xsd:choice>
    <xsd:element name="phoneNumber" type="xsd:string"/>
    <xsd:element name="speedDial" type="xsd:int"/>
    </xsd:choice>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:group name="pinorzip">
    <xsd:choice>
    <xsd:element name="zip" type="xsd:positiveInteger"/>
    <xsd:element name="pin" type="xsd:positiveInteger"/>
    </xsd:choice>
    </xsd:group>
    </xsd:schema>
    When I try to generate Java classes for this XSD I get the following error
    [ERROR] cvc-complex-type.3.2.2: Attribute 'bindingStyle' is not allowed to appear in element 'jxb:globalBindings'.
    line 8 of file:/D:/Mahesh/webservices/JAXB/samples/address.xjb
    Failed to parse a schema.
    I would appreciate if anybody could point out as to why I am getting this error.
    Thanks,
    Mahesh.N

    Are you sure your version of Spring is being picked up?

  • Configuration of two-phase-commit in OC4J 10.1.2

    Configuration of two-phase-commit in OC4J 10.1.2 in application with multiple modules
    We have an application ear file consisting of ejb-modules (mdb and slsb) and two web-modules. We are using Oracle's advanced queueing for messaging and CMT (all ejb use the Required transaction attribute). We need different datasources (OrionCMTDataSource) including that for aq, so we need two-phase-commit. The web clients use ejbs and browse the messaging system. Our 'orion-application.xml' includes a commit-coordinator configuration, and the database is setup correctly. The configuration works fine for mdbs, when sending messages to the queues. When a client starts after messages have been sent and consumed by the mdbs, oc4j complains that no commit-coordinator is defined in 'server.xml'. If we start the client first, it can access the queues, but then the mdbs complain. It seems that the first one "gets" the commit-coordinator and the second one fails.
    Some questions:
    Why isn't the second client type using the commit-coordinator configuration of the "orion-application.xml"?
    Is such scenario not supported by OC4J?
    How can I setup the application correctly?
    How do I configure commit-coordinator with different datasources to the same database? (Commit-Coordinator is also this database)

    Take a look 'How to Use a Custom Serializer with Oracle Application Server Web Services' [1].
    In your case, you should be looking at BeanMultiRefSerializer (org.apache.soap.encoding.soapenc), which will serialize your data using href and providing a way to deal with cycles.
    All the best,
    Eric
    [1] http://www.oracle.com/technology/tech/webservices/htdocs/samples/serialize/index.html

  • Add child to root (PL/SQL PARSER) Oracle 8.1.7

    Hi all,
    i have two dom documents, i need to add to the root of the first
    one a subtree of the second one.
    Could someone give me an example of how to do that ?
    Thanks.

    Hello,
    I'm trying to investigate the same thing.
    I want to make a soap-client with PL/SQL with 8i 8.1.6.0.0
    Did you succeed some additional information ??
    I tried to run the following example:
    http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    but it only works with 9i.
    With 8i the errors encountered were : XMLTYPE undefined
    Perhaps if we find the definition of XMLTYPE and we process it to 8i we'll be able to run the example ??
    thank's

  • Invoke Web Service in 9i database using UTL_HTTP

    I am trying to explore Oracle's UTL_HTTP package to invoke external web service without having to use java stored procedure. I downloaded a demo scripts from OTN web site (http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html) and bumped into problems when invoking it.
    select * from book_quote
    ERROR at line 1:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1022
    ORA-12545: Connect failed because target host or object does not exist
    ORA-06512: at "APPS.DEMO_SOAP", line 71
    ORA-06512: at "APPS.BOOK_SERVICE", line 13
    I checked the wsdl at the given website and it's valid. Is the database machine unable to connect to the internet? If so how can I enable it?
    Can anyone help?
    Thanks,
    Tom

    Hi,
    You need to use Adaptive Web Service Model for that.
    Check the tuorial in the link for accessing web services.
    https://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#16
    Regards
    Pankaj

Maybe you are looking for