How different Web Services can use a class which parses an XML file

I am using RAD6.1 for developing and deploying web services.As I am using 15 web Services which uses a common class which is used to parse an XML file.As this XML file should be parsed only once and should be used by all the web services.I have made this common class as Singleton but it works as singleton for only one webservice and for other web service again it is parsing the xml file.I want to parse this xml file only once and used by all the web services.In my case tis file is parsed 15 times for 15 web services, but it should be parse donly once and used by all 15 services.Please give me the solution.
Thanks and Regards
Sayeeduzzaman

Hello,
the 15 Webservices should have a static attribute which contains the xml:
private static String xml;
then initialise the xml like this:
if (xml == null)
xml = parseIt();
else
//do nothing, XML already initialised!
}

Similar Messages

  • How a web service  consumed/used in e-sourcing 7.0?

    Hi every one,
    as a beginner to this Esoucing application just wanted to know how web services are configured and used in e sourcing application.
    Regards
    Tarun

    Thanks Kushagra,
    But the link which you have provided is more of configuring the KM Configuration for SAP CLM.
    IAs per the requirement from Business user want to fetch attachments from the Documents in CLM in Bulk
    will it be possible by Script or some task i have to write.
    Could you help here.
    Thanks
    Tarun

  • Can anyone help out in parsing the xml file.

    i have this file as string in webdynpro.
    can anyone help out how can i parse it and attch to context of webdynpro with structure
    queryList
       Queryid
       name
       remarks
    <?xml version="1.0" encoding="UTF-8"?>
    <app-data>
    <content-data hyperlink="" name="RegulatoryQueries" status="USER_VALID">
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="4"/>
    <element name="QUERY_NAME" type="Text" value="shal"/>
    <element name="REMARKS" type="Text" value=""/>
    </data><data><element name="QUERY_SAVE_ID" type="Text" value="20"/>
    <element name="QUERY_NAME" type="Text" value="test"/>
    <element name="REMARKS" type="Text" value="test"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="3"/>
    <element name="QUERY_NAME" type="Text" value="query_shal"/>
    <element name="REMARKS" type="Text" value="shaleel for testing on tomcat"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="8"/>
    <element name="QUERY_NAME" type="Text" value="sap"/>
    <element name="REMARKS" type="Text" value="Demo"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="10"/>
    <element name="QUERY_NAME" type="Text" value="TTTTT"/>
    <element name="REMARKS" type="Text" value="TTTTTTTTTTTTTTTTTTTTTtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestend"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="6"/>
    <element name="QUERY_NAME" type="Text" value="RagQuery"/>
    <element name="REMARKS" type="Text" value="abcd"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="16"/>
    <element name="QUERY_NAME" type="Text" value="aa"/>
    <element name="REMARKS" type="Text" value="aaa"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="12"/>
    <element name="QUERY_NAME" type="Text" value="asda"/>
    <element name="REMARKS" type="Text" value="dasda"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="5"/>
    <element name="QUERY_NAME" type="Text" value="shalu"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="18"/>
    <element name="QUERY_NAME" type="Text" value="qry1234123"/>
    <element name="REMARKS" type="Text" value="aasdf"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="7"/>
    <element name="QUERY_NAME" type="Text" value="d"/>
    <element name="REMARKS" type="Text" value="sd"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="13"/>
    <element name="QUERY_NAME" type="Text" value="suresh"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="19"/>
    <element name="QUERY_NAME" type="Text" value="qrysdf"/>
    <element name="REMARKS" type="Text" value="sdfsd"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="22"/>
    <element name="QUERY_NAME" type="Text" value="llk"/>
    <element name="REMARKS" type="Text" value="dffnhjk"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="25"/>
    <element name="QUERY_NAME" type="Text" value="Query1"/>
    <element name="REMARKS" type="Text" value="Query1"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="30"/>
    <element name="QUERY_NAME" type="Text" value="1122"/>
    <element name="REMARKS" type="Text" value="w"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="32"/>
    <element name="QUERY_NAME" type="Text" value="11221"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="33"/>
    <element name="QUERY_NAME" type="Text" value="11222"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="34"/>
    <element name="QUERY_NAME" type="Text" value="11223"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="35"/>
    <element name="QUERY_NAME" type="Text" value="11224"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="36"/>
    <element name="QUERY_NAME" type="Text" value="11225"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="37"/>
    <element name="QUERY_NAME" type="Text" value="11226"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="38"/>
    <element name="QUERY_NAME" type="Text" value="11227"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="48"/>
    <element name="QUERY_NAME" type="Text" value="all fields"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="50"/>
    <element name="QUERY_NAME" type="Text" value="test34"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="27"/>
    <element name="QUERY_NAME" type="Text" value="12"/>
    <element name="REMARKS" type="Text" value="12"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="61"/>
    <element name="QUERY_NAME" type="Text" value="sureshcharan"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="62"/>
    <element name="QUERY_NAME" type="Text" value="charan"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="24"/>
    <element name="QUERY_NAME" type="Text" value="sss"/>
    <element name="REMARKS" type="Text" value="sss"/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="64"/>
    <element name="QUERY_NAME" type="Text" value="test"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="53"/>
    <element name="QUERY_NAME" type="Text" value="afsdf"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    <data>
    <element name="QUERY_SAVE_ID" type="Text" value="51"/>
    <element name="QUERY_NAME" type="Text" value="Satisfy al sets"/>
    <element name="REMARKS" type="Text" value=""/>
    </data>
    </content-data>
    </app-data>
    Thanks.
    dharmendra

    Hi dharmendra,
    Check
    Using the XML returned by XI to populate table in Web Dynpro UI
    Xml File processing
    Best regards, Maksim Rashchynski.

  • Oracle Database Web Service Client using UTL_DBWS :: ORA-29532 Error

    Hi,
    I have the Oracle Database 10.2.0.1.0 :-
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - ProductionI have written a simple Web Services Client using the classes gfrom the UTL_DBWS package. I loaded the JAR file dbwsclient.jar in the SYS Schema and I am trying to use it in the USF Schema.
    However, I have hit this error & I ma unable to proceed :-
    SQL>  select get_stock_price from dual;
    select get_stock_price from dual
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.IllegalAccessException: javax.xml.rpc.ServiceException:
    java.security.AccessControlException: the Permission
    (java.lang.RuntimePermission getClassLoader) has not been granted to USF. The
    PL/SQL to grant this is dbms_java.grant_permission( 'USF',
    'SYS:java.lang.RuntimePermission', 'getClassLoader', '' )
    ORA-06512: at "USF.UTL_DBWS", line 193
    ORA-06512: at "USF.UTL_DBWS", line 190
    ORA-06512: at "USF.GET_STOCK_PRICE", line 17Can you please help me with this ?
    Regards,
    Sandeep

    Hi,
    The error message said
    the Permission(java.lang.RuntimePermission getClassLoader) has not been granted to USF.
    I'd follow the suggestion
    The PL/SQL to grant this is dbms_java.grant_permission( 'USF','SYS:java.lang.RuntimePermission', 'getClassLoader', '' )
    In case you have not done so, consult the Callout Users Guide @
    http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
    Kuassi http://db360.blogspot.com

  • How  Stateless Web services requests can be authenticated using HTTP Login

    Hi All,
    How Stateless Web services requests can be authenticated using HTTP Login (with Oracle CRM On Demand Single Sign On (SSO) Token in HTTP Header).
    If there is any code regarding stateless Web services requests to CRMOD please send it to me that will be helpful for me.
    Please help me.
    Thanks,
    Jaysing
    Edited by: 883663 on Sep 19, 2011 12:06 AM

    You cant use stateless web services when you're using SSO. It's called out in the documentation.

  • Can not set up Web Service datastore using HTTPS WSDL DS 4.1

    I have been trying to configure a Web services data store to connect to an HTTPS Wsdl file
    Here is some background.
    DS Version: 14.1.1.210
    Job Server Windows 2008
    if i configure the datastore and leave the field for Keystore path empty, i get the following error:
    Error loading [https://stgbbaaviation.taleo.net/enterprise/soap?ServiceName=CorporateRecruitmentSourceService&wsdl]:
    org.apache.xmlbeans.XmlException: java.io.IOException: Server returned HTTP response code: 401 for URL: https://stgbbaaviation.taleo.net/enterprise/soap?ServiceName=CorporateRecruitmentSourceService&wsdl
    If i put the path C:\Program Files (x86)\SAP BusinessObjects\Data Services\ssl\mds\DSJavaKeyStore.keystore for the keystone path,
    I get the following different error:
    An error ocurred while importing metadata: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at 'https://stgbbaaviation.taleo.net/enterprise/soap?ServiceName=CandidateService&wsdl':javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building faild: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (BODI-1111469) (BODI-1112446)
    I have recreated the DSJavaKeyStore.keystore and added in additional certificates but nothing seems to work.
    As a workaround i saved the wsdl file down to the local machine (I'm currently running designer on the job server machine)
    i can then save the web service datastore and import the wsdl function.  but at runtime I get the following error:
    There is no response for the web service <getMessageByIdentifier>. Ensure that the network, web server, and service are running
    properly. Also ensure that the service client call time out is set properly.
    I have edited the
    C:\Program Files (x86)\SAP BusinessObjects\Data Services\ext\webservice-c\axis2.xml file as follows for the sections that are listed in the documentation:
        <transportReceiver name="https" class="axis2_http_receiver">
            <parameter name="port" locked="false">6060</parameter>
            <parameter name="exposeHeaders" locked="true">false</parameter>
        </transportReceiver>
    <!-- Uncomment the following with appropriate parameters to enable the SSL transport sender.
             Also make sure that the appropriate transport receiver is enabled above.-->
        <transportSender name="https" class="axis2_http_sender">
            <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
            <parameter name="xml-declaration" insert="false"/>
        </transportSender>
        <parameter name="SERVER_CERT">C:\Program Files (x86)\SAP BusinessObjects\Data Services\ssl\server\DS_server_cert.crt</parameter>
        <parameter name="KEY_FILE">C:\Program Files (x86)\SAP BusinessObjects\Data Services\ssl\server\DS_server_privatekey.pem</parameter>
        <parameter name="SSL_PASSPHRASE">C:\Program Files (x86)\SAP BusinessObjects\Data Services\ssl\server\DS_server_privatekey_password.txt</parameter>
    I'm not sure what i'm doing wrong.  Not much detail in the documentation on what to enter for the Keystore path in the Datastore config.
    also it is unclear if i don't have the correct certifications added to the keystore.
    Please help

    Hi Prashant,
    Please refer the below KBA related to BODI-1111469 issue in SAP Data Services 4.1 Support Pack 1 Patch 1 (Version 14.1.1.284).
    ADAPT01664699
    An importing operation from a WSDL that has a recursive import of a schema would fail with the error:  "An error occurred while importing metadata: Unknown JNI error... (BODI-1111469)”. This issue has been fixed in this release.
    1804623 - Release Notes for SAP BusinessObjects Data Services 4.1 Support Pack 1 Patch 1 (Version 14.1.1.284)
    https://service.sap.com/sap/support/notes/1804623
    Thanks,
    Daya

  • How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection

    How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection.
    I have a multiple rows on PDF form. All rows have 4 textfields. I want to submit the multiple rows data to a method defiened in webservice.
    Unable to retrieve the data in multiple rows within webservice method.

    Hi Paul,
    I'm now able to save the retrieved xml in a hidden text field and create dynamic table, and I'm able to fill this table from the XML, but the problem is that I could not find the correct way to loop on the xml, what I'm trying to say, the table will have number of rows with the data of the first row only, so can you tell me the right way to loop on the xml!
    this is my code
    TextField1.rawValue=xmlData.document.rawValue;
    xfa.datasets.data.loadXML(TextField1.rawValue, true, false);
    for(var i=0; i<count; i++)
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Num").rawValue = xfa.datasets.data.record.num.value;
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Name").rawValue = xfa.datasets.data.record.name.value;
    Table1.Row1.instanceManager.addInstance(true);
    Thanks
    Hussam

  • How to invoke a web service asynchronously using ws-addressing model?

    Hi Gurus,
    We are invoking an external web service asynchronously using Oracle Work Flow Business events using the following mechanism -
    1)Created a web service invoker event to invoke the web service.
    2)Created a subscription that invokes the web service (provided the wsdl address, operation info).
    3)Defined a subscription parameter WFBES_CALLBACK_EVENT with value pointing to a recieve event.
    4)Created a receive event(parameter value for WFBES_CALLBACK_EVENT) and a subscription that directs the response to a custom PL/SQL function to process response.
    so far so good. We were able to invoke the web service and get and process the response.
    Problem: The external web service can take upto 10 hrs to process the request. A time out of 2 hrs is set on the server hosting the external web service. So when the external web service takes more than 2 hrs to process the request and it times out and we get the following error on EBS side -
    'l_error_message:oracle.apps.fnd.wf.bes.InvokerException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html; charset=iso-8859-1'
    Now the external web service providers are suggesting that we are not calling their web service asynchronously and we should use ws-addressing model to do so.
    Is there a way to invoke this web service using ws-addressing model using business events or from PL/SQL or OA middle-tier?
    Regards,
    Sunil
    CMRO Development.
    I am providing here the WSDL of the external web service -
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="http://service.sdk.webservices.enigma.com" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax21="http://service.sdk.webservices.enigma.com/xsd" xmlns:ns="http://service.sdk.webservices.enigma.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.sdk.webservices.enigma.com/xsd" xmlns:ax22="http://service.sdk.webservices.enigma.com">
    <xs:import namespace="http://service.sdk.webservices.enigma.com"/>
    <xs:complexType name="JCGWebServicesException">
    <xs:complexContent>
    <xs:extension base="ax22:Exception">
    <xs:sequence>
    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="JCGServiceReply">
    <xs:sequence>
    <xs:element maxOccurs="unbounded" minOccurs="0" name="pdfStatus" nillable="true" type="ax21:PdfStatus"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="PdfStatus">
    <xs:sequence>
    <xs:element minOccurs="0" name="jobCardID" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="pdfPath" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.sdk.webservices.enigma.com" xmlns:ax23="http://service.sdk.webservices.enigma.com/xsd">
    <xs:import namespace="http://service.sdk.webservices.enigma.com/xsd"/>
    <xs:complexType name="Exception">
    <xs:sequence>
    <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="JCGWebServicesException">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="JCGWebServicesException" nillable="true" type="ax21:JCGWebServicesException"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="runJobCard">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="a_WorkpackageFilePath" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="a_userName" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="runJobCardResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="return" nillable="true" type="ax21:JCGServiceReply"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="JCGWebServicesException">
    <wsdl:part name="parameters" element="ns:JCGWebServicesException">
    </wsdl:part>
    </wsdl:message>
    <wsdl:message name="runJobCardResponse">
    <wsdl:part name="parameters" element="ns:runJobCardResponse">
    </wsdl:part>
    </wsdl:message>
    <wsdl:message name="runJobCardRequest">
    <wsdl:part name="parameters" element="ns:runJobCard">
    </wsdl:part>
    </wsdl:message>
    <wsdl:portType name="JCGServicePortType">
    <wsdl:operation name="runJobCard">
    <wsdl:input message="ns:runJobCardRequest" wsaw:Action="urn:runJobCard">
    </wsdl:input>
    <wsdl:output message="ns:runJobCardResponse" wsaw:Action="urn:runJobCardResponse">
    </wsdl:output>
    <wsdl:fault name="JCGWebServicesException" message="ns:JCGWebServicesException" wsaw:Action="urn:runJobCardJCGWebServicesException">
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="JCGServiceSoap11Binding" type="ns:JCGServicePortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="runJobCard">
    <soap:operation soapAction="urn:runJobCard" style="document"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="JCGWebServicesException">
    <soap:fault name="JCGWebServicesException" use="literal"/>
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="JCGServiceSoap12Binding" type="ns:JCGServicePortType">
    <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="runJobCard">
    <soap12:operation soapAction="urn:runJobCard" style="document"/>
    <wsdl:input>
    <soap12:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap12:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="JCGWebServicesException">
    <soap12:fault name="JCGWebServicesException" use="literal"/>
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="JCGService">
    <wsdl:port name="JCGServiceHttpSoap12Endpoint" binding="ns:JCGServiceSoap12Binding">
    <soap12:address location="http://localhost:8080/JCG/services/JCGService"/>
    </wsdl:port>
    <wsdl:port name="JCGServiceHttpSoap11Endpoint" binding="ns:JCGServiceSoap11Binding">
    <soap:address location="http://localhost:8080/JCG/services/JCGService"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Edited by: sikumar on Jun 22, 2010 1:50 PM

    Bharat,
    You dont need a Business Event setup to invoke a BPEL process from PL/SQL unless you have a special case and you need to process the response from the BPEL process in a separate thread (or in background)..
    For a straight call to BPEL process from PL/SQL, here is a sample script -
    function "MYTEST0" return varchar2 AS
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp XMLType;
    i integer;
    helpStr varchar2(30000);
    BEGIN
    soap_request:= '<?xml version = ''1.0'' encoding = ''UTF-8''?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="
    http://xmlns.oracle.com/TestWS">
    <env:Body>
    <ns0:TestWSProcessRequest>
    <ns0:input>abc</ns0:input>
    </ns0:TestWSProcessRequest>
    </env:Body>
    </env:Envelope>
    /* the BPEL process name is TestWS */
    http_req:= utl_http.begin_request
    ( 'http://hostname:7777/orabpel/default/TestWS/1.0'
    , 'POST'
    , 'HTTP/1.1'
    utl_http.set_header(http_req, 'Content-Type', 'text/xml');
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    utl_http.set_header(http_req, 'SOAPAction', 'process');
    utl_http.write_text(http_req, soap_request);
    http_resp:= utl_http.get_response(http_req);
    utl_http.read_text(http_resp, soap_respond);
    utl_http.end_response(http_resp);
    resp:= XMLType.createXML(soap_respond);
    resp:= resp.extract('/soap:Envelope/soap:Body/child::node()',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
    helpStr := '';
    i:=0;
    loop
    helpStr := helpStr || substr(soap_respond,1+ i*255,250);
    i:= i+1;
    if i*250> length(soap_respond)
    then
    exit;
    end if;
    end loop;
    return helpStr;
    END;

  • One project with two different web services styles (JAX-RPC and JAX-WS)

    Hi theres,
    how come the same project doesn't support two different web services styles?
    First time I create a web service proxy using the wizard, the second step is to choose between JAX-RPC and JAX-WS. After that, this step is removed from the wizard and all subsquent web services are assumed to be the same style as the first one.
    Can someone explain me why?
    thanks in advance,
    Manuel Leiria

    Hi,
    yes, I think to remember that there is support for a single style only. If you need another one too then you create a new project.
    Frank

  • Help: Creating web service proxy using JAXB generated domains

    Hi,
    I'm currently doing some investigation considering the use of web services (BPEL) as a complete application backend.
    The application should contain a pojo facade which communicates with some web service proxies. By making a datacontrol
    of the pojo facade, I'm able to expose methods to the client layer.
    I generated my domain objects by using the JAXB Compilation option in JDeveloper. By using that, a java class can be generated
    based on an XSD. Disadvantage of this use, seems to be the fact that the ObjectFactory class, generated by JAXB, is overwritten
    each time I create java classes from an XSD.
    Q1: Is there a solution to prevent the ObjectFactory class to be overwritten? I also could decide not to use it.
    After the domain objects are created, I want to call the actual webservice and receive the response by using the JAXB marshaller
    and unmarshaller. Problem here is:
    Q2: How do I (manually?) create a proxy which calls the web service, by using the domain objects generated by JAXB?
    Q3: An important requirement is that it needs to be simple to switch from several environments (eg from development to test). How
    can I fulfill this requirement in a nice, solid solution?
    Any tips working with web services as the backend layer are welcome!
    JDeveloper 10.1.3.4
    ADF Faces/JSF
    BPEL
    Thanks,
    Koen Verhulst

    repost.

  • Errors creating a Web Service Proxy using Microsoft WSDL.exe tool

    I have deployed a BPEL process using JDeveloper. This process can be invoked from the BPEL console and completes as expected. I am trying to create a Web Service Proxy using the Microsoft WSDL.exe tool so that the process can be invoked from a Microsoft Word document. This process is based on the AutoLoan example in the Developer's Guide for Microsoft Office Interoperability B25781-01.
    WSDL.exe returns the following error message
    Error: There was an error processing 'http://erp.template.co.uk:8889/orabpel/default/HonorariumSmartDoc/1.0/HonorariumSmartDoc?wsdl'.
    - The document at the url http://erp.template.co.uk:8889/orabpel/default/HonorariumSmartDoc/1.0/HonorariumSmartDoc?wsdl was not recognized as a known document type. The error message from each known type may help you fix the problem:
    - Report from 'WSDL Document' is 'There is an error in XML document (19, 7).'.
    - A schema with the namespace '' has already been added.
    - Report from 'DISCO Document' is 'Discovery document at the URL http://erp.template.co.uk:8889/orabpel/default/HonorariumSmartDoc/1.0/HonorariumSmartDoc?wsdl could not be found.'.
    - The document format is not recognized.
    - Report from 'XML Schema' is 'Expected Schema root. Make sure that the root element is <schema> and the namespace is 'http://www.w3.org/2001/XMLSchema' for an XSD schema or 'urn:schemas-microsoft-com:xml-data' for an XDR schema. An error occurred at , (2, 2).'.
    How do I resolve this error?

    The WSDL file is below.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions name="HonorariumSmartDoc" targetNamespace="http://xmlns.oracle.com/HonorariumSmartDoc" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/HonorariumSmartDoc" xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/HonorariumSmartDoc">
    - <types>
    - <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/HonorariumSmartDoc" schemaLocation="HonorariumSmartDoc.xsd" />
    </schema>
    - <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://schemas.xmlsoap.org/ws/2003/03/addressing" schemaLocation="http://erp.template.co.uk:8889/orabpel/xmllib/ws-addressing.xsd" />
    </schema>
    </types>
    - <message name="HonorariumSmartDocResponseMessage">
    <part name="payload" element="tns:HonorariumSmartDocProcessResponse" />
    </message>
    - <message name="HonorariumSmartDocRequestMessage">
    <part name="payload" element="tns:HonorariumSmartDocProcessRequest" />
    </message>
    - <message name="WSARelatesToHeader">
    <part name="RelatesTo" element="wsa:RelatesTo" />
    </message>
    - <message name="WSAReplyToHeader">
    <part name="ReplyTo" element="wsa:ReplyTo" />
    </message>
    - <message name="WSAMessageIDHeader">
    <part name="MessageID" element="wsa:MessageID" />
    </message>
    - <portType name="HonorariumSmartDocCallback">
    - <operation name="onResult">
    <input message="tns:HonorariumSmartDocResponseMessage" />
    </operation>
    </portType>
    - <portType name="HonorariumSmartDoc">
    - <operation name="initiate">
    <input message="tns:HonorariumSmartDocRequestMessage" />
    </operation>
    </portType>
    - <binding name="HonorariumSmartDocBinding" type="tns:HonorariumSmartDoc">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="initiate">
    <soap:operation style="document" soapAction="initiate" />
    - <input>
    <soap:header message="tns:WSAReplyToHeader" part="ReplyTo" use="literal" encodingStyle="" />
    <soap:header message="tns:WSAMessageIDHeader" part="MessageID" use="literal" encodingStyle="" />
    <soap:body use="literal" />
    </input>
    </operation>
    </binding>
    - <binding name="HonorariumSmartDocCallbackBinding" type="tns:HonorariumSmartDocCallback">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="onResult">
    <soap:operation style="document" soapAction="onResult" />
    - <input>
    <soap:header message="tns:WSARelatesToHeader" part="RelatesTo" use="literal" encodingStyle="" />
    <soap:body use="literal" />
    </input>
    </operation>
    </binding>
    - <service name="HonorariumSmartDocCallbackService">
    - <port name="HonorariumSmartDocCallbackPort" binding="tns:HonorariumSmartDocCallbackBinding">
    <soap:address location="http://set.by.caller" />
    </port>
    </service>
    - <service name="HonorariumSmartDoc">
    - <port name="HonorariumSmartDocPort" binding="tns:HonorariumSmartDocBinding">
    <soap:address location="http://erp.template.co.uk:8889/orabpel/default/HonorariumSmartDoc/1.0" />
    </port>
    </service>
    - <plnk:partnerLinkType name="HonorariumSmartDoc">
    - <plnk:role name="HonorariumSmartDocProvider">
    <plnk:portType name="tns:HonorariumSmartDoc" />
    </plnk:role>
    - <plnk:role name="HonorariumSmartDocRequester">
    <plnk:portType name="tns:HonorariumSmartDocCallback" />
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>

  • Any difference in creating a web service from a java class or session bean?

    Hi,
    The JDeveloper tutorial at http://www.oracle.com/technology/obe/obe1013jdev/10131/devdepandmanagingws/devdepandmanagingws.htm demonstrates creating a web service from a plain java class. I'm wondering:
    - Is it possible to create a web service from a stateless session bean instead of a java class? If so, what's the proper way to do this in JDeveloper? When I tried doing so in JDeveloper 10.1.3.0.4 (SU5) using the J2EE Web Service wizard, the wizard did not list the session bean in the Component To Publish dropdown (it does list any java classes available in the project). I can proceed by manually typing in the name of the session bean. After the wizard completes though, the @Stateless annotation that had been in my session bean class code is removed and replaced by a @WebService annotation. The end result is that it looks like it made no difference whether I had tried to create the web service from a session bean or plain java class as the annotations in the resulting web service code are the same (although if I had started from a session bean, the class for the web service still implements the Local/Remote EJB interface that the session bean originally implemented).
    - Assuming it's possible to create a web service from a stateless session bean, is there any advantage/disadvantage creating a web service from a java class vs a stateless session bean? I'm creating the web service from scratch so I also need to either build the java class or stateless session bean the web service would be based on from scratch too.
    Thanks for any ideas about this.

    Hi,
    EJB Session beans (EJB 3.0) are deployed as WebServices by annotating the class with @WebService and the methds with @WebMethod (both tags require you to add the JSR-181 library to your project (available in the JDeveloper list of libraries)). Unlike the J2E WebService, the EJB session bean service is turned into a WebService upon deployment. This means you obtain teh WSDL file after deployment
    - Assuming it's possible to create a web service from a stateless session bean, is there any advantage/disadvantage creating a web service from a java class vs a stateless session bean?
    The difference is that EJB Session bean based web services are integrated with the J2EE container, which means that they can leverage container services like transaction handling, data sources, security, JMS etc.
    Frank

  • Web service call using javascript

    Hi All,
    I am working on web service call using javascript. I used below code while calling web service on click event of button.
    var e;
    try
         var oListURL = "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL";
         SOAP.wireDump = true;
         var service = SOAP.connect(oListURL);
         xfa.host.messageBox(service.toString());
         if(typeof service != "object")
              xfa.host.messageBox("Couldn't connect to " + oListURL);
         if(!service.ConversionRate(138,56))
              xfa.host.messageBox("The ConversionRate method does not exist on the service at " + oListURL);
         //call the service
         var svcResponse = service.ConversionRate(138,56);
         xfa.host.messageBox(svcResponse.toString());
         if(!svcResponse)
              xfa.host.messageBox("The service returned nothing");
    catch(e)
         xfa.host.messageBox("Exception: " + e);
    I do not get any response for it. I always get "0" as response.
    How do i passed session id to soap header while calling web service in designer??
    Is there any other adobe javascript with which i can call web service as well as i may able to provide session id to its soap header.
    Request you all to share any information regarding this.
    Thanks in advance.
    Regards
    Abhishek

    Hi Abhishek,
    This service seems to take the country codes as parameters, not the numerics 138,56, and I have always passed in the parameters as xml.
    So I have just tried;
    var svcResponse = service.ConversionRate("<FromCurrency>AUD</FromCurrency><ToCurrency>NZD</ToCurrency>");
    and got a response
    1.2557
    Which is about right.
    Hope this helps
    Bruce

  • Issue with creating Web Service Client using Oracle JDeveloper

    Hi All,
    I am trying to create a Web Service Client using Oracle JDeveloper. I set the Project compiler property to JRE 1.4
    When I run the web service client, it throws me bunch of errors saying:
    'Error(32,2): annotations are not supported in -source 1.4'
    I am wondering why JDeveloper is using annotations even after I set the compiler property to 1.4
    I am following this link to create the webservice client:
    http://www.oracle.com/technetwork/developer-tools/forms/webservices-forms-11g-094111.html
    Any help in this regard would be greatly appreciated.
    Thanks,
    Scott.

    Dear Shay,
    Thanks for your prompt response.
    You are right. JDeveloper 11g uses JDK 6 style annotations for the clients it creates. But you can change the JRE Version used at compile time by following these steps:
    1. In the Applications Navigator, right-click the Project Nanem node and select Project Properties... from the context menu.
    2. Select the Compiler node and check the Source Files and Generated Class Files dropdown lists. You may change these versions depending on the version of the JRE you are using with Forms to ensure that the compiled
    classes from JDeveloper can be read by the JRE used by Form.
    So I selected JDK version 1.4 there.
    Sorry that I did not mention that we are using Oracle Forms 10g. That is the reason I selected JDK 1.4
    Thank you.
    Scott.

  • Problem creating web service client using WSM Policies

    Hello everyone,
    I'm trying to make a simple java client to a Web Service secured using a WSM 11gR1 policy (from Soa Suite 11.1.1.2.0). The policy on the server side is oracle/wss11_x509_token_with_message_protection_service_policy which I attached via the Weblogic Admin Console. To implement the client I'm trying to follow the instructions from this documentation: http://download.oracle.com/docs/cd/E15523_01/web.1111/e13713/owsm_appendix.htm#WSSOV386 section "Policy Configuration Overrides for the Web Service Client" and also I'm using OEPE 11.1.1.3.0 (Eclipse 3.5.0) to develop the client. The only weblogic jar I've added to the build path is the weblogic.jar . Unfortunately, the oracle.wsm.security.util.SecurityConstants.ClientConstants interface (used in the example A-6) is not included in this jar and I have no idea what other libraries should I include in order to follow the example. I tried manualy adding other jars but without success. In fact I found one jar which includes this interface, the wsm-secpol.jar but it does not have the properties described in the documentation, so I guess it's not the right jar, and also I don't think this is the right procedure since there might be another dependent jars. So I would like to know what libraries exactly I should add to the build path (or some other procedure if you noticed I'm doing anything wrong)
    Thank you !

    Hi
    I am having the same problem almost where i wrote a client to comsume a JWS server in https. Where the server is setup to require a certificate to connect to.
    My code:
    public static void main(String[] args) {
    try {
    DataBaseSyncServerImpl port = new DataBaseSyncServerImplService().getDataBaseSyncServerImplPort();
    int number1 = 20;
    int number2 = 10;
    System.out.printf("Invoking divide method(%d, %d)\n", number1, number2);
    double result = port.divide(number1, number2);
    System.out.printf("The result of dividing %d and %d is %f.\n\n", number1, number2, result);
    when run this code throw
    run:
    [java] Invoking divide method(20, 10)
    [java] Exception in thread "main" javax.xml.ws.WebServiceException: HTTP transport error: javax.net.ssl.SSLHandshak
    eException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCert
    PathBuilderException: unable to find valid certification path to requested target
    Does any one know how can I solve this problem or how can I make the client be able to use self signed certificates. Any help is greatly apprecited. Thanks

Maybe you are looking for