Creating Web service for PL/SQL Procedure with Complex Data Types

I need to created web service for PL/SQL Procedure with Complex Data types like table of records as parameters, how do we map the pl/sql table type parameters with web service, how to go about these?

Hello,
When you are creating a service from a Stored Procedure, the OracleAS WS tools will create necessary Java and PL wrapper code to handle the complex types (table of record) properly and make them compatible with XML format for SOAP messages.
So what you should do is to use JDeveloper or WSA command line, to create a service from your store procedure and you will see that most of the work will be done for you.
You can find more information in the:
- Developing Web Services that Expose Database Resources
chapter of the Web Service Developer's guide.
Regards
Tugdual Grall

Similar Messages

  • Creating web service from pl/sql procedure

    Hello.
    I need to create a web service from pl/sql procedure and i chose JDeveloper for this implementation. I have wsdl, but I never created web services. So, I created web service with document/literal message format.
    But I have several troubles:
    1. All element names have lower case letters.
    2. The SOAP envelope must begin from words soapenv:Envelope but i have soap:Envelope.
    3. And operation name has tail like "Element".
    I know bad way for implement 1 and 3 points. It's a modification of java_wsdl_mapping.xml and wsdl files. But if I want to add new method to my service all changes will be cleaned. It's not critical but inconvenient to support.
    But for point 3 i have no ideas.
    This task is very important for me. Can somebody help me?
    JDeveloper 10.1.3.3
    Regards,
    Aleksey

    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    Frank

  • Consuming an ASP web service which responds with complex data types...

    Here's my problem - I'm trying to consume a web service from a provider that uses complex data types.
    The starting part of the WSDL looks like this (I've not included the whole thing) - named have been changed to protect the innocent:
    <wsdl:definitions targetNamespace="http://domain_name">
    <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://domain_name">
    <s:element name="Authentication">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="Token"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="AuthenticateResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="AuthOK" type="s:int"/>
    <s:element minOccurs="0" maxOccurs="1" name="Token"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    Since it's a complexType return, with a sequence, I'd expect an array or structure returned, but instead I just get the "AuthOK" value, and no way to get anything else.
    Here are the ways I've tried calling it:
    <cfscript>
        WS = createObject("webservice", "https://WSDL_URL");
        WS_ret = WS.Authentication(Username = "username", Password = "password", Token = "");
    </cfscript>
    <cfdump var="#WS_ret#" />
    <cfinvoke webservice="WSDL_URL" method="Authentication" returnVariable="WS_ret">
        <cfinvokeargument name="userID" value="7253320" />
        <cfinvokeargument name="password" value="ctpjxs3" />
        <cfinvokeargument name="SecurityToken" value="" />
    </cfinvoke>
    <cfdump var="#WS_ret#" />
    Any ideas how I can get the other variables in the sequence? I have other calls after this that have a much larger amount of variables, and as such I can't use it without being about to get more of the

    Thanks for the reply.
    If I CFDUMP the variable it returns just "1", no XML tags, nothing at all around the data - according to the web service providers they say that they are supplying the Token part as long as the first variable is "1" (a logical true if the authentication passed). If it is "0" then no Token is returned, that is why it's optional.
    As for the CFdocs issue, look here:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=webservices_25.html
    The paragraph before it (about 2/3 down the page) states:
    In this example, the operation updateEmployeeInfo takes a complex type as input and returns a complex type as output. To handle the input parameter, you create a structure. To handle the returned value, you write it to a ColdFusion variable, as the following example shows:
    It even states that you call "updateEmployeeInfo", and nowhere mentions "echoStruct" as a method - it's seemingly been put in as a random method name, or a function call for something else. The WSDL above the example only mentions "updateEmployeeInfo" and "updateEmployeeInfoSoapOut", again not mentioning "echoStruct".
    I see this as an error in the docs as it's calling a non-existant entity in the WSDL, which should cause a run-time error.

  • Working with complex data types in web services ...

    Hi All,
    I have created a webservice and created an interface for that in ADF. Now as my web service returns a complex data type, i followed the steps given in this article "http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html" and it works fine, my results also get displayed. But only issue is i get a warning "JBO-25009: Cannot create an object of type:java.util.calendar with value:2008-09-23T23:51:30.000+05:30" and if i replace all the java.util.Date with oracle.jbo.domain.Date then i get a warning "JBO-25009: Cannot create an object of type:oracle.jbo.domain.Date with value:2008-09-23T23:51:30.000+05:30". Now i am unable to understand this although i believe it is a data type mapping issue, but not sure how to rectify it.
    Anybody knows the wayout?
    Regards
    Lokesh

    Andre,
    Thanks for youe response. I also tried makeing data type as string in place of date in data control.xml and it worked fine. So it confirms that i am facing with exactly similar issue as yours.
    I tried solution 2 mentioned in Frank's mail but its not helping[in fact i am already using web proxy as i am delaing with complex data types]. I created a web proxy and in java bean i placed break points to check the control flow[in order to check the root cause] but control never reaches the java bean!! I am not sure about the cause for it...control should pass through java bean isn't it??
    I am quite new to SOA...so can somebody just elaborate on how to rectify this using web proxy. I have been using this rl "http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html" to work with web proxies" to work with proxies.
    Regards
    Lokesh

  • Issue in creating web service for a ABAP Function Module

    Hi,
    now i'm learning how to create web service for a ABAP Function Module. I used the following steps.
    1. select the Function Module, named "zws_test".
    2. in the context menu, select "create->proxy object". so we enter into wizard.
    3. in the wizard, press the radio button "Service Provider".
    4. in the next page, press the radio button "Existing ABAP Objects(Inside Out)".
    5. In the next page, Enter the "zws_test_prvider" as Service Definition and select "Function Module" as Endpoint Type.
    6. in the next page, enter "zws_test" as Function Module and mark the "Mapping der Namen" button
    7. in the next page,select "PRF_DT_IF_SEC_LOW" as Profile and mark "Deploy Service".
    8. Save in the local package.
    9. then it will pop up a window with title "WSDL Source". i selected "URL/HTTP Destination" and press "OK".
    10.in the next page, i enter the URL as "http://hostname:portnumber/", and press "OK".
    11. then it will pop up a window with title "Display logs". A record with error message "HTTP error(return code 404, message "Not found")" appears.
    12. i press "ok" and a service provider with name "zws_test_prvider" appears in my local package.
    13. i use "zws_test_prvider"'s URL to create a service consumer "ZCO_WS_TEST_CONSUMER" and logic portal "LP1".
    14. But when i test my service consumer "ZCO_WS_TEST_CONSUMER", it will throw an exception "cx_ai_system_fault" with errortext "SOAP:14 Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/".
    15. I use t-code SM59 to test connection  and get the following info.
          Status HTTP Response     200
          Status Text                      OK
          Duration Test Call             328 ms.
    who can give me the reasons about item 11 and 14, and explain me how to create service provider and service consumer for a Function Module.
    Thanks in advance
    Johnney

    have you seen this weblog
    /people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices

  • XI for create web servicies for SAP R/3 4.6C

    Hi All,
    we are implementing PM (Plant Management) module of SAP R/3 4.6C and we have the necessity to create web services for some PM functionalities. Infact we need to integrate our SAP R/3 4.6C with other applications (non-SAP) through TIBCO (it's mandatory). So we think to use SAP XI. Moreover our users don't want to use SAP GUI for the accessing to the PM functionalities but they want an UI more friendly. So we think to use SAP EP.
    Which is your opinion about this architectural scenario? Is it possible to fulfil the requirement of our business users with a more simple architectural solution (for example with WEB DYNPRO)?
    Many thanks in advance for your collaboration.
    Regards,
    Bob

    Infact we need to integrate our SAP R/3 4.6C with other applications (non-SAP) through TIBCO (it's mandatory). So we think to use SAP XI.
    TIBCO is another middleware. So once you expose your R/3 functionalities as web service, you may directly use TIBCO to integrate and XI won't be required at all.
    Moreover our users don't want to use SAP GUI for the accessing to the PM functionalities but they want an UI more friendly.
    WebDynpro application would provide you an easy GUI and could act as Soap client as well to send data.
    Regards,
    Prateek

  • How to create web service for a Java class in SAP NetWeaver Studio

    hi all,
    i am using SAP Netweaver Developer Studio.have created a normal java project and i want to create web service for one of the classes in this project. i used the  Web Service Creation Wizard to create a web service for this class. but it says there's no methods available for VI. all my methods in this class are public, what should i do?

    Hi,
    I guess there are other ways. But this is an easy way, if you find the right wizards.
    Besides this it is good practise to define interface methods so that session bean implement these interface methods, and thus seperate the interface from the implementation.
    In this approach you will need 3 projects:
    An enterprise application project (will contain EJB Module)
    An EJB Module project (will contain session bean)
    A Java project (contains code that implements the session bean methods)
    In my previous post I suggested to use a J2EE web mudule project. This was a mistake, it should be EJB module.
    But it should be possible to do it in another way. It is up to you.
    Good luck, Roelof

  • Call a method with complex data type from a DLL file

    Hi,
    I have a win32 API with a dll file, and I am trying to call some methods from it in the labview. To do this, I used the import library wizard, and everything is working as expected. The only problem which I have is with a method with complex data type as return type (a vector). According to this link, import library wizard can not import methods with complex data type.
    The name of this method is this:   const std::vector< BlackfinInterfaces::Count > Counts ()
    where Count is a structure defined as below:
    struct Count
       Count() : countTime(0) {}
       std::vector<unsigned long> countLines;
       time_t countTime;
    It seems that I should manually use the Call Library Function Node. How can I configure parameters for the above method?

    You cannot configure Call Library Function Node to call this function.  LabVIEW has no way to pass a C++ class such as vector to a DLL.

  • Support for Creating Web Service from pl/sql package in JDeveloper 11

    We have been creating all of our web services from pl/sql packages in our Oracle database using JDeveloper 10.1.3.1. I understand that this capability is not supported in Jdev 11. We have been mandated to either move up to JDeveloper 11, or consider switching to eclipse, or even VS2008 and run .NET services from IIS. I have seen work-around solutions using TopLink and Jdev 11. Are there plans to revive this feature in the near future? We're now looking at switching to .NET since we could scrap our OAS instances and use IIS to publish web services. The only reason we were sticking with Oracle was the ease in converting all our existing package to web services with Jdev.
    Is anyone else in the same situation. If so, what solutions are you considering?

    Hi,
    there are a lot of option to make plsql web services .
    First you can stay with jdev 10.1.3
    Use the xmldb servlets
    use jdev 11g tp4 to create plsql ws and upgrade to jdev 11g production
    And I think in the next release of jdev it will be back , there are more options which disappeared like the adf bc sdo ws or jmx datacontrol etc.
    thanks Edwin

  • How to create web service for database application

    Hi everyone
    Is it possible to create a web service for an apex database application page which has reports and radio fields and dialog boxes and validations in it. IF it is possible to create, pls help me with example or step by step procedure. I have seen all oracle docs of implementation of Web services in apex but unable to figure out how to get that link of wsdl for an application.
    Thanks in advance.
    Regards
    Sandeep Artham

    Hi,
    I guess there are other ways. But this is an easy way, if you find the right wizards.
    Besides this it is good practise to define interface methods so that session bean implement these interface methods, and thus seperate the interface from the implementation.
    In this approach you will need 3 projects:
    An enterprise application project (will contain EJB Module)
    An EJB Module project (will contain session bean)
    A Java project (contains code that implements the session bean methods)
    In my previous post I suggested to use a J2EE web mudule project. This was a mistake, it should be EJB module.
    But it should be possible to do it in another way. It is up to you.
    Good luck, Roelof

  • Urgent: Calling web service from PL/SQl fails with XML parsing

    Hi,
    I am trying to call a web service from PL/SQL (using SOAP protocol and UTL_HTTP built in Package).I am using Oracle 9i .I am calling from pl/sql block invoking web service method created in java.
    I am getting the below response object as a SOAP protocol, but i couldn't able to parse the SOAP.
    Could you please provide the values of FirstName, LastName and ErrorDescription
    declare
    request_env varchar2(32767);
    v_xml XMLTYPE;
    l_user_first_name varchar2(100);
    l_user_last_name varchar2(100);
    l_error_value varchar2(100);
    begin
    response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
    <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
    <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
    <axis2ns1:ErrorDescription />
    </UserInfoObjResponse>
    </soapenv:Body>
    </soapenv:Envelope>';
    dbms_output.put_line('Length of Request:' || length(response_env));
    dbms_output.put_line ('Request: ' || response_env);
    v_xml := XMLTYPE(response_env);
    -- SELECT EXTRACTVALUE(v_xml, '//UserInfoObjResponse/FirstName') INTO l_user_fast_name varchar2(100); FROM DUAL;
    dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
    dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
    dbms_output.put_line ('l_error_value: ' || l_error_value);
    end;

    In Oracle 9i:
    SQL> declare
      2    response_env varchar2(32767);
      3    v_xml XMLTYPE;
      4    l_user_first_name varchar2(100);
      5    l_user_last_name varchar2(100);
      6    l_error_value varchar2(100);
      7  begin
      8    response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      9                     <soapenv:Body>
    10                       <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
    11                         <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
    12                         <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
    13                         <axis2ns1:ErrorDescription />
    14                       </UserInfoObjResponse>
    15                     </soapenv:Body>
    16                   </soapenv:Envelope>';
    17
    18    dbms_output.put_line('Length of Request:' || length(response_env));
    19  --  dbms_output.put_line ('Request: ' || response_env);
    20
    21    v_xml := XMLTYPE(response_env);
    22
    23    select EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:FirstName/text()') first_name,
    24           EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:LastName/text()') last_name,
    25           EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:ErrorDescription/text()') error_description
    26      into l_user_first_name, l_user_last_name, l_error_value
    27      from dual;
    28
    29    dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
    30    dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
    31    dbms_output.put_line ('l_error_value: ' || l_error_value);
    32  end;
    33  /
    Length of Request:530
    l_user_first_name: First Name Output
    l_user_last_name : Last Name Output
    l_error_value:
    PL/SQL procedure successfully completed.In Oracle 10g:
    SQL> declare
      2    response_env varchar2(32767);
      3    v_xml XMLTYPE;
      4    l_user_first_name varchar2(100);
      5    l_user_last_name varchar2(100);
      6    l_error_value varchar2(100);
      7  begin
      8    response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      9                     <soapenv:Body>
    10                       <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
    11                         <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
    12                         <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
    13                         <axis2ns1:ErrorDescription />
    14                       </UserInfoObjResponse>
    15                     </soapenv:Body>
    16                   </soapenv:Envelope>';
    17
    18    dbms_output.put_line('Length of Request:' || length(response_env));
    19  --  dbms_output.put_line ('Request: ' || response_env);
    20
    21    v_xml := XMLTYPE(response_env);
    22
    23    select r.*
    24      into l_user_first_name, l_user_last_name, l_error_value
    25    from XMLTABLE('/' PASSING v_xml
    26                  COLUMNS
    27                  first_name varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:FirstName/text()',
    28                  last_name varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:LastName/text()',
    29                  error_description varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:ErrorDescrition/text()'
    30                  ) r;
    31
    32    dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
    33    dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
    34    dbms_output.put_line ('l_error_value: ' || l_error_value);
    35  end;
    36  /
    Length of Request:530
    l_user_first_name: First Name Output
    l_user_last_name : Last Name Output
    l_error_value:
    PL/SQL procedure successfully completed.Max
    http://oracleitalia.wordpress.com
    Edited by: Massimo Ruocchio on Feb 14, 2010 11:55 PM
    Added the first one.

  • Creating web service for bapi and consume in portal.

    Hi ,
    I am new to Web Services. This is my requirement I need to publish the functionality of bapi as a web service and consume the web service from portal side.
    I have followed these steps to create web service.In transaction se80 i have created service definiton and a wsdl file is generated.
    When i am exporting that WSDL file and creating a model in a webdynpro project. I am getting the following error. I dont know how to proceed further.Error while loading WSDL.Check error log for more details.
    Whether the proxies need to be generated?What is the purpose of it? Where the proxies need to be generated?
    Is Process integration needed to use web services?
    Kindly guide me how to proceed.
    Best Wishes
    Idhaya R

    the proxy is the object that make possible to use the service; even if service and consumer are on the same host, you need a proxy to use it.
    try to check this blog
    /people/thomas.jung/blog/2007/12/17/consuming-services-with-abap

  • Can't create web service for other servers

    I am trying to create EJB web service for JBoss 4.0 but getting error in "build-impl.xml " file on the following line
    "<taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">"
    Is there any way to create an web service for another servers.
    OR
    Is there any way to configure "wscompile" tool to generate the web service for other servers
    It would be of greate help if any-body responds
    thanks in advance
    parag

    Hi,
    The following article
    http://developers.sun.com/prodtech/javatools/jsenterprise/reference/docs/jse7/jse7_jboss_plugin.html
    describes how to configure the JSE IDE to develop and deploy a J2EE application on a JBoss Application Server by using the JBoss plug-in.
    Hope this helps.
    Radhika

  • Calling a Web Service from PL/SQL Procedure

    How can you call a web service from a pl/sql package , also is it valid to call a web service from pl/sql according to Fusion Standards..

    Hi,
    On way we can call a web service is to pass the Web Service URL to UTL_HTTP package:
    Sample Web Service URL
    ===================
    lv_url :=
    'http://67.97.189.151:8888/plsqlsample/dbfunc?invoke=placeOrder'
    || '&'
    || 'param0=1'
    || '&'
    || 'param1=1'
    || '&'
    || 'param2=1';
    Sample Call using UTL_HTTP
    =====================
    SELECT UTL_HTTP.request (lv_url)
    INTO lv_result
    FROM DUAL;
    Thank you.
    Regards,
    Balu

  • ++Custom Serialization with Complex Data type (Nested Classes)

    Hi,
    We have a scenario wherein we need to write CUSTOM SERIALIZERS for complex datatypes like INVOICE & ORDER (INVOICE inturn has ADDRESS type among others, ORDER has ADDRESS type, a COLLECTION of type ORDERITEM each of which are Java Classes in themselves)
    The example of Custom Serializer given in the SOA AS Dev Guide http://download.oracle.com/docs/cd/B31017_01/web.1013/b28975/custserial.htm#CFHHIBCA)
    shows only a simple java type used for serialization and deserialization.
    Can anyone please help us out by sharing any example depicting the CUSTOM SERIALIZERs for COMPLEX DATA TYPES?
    Thanks in advance,
    Pavan.

    Hello,
    Could you please post the code of your classes in the forum (at least the interfaces) ?
    Regards
    Tugdual Grall

Maybe you are looking for