Using pl/sql functions for transformation

How can I use pl/sql functions in the transformation mapping field for my interface?
I have a name field where firstname and lastname are concatenated via a space-character and I would like to extract this 'name' field to 2 separate database attributes.
This means that I need to use a function that uses SUBSTRING and INSTR to be able to get the firstname and lastname separatly out of the name-field.
The INSTR-function isn't known inside the expression editor in ODI so I'm wondering how I can use my own function?

Hi Romanna,
Are you sure? Where did you do your transformation?
-Source, Staging area or Target
I try this on Oracle target...
FIRST_NAME = substr(MYTABLE.FIRST_LASTNAME, 1, instr(MYTABLE.FIRST_LASTNAME, ' ')-1)
LAST_NAME = substr(MYTABLE.FIRST_LASTNAME,instr(MYTABLE.FIRST_LASTNAME, ' ')+1)

Similar Messages

  • Using pl/sql function for each day between two dates.

    Hi,
    create TABLE EMP(
    ID_EMP NUMBER,
    DT_FROM DATE,
    DT_TO DATE,
    CREATE_DATE DATE);
    into EMP(ID_EMP, DT_FROM, DT_TO, CREATE_DATE)
    Values(100, TO_DATE('07/01/2008 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('04/30/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),TO_DATE('05/08/2009 14:11:21', 'MM/DD/YYYY HH24:MI:SS'));
    I have a function called  elig_pay_dates(date p_date), which returns the code for  person payment eligibility for a particular date. For paid dates it's 'P' and for unpaid dates it's 'N'.
    How can I check this function between two dates for each day. Example : 07/01/2008 to 04/30/2010.
    By using this function with select I needs to display the dates when there is a change in status.
    I am expecting data in following manner from above logic(this is example):
    07/01/2008 --- 07/01/2009 ---'P'
    07/02/2009 -- 07/25/2009 ----'N'
    07/26/2009 -- 01/01/2010 ---'P'
    01/02/2010 -- 01/13/2010 --'N'
    01/14/2010 -- 01/18/2010 --'P'
    01/19/2010 -- 04/30/2010 -- 'N'
    I thought of looping for each day date but that seems to be expensive for online application. Is there any way that I can achieve this requirement with sql query ?
    Thanks for your help,

    Certainly not the best way to code the requirement, but it does achieve the result you are looking for in a fairly quick time
    create or replace
    function test_ret_paid_unpaid (p_date in date)
    return varchar2
    is
      v_ret     varchar2(1);
    begin
      if ( (p_date between to_date('07/02/2009', 'MM/DD/YYYY') and to_date('07/25/2009', 'MM/DD/YYYY') ) or
           (p_date between to_date('01/02/2010', 'MM/DD/YYYY') and to_date('01/13/2010', 'MM/DD/YYYY') ) or
           (p_date between to_date('01/19/2010', 'MM/DD/YYYY') and to_date('04/30/2010', 'MM/DD/YYYY') )
        then v_ret := 'N';
      else
        v_ret := 'Y';
      end if;
      return v_ret;
    end;
    Wrote file afiedt.buf
      1  with get_paid_unpaid as
      2  (
      3    select dt_from start_date, dt_to end_date, dt_from + level - 1 curr_date, test_ret_paid_unpaid(dt_from + level - 1) paid_unpaid,
      4           row_number() over (order by dt_from + level - 1) rn_start,
      5           row_number() over (order by dt_from + level - 1 desc) rn_end
      6      from test_emp
      7    connect by level <= dt_to - dt_from + 1
      8  ),
      9  get_stop_date as
    10  (
    11  select start_date init_date, end_date, curr_date, paid_unpaid,
    12         case when paid_unpaid != lag(paid_unpaid) over (order by curr_date) or rn_start = 1 or rn_end = 1
    13          then curr_date
    14          else null
    15         end start_date,
    16         case when paid_unpaid != lead(paid_unpaid) over (order by curr_date) or rn_start = 1 or rn_end = 1
    17          then curr_date
    18          else null
    19         end stop_date
    20    from get_paid_unpaid
    21  )
    22  select period, paid_unpaid
    23    from (
    24  select init_date, curr_date, start_date, end_date, stop_date,
    25         case when paid_unpaid = lead(paid_unpaid) over (order by curr_date)
    26                then nvl(start_date, init_date) || ' - ' || lead(stop_date, 1, end_date) over (order by curr_date)
    27              else null
    28         end period,
    29         paid_unpaid
    30    from get_stop_date
    31   where stop_date is not null or start_date is not null
    32         )
    33*  where period is not null
    12:06:10 SQL> /
    PERIOD                                             PAID_UNPAID
    01-JUL-08 - 01-JUL-09                              Y
    02-JUL-09 - 25-JUL-09                              N
    26-JUL-09 - 01-JAN-10                              Y
    02-JAN-10 - 13-JAN-10                              N
    14-JAN-10 - 18-JAN-10                              Y
    19-JAN-10 - 30-APR-10                              N
    6 rows selected.
    Elapsed: 00:00:00.35

  • Error using Extended SQL Function substr

    I want to be able to look for the first three letters of a month in the XML and if found replace the 3 letter month (for example SEP-05 to September 05). I have tried the following which throw a namespace exception. Please let me know what I may be doing wrong?
    1. <?if:(xdofx:substr(../fsg:ColContext[2]/fsg:ColHeadLine2,1,3)='SEP'?>September<?end if?> should give me September.
    The above fails with: Font Dir: E:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\fonts
    Run XDO Start
    RTFProcessor setLocale: en-us
    FOProcessor setData: E:\Work\Bacardi\Reports\XML\US GAAP BALSHEET\XML BL Dir Rpt BS YTD_0126.xml
    FOProcessor setLocale: en-us
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:514)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:192)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:156)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:916)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:869)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:204)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1535)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:925)
         at RTF2PDF.runRTFto(RTF2PDF.java:590)
         at RTF2PDF.runXDO(RTF2PDF.java:443)
         at RTF2PDF.main(RTF2PDF.java:237)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'xdofx' used but not declared.
         at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:782)
         at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:564)
         ... 15 more
    2. For the year, I would use another form field and do something like this next to the month above: <?xdofx:substr(../fsg:ColContext[2]/fsg:ColHeadLine2,5,2)?> for a result of '05'

    Hasan
    XSL has many native string manipulation functions so you do not need to use our SQL functions when a native XSL one will do:
    <?if:substring(normalize-space(../fsg:ColContext[2]/fsg:ColHeadLine2),1,3)='SEP'?>September<?end if?>
    See that dang normalize space function again ... had to use it on my FSG sample.
    Would it not be easier to either:
    1. Have the FSG generate the September YYYY format or
    2. Have FSG generate XSD date formats, 'YYYY-MM-DD', then you can just specify the date format in the form fields
    Regards, Tim

  • How to use Pl/Sql function in Discoverer report

    Hi Everybody,
    Would you be able to provide a workflow/guidance how to use sql function in Discoverer right from creating the function using PLSQL Developer.
    (I am new to Oracle environment... prev. worked as analyst with Microsoft Access... took PL/Sql class in school a few years ago)
    We are using Discoverer Desktop.
    a) Just emailed dba for permission to create pl/sql function.
    b) Recently got Discoverer Administrator installed on my pc.
    can you pls add to the list:
    c)....
    d)....
    etc.?
    tx for your help, sandra

    Hi Kranthi,
    Thx for your warm words....
    The links you provided are great! Thx soooo much!
    Thanks to you and the rest of forum members, am able to use what you've all taught me
    with other Discoverer reports.... so i was able to do more on my own....
    About a month ago, I got access to Discoverer Admin, and was able to paste SQL to create a custom folder.
    Then i joined the custom folder to an existing baseline folder.
    I have found that sometimes when I use calc within a calc when the calcs use analytic functions, that Discoverer
    just displays null in the column. I thought that maybe instead I could create my own function as a work-around.
    I wrote IT for permissions to create views, functions etc. Hopefully, they'll approve and can move toward learning
    pl/sql functions for Discoverer.
    tx again, sandra

  • How to process validations using PL/SQL function

    Hi.
    I created a page with a form to process DML operations against a database table. Also created a validation using PL/SQL function that returns a boolean value:
    declare
    v_dummy varchar2(1)
    begin
    select 'X'
    into v_dummy
    from s_customer
    where id = :p2_id;
    return (TRUE);
    exception
    when no_data_found then
    return (FALSE);
    when others
    return (TRUE);
    end;
    In this case i want to send a message to the user indicating that an certain row (the one with :p2_id value) already exists in the database. The piece of code above will do the job. If this function returns true, it means the row is in the DB already.
    The problem is that i don´t know what do to or how to tell htmldb that a TRUE value should issue a message or be processed as en error, whilst a FALSE means OK.
    How do i tell htmldb what to do?
    Suppose must do something with "expression 1" , "expression 2", etc.
    Any ideas???

    Hóla LuÃs,
    when you pick the PL/SQL function body returning a boolean, it implicitly means that TRUE means OK, while FALSE means error, always.
    In order to associate such error to a given form field, you have to go back to the page definiton / validations and specify the name of the item in the corresponding field.
    When you first create the validation rule, this value is not present even if you ask for the error message inline with the field.
    The error message text can be specified in the validation definition, if I am not wrong.
    When you need to return special error messages, including dynamic content for instance, you can use the Function Returning Error Message type, which reports an error when the string returned by the function is not null. This comes in handy when you want to display an item's code, for example, rather than generic text.
    Even in this case, you must go back to the validation and specify the name of the field if you want to see it inline.
    Hope it helps,
    Flavio

  • How to Use the language function for assignment and validation

    Hi All,
    If anyone can explain me in details with example ,how to use the language function for assignments and validations?
    Thanks
    Arnab

    Hi Arnab,
    The expression is checked only for the current MDM session.
    If u login with the ABC language it will always show the ABC language no matter how many times u execute it.
    Try connecting to the DM with the XYZ language.
    It should go to the if part rather than else.
    Hope it helps.
    Thanks,
    Minaz

  • I have Ps CS4.  I run Apple OS X 10.9.5  on a new MacPro 3GHz 8-core Intel Xeon E5 - 64 GB.    I hardly ever use CS4 ( preferring Elements for my low level needs), but I now want to use it's function for stitching together a landscape.  I fire it up and g

    I have Ps CS4.  I run Apple OS X 10.9.5  on a new MacPro 3GHz 8-core Intel Xeon E5 - 64 GB.    I hardly ever use CS4 ( preferring Elements for my low level needs), but I now want to use it's function for stitching together a landscape.  I fire it up and get Error 150:30 with the suggestion to contact you  - hence this message

    I have Ps CS4.  I run Apple OS X 10.9.5  on a new MacPro 3GHz 8-core Intel Xeon E5 - 64 GB.    I hardly ever use CS4 ( preferring Elements for my low level needs), but I now want to use it's function for stitching together a landscape.  I fire it up and get Error 150:30 with the suggestion to contact you  - hence this message

  • How to use query-database() function in transformation?

    Hi All,
    How to use query-database() function in transformation?
    It is giving four fields but if i write select query in sqlquery field it is saying select node is not found....
    plz help me out
    Regards
    Pavankumar
    Edited by: [email protected] on Jul 29, 2009 2:49 AM

    Hi,
    To answer your query:-
    http://abhishek-soablog.blogspot.com/2008/08/orclquery-database.html
    Cheers,
    Abhi...

  • How to use Spell-check functionality for textbox (like Orkut, gtalk)

    How to use Spell-check functionality for tex Hello Friends,
    I am working on a JSP application. I wanted to add Spell check for text box like we have here, when we post a message. It automatically shows red line under the word, when ever spelling is wrong. Please tell me how I can do this. If possible, the code too.
    Thanks.

    I believe the spell checking you see here, or on any other site, is the spell checking built into Firefox. At least that's what I see. Are you using Firefox?

  • Built in SQL Function for Sum of Geometric Progression

    Hi all,
    Please let me know if there is any availble built in SQL function for
    SUm of Geometric Progression.
    Thanks in Advance,
    Kaushik B.

    and also relatively simple to write:
    s = a*(1-power(r,n+1))/(1-r)
    assuming you have a row with values of a,r and n (and that's the sum you need)
    Jon

  • Problem in using query-database() function in Transformation

    Hi All,
    I am using JDev and SOA 10.1.3.4.
    I have an async process.
    In that I am doing a transformation in which source is InputVariable and target is result.
    In Transformation I am using query-database function to fetch a record from DB and am assigning that to result.
    *<xsl:value-of select='orcl:query-database(concat("select ename from emp where empid=",/ns1:DBXSLProcessRequest/ns1:input),false(),false(),"jdbc:oracle:thin:scott/tiger@localhost:1521:abcd")'/>*
    I am not getting any error but query-database is not returning any thing I maen it is returning null.
    If i run that query in SQL prompt it is returning the empname.
    Please help me out.
    Regards
    PavanKumar.M

    Hi Pavan
    I tried following in BPEL transform actvity's XSL file, and it works fine and returns the sysdate for me.
    <xsl:value-of select='orcl:query-database("select sysdate from dual",false,false,"jdbc/myDS")'/>
    Can you try above in new XSL file of Transform activity and let me know its gives you the result? if it works you can start making changes according to your requirement.
    steps to follow:
    1.create connection pool in EM, and make sure its working fine by using test on connection pool.
    2.create Datasource and point to above created connection pool. and restart the oc4j_soa
    3.rename the xsl file name of transform activity in BPEL and use above query-database function.some times xsl files are cached even if you make changes it will not take effect so for testing if you rename it will be good.
    Thanks
    Seshagiri.Rayala
    http://soabpel.wordpress.com/

  • How do i use PL/SQL function in filter operator

    Hi,
    i want to use one pl/sql function in filter operator. how do i use it in filter condition.
    error i am getting is
    " error occured during expression validatation.
    my filter condition is
    INOUTGRP1.LAST_UPDATE_DATE > "GET_LAST_UPDATE_DATE"()
    can any one suggest me what is the problem for this error.
    Regards,
    Jyothy

    I tried and getting the same error. don't know why!!
    However, There is another way of accomplishing it.
    You can add a "Mapping Input Parameter" to your mapping and in the default value field call the function "Get_Last_Update_date". Then add the output field from this operator to the filter operator. Then edit the filter condition to replace the function call with output value from the Input parameter operator.
    This should work...

  • Displaying diff dates using PL/SQL expression for 'display only' item ?

    Hi ,
    I am having a display only item -- :P2_FROM_Date . If its Thu,Fri,Sat or Sun I want to set the date as the last Monday's date . If its Mon,Tue or Wed then it should be the present Monday's date .
    E.g: Today is Friday and the last Monday was on 18th .
    So for yesterday , today,tomorrow and Sunday , the date should be displayed as 18-JUN-2012.
    From the coming Monday to Wednesday , the date should of be the coming Monday i.e , 24-JUN-2012
    I tried it doing under 'Source ' of item using PL/SQL expression and PL/SQL function body. Not working
    Can someone help ?
    Thanks & Regards
    Umer

    Nice1 wrote:
    declare
    lv_date number;
    begin
    select to_char(sysdate,'D') into lv_date from dual;
    if lv_date=2 then
    :P2_FROM_DATE := to_char(sysdate-1);
    end if;
    end;I tried this under " PL/SQL function body " in "Source " tab of the item P2_FROM_DATE
    When I run this , nothing is displayed corresponding to the item P2_FROM_DATEExactly as expected. This code will only set a value for <tt>P2_FROM_DATE</tt> when run on Mondays in territories where the first day of the week is Sunday, and when run on Tuesdays where Monday is the first day of of the week:
    SQL> var P2_FROM_DATE varchar2(30)
    SQL> alter session set nls_date_format='Dy DD-MON-YYYY';
    Session altered.
    SQL> select sysdate from dual
    SYSDATE
    Mon 25-JUN-2012
    SQL> alter session set nls_territory='AMERICA';
    Session altered.
    SQL> declare
      2  lv_date number;
      3  begin
      4  select to_char(sysdate,'D') into lv_date from dual;
      5  if lv_date=2 then
      6  :P2_FROM_DATE := to_char(sysdate-1);
      7  end if;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> print p2_from_date
    P2_FROM_DATE
    Sun 24-JUN-2012
    SQL> alter session set nls_territory='UNITED KINGDOM';
    Session altered.
    SQL> exec :p2_from_date := null
    SQL> declare
      2  lv_date number;
      3  begin
      4  select to_char(sysdate,'D') into lv_date from dual;
      5  if lv_date=2 then
      6  :P2_FROM_DATE := to_char(sysdate-1);
      7  end if;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> print p2_from_date
    P2_FROM_DATE
    SQL>Hence the questions about language above.
    >
    I am having a display only item -- :P2_FROM_Date . If its Thu,Fri,Sat or Sun I want to set the date as the last Monday's date . If its Mon,Tue or Wed then it should be the present Monday's date .
    E.g: Today is Friday and the last Monday was on 18th .
    So for yesterday , today,tomorrow and Sunday , the date should be displayed as 18-JUN-2012.
    From the coming Monday to Wednesday , the date should of be the coming Monday i.e , 24-JUN-2012
    >
    The coming Monday is 25-JUN-2012.
    Aren't these rules equivalent to "Monday this week, where Monday is the first day of the week"? In which case the PL/SQL Expression you require is:
    trunc(sysdate, 'iw')For example:
    SQL> with t as (
      2    select date '2012-06-21' + level d from dual connect by level <= 17)
      3  select
      4            d
      5          , trunc(d, 'iw')  monday
      6  from
      7            t;
    D               MONDAY
    Fri 22-JUN-2012 Mon 18-JUN-2012
    Sat 23-JUN-2012 Mon 18-JUN-2012
    Sun 24-JUN-2012 Mon 18-JUN-2012
    Mon 25-JUN-2012 Mon 25-JUN-2012
    Tue 26-JUN-2012 Mon 25-JUN-2012
    Wed 27-JUN-2012 Mon 25-JUN-2012
    Thu 28-JUN-2012 Mon 25-JUN-2012
    Fri 29-JUN-2012 Mon 25-JUN-2012
    Sat 30-JUN-2012 Mon 25-JUN-2012
    Sun 01-JUL-2012 Mon 25-JUN-2012
    Mon 02-JUL-2012 Mon 02-JUL-2012
    Tue 03-JUL-2012 Mon 02-JUL-2012
    Wed 04-JUL-2012 Mon 02-JUL-2012
    Thu 05-JUL-2012 Mon 02-JUL-2012
    Fri 06-JUL-2012 Mon 02-JUL-2012
    Sat 07-JUL-2012 Mon 02-JUL-2012
    Sun 08-JUL-2012 Mon 02-JUL-2012
    17 rows selected.
    SQL> alter session set nls_territory='AMERICA';
    Session altered.
    SQL> alter session set nls_date_format='Dy DD-MON-YYYY';
    Session altered.
    SQL> with t as (
      2    select date '2012-06-21' + level d from dual connect by level &lt;= 17)
      3  select
      4            d
      5          , trunc(d, 'iw')  monday
      6  from
      7            t;
    D               MONDAY
    Fri 22-JUN-2012 Mon 18-JUN-2012
    Sat 23-JUN-2012 Mon 18-JUN-2012
    Sun 24-JUN-2012 Mon 18-JUN-2012
    Mon 25-JUN-2012 Mon 25-JUN-2012
    Tue 26-JUN-2012 Mon 25-JUN-2012
    Wed 27-JUN-2012 Mon 25-JUN-2012
    Thu 28-JUN-2012 Mon 25-JUN-2012
    Fri 29-JUN-2012 Mon 25-JUN-2012
    Sat 30-JUN-2012 Mon 25-JUN-2012
    Sun 01-JUL-2012 Mon 25-JUN-2012
    Mon 02-JUL-2012 Mon 02-JUL-2012
    Tue 03-JUL-2012 Mon 02-JUL-2012
    Wed 04-JUL-2012 Mon 02-JUL-2012
    Thu 05-JUL-2012 Mon 02-JUL-2012
    Fri 06-JUL-2012 Mon 02-JUL-2012
    Sat 07-JUL-2012 Mon 02-JUL-2012
    Sun 08-JUL-2012 Mon 02-JUL-2012
    17 rows selected.Also note that using the item source properties will only set the <tt>P2_FROM_DATE</tt> in the rendered page, not in session state.

  • Using HANA SQL Functions in select list of CDS Views

    Dear Expert,
    Kindly please let me know if we can use the HANA SQL Function (Ex: ADD_DAYS, SECONDS_BETWEEN) in the select list of CDS Views?
    If I create a CDS like below I get error that timestamp is not supported.
    For Example:
    @AbapCatalog.sqlViewName: 'ZMR_H_CA'
    @EndUserText.label: 'CAG A'
    define view viewname
    with parameters start_ts:abap.dec( 15, 0 ) , end_ts:abap.dec( 15, 0 )
    as select from table {
    key resource_key,
    TO_TIMESTAMP(begtstmp) as start_tmp,
    TO_TIMESTAMP(begtstmp) as end_tmp
    where
    (begtstmp > $parameters.start_ts or endtstmp > $parameters.start_ts )
    and
    (begtstmp < $parameters.end_ts or endtstmp < $parameters.end_ts )
    Thanks,
    Giri

    Hi Giri,
    the list of provided features can be found in the ABAP Language Documentation (F1 in the CDS View).
    As CDS in ABAP is abstracted from the database layer, the database features are not directly accessible. That means, you cannot use any HANA or MaxDB feature available. So the answer to your question is no. The reason for this is, that ABAP CDS views can be created on all SAP-supported databases, hence, we can only provide those features, supported by all databases.
    Having said this, there are some exception, e.g. the CDS views with input parameters, which are not supported by all databases. In these cases, you'd have to additionally use the utility class CL_ABAP_DBFEATURES (see http://scn.sap.com/community/abap/blog/2014/10/10/abap-news-for-740-sp08--abap-core-data-services-cds) for more details.
    Best,
      Jasmin

  • XMLType schema detail lost in pl/sql function for a jdeveloper webservice

    If I write a very simple pl/sql procedure to wrap as a web service to return the XML from an XMLtype table column, the jdeveloper (11.1.1.3) web service generation process seems to ignore the detail
    of the registered XMLTypes' schema, and converts the 'output' to an xsd:string in the generated WSDL file, which has knock on effect that generated data controls are 'dumb' in only seeing output as a string, and providing no real data functionality at XML schema level. Since I know web service data controls work fine when provided with the correct level of detail in the WSDL, what am I missing in terms of pursuading jdeveloper to generate wsdl's with full xsd schema info for the return XMLType?
    This is my table:
    ID NOT NULL NUMBER(12)
    SPEC SYS.XMLTYPE(XMLSchema "http:
    //localhost:8080/public/demo
    /xsd/sample2.xsd" Element "b
    ooks") STORAGE BINARY
    PRD_ID NOT NULL NUMBER(10)
    ISSUE NOT NULL NUMBER(6)
    EDIT_NO NOT NULL NUMBER(6)
    PUBLISHED_BY_PEO_ID NUMBER(10)
    PUBLISHED_ON_DT DATE
    EFFECTIVE_FROM_DT NOT NULL DATE
    EFFECTIVE_TO_DT DATE
    =======================================================
    This is the XML Schema:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="urn:books"
    xmlns:bks="urn:books">
    <xsd:element name="books" type="bks:BooksForm"/>
    <xsd:complexType name="BooksForm">
    <xsd:sequence>
    <xsd:element name="book"
    type="bks:BookForm"
    minOccurs="0"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="BookForm">
    <xsd:sequence>
    <xsd:element name="author" type="xsd:string"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="genre" type="xsd:string"/>
    <xsd:element name="price" type="xsd:float" />
    <xsd:element name="pub_date" type="xsd:date" />
    <xsd:element name="review" type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:string"/>
    </xsd:complexType>
    </xsd:schema>
    =================================================
    This is the pl/sql:
    function GetSpecificationById (p_spec_id in NUMBER) return XMLType
    IS
    l_specification sys.XMLType;
    BEGIN
    select specification
    into l_specification
    from specifications
    where id = p_spec_id;
    return l_specification;
    EXCEPTION
    WHEN OTHERS THEN -- handles all other errors
    ROLLBACK;
    END GetSpecificationById;
    ==============================================
    And this is the generated WSDL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions
    name="MyWebService1"
    targetNamespace="http://devsafetrytrailcom/MyWebService1.wsdl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://devsafetrytrailcom/MyWebService1.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    >
    <wsdl:types>
    </wsdl:types>
    <wsdl:message name="MyWebService1_getspecificationbyid">
    <wsdl:part name="pSpecId" type="xsd:decimal"/>
    </wsdl:message>
    <wsdl:message name="MyWebService1_getspecificationbyidResponse">
    *<wsdl:part name="result" type="xsd:string"/>*
    </wsdl:message>
    <wsdl:portType name="MyWebService1">
    <wsdl:operation name="getspecificationbyid" parameterOrder="pSpecId">
    <wsdl:input message="tns:MyWebService1_getspecificationbyid"/>
    <wsdl:output message="tns:MyWebService1_getspecificationbyidResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="MyWebService1" type="tns:MyWebService1">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getspecificationbyid">
    <soap:operation soapAction="http://devsafetrytrailcom/MyWebService1.wsdl/getspecificationbyid"/>
    <wsdl:input>
    <soap:body use="literal"
    namespace="http://devsafetrytrailcom/MyWebService1.wsdl"
    parts="pSpecId"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"
    namespace="http://devsafetrytrailcom/MyWebService1.wsdl"
    parts="result"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="MyWebService1">
    <wsdl:port name="MyWebService1Port" binding="tns:MyWebService1">
    <soap:address location="http://localhost:7101/SafetyTrail-Model-context-root/MyWebService1Port"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Edited by: user592403 on Jul 26, 2010 9:57 AM

    Anyone seen this problem before??

Maybe you are looking for

  • Should I get a new Macbook pro?

    Hey there, I have had my white Macbook for over three years now. First of all, it runs really sluggish most times now. I mean, I'm still able to use it, however, it is significantly slower than when I first got it. The disc drive no longer works, and

  • Help!  I no longer have the email address for my itunes account and cannot verify Apple ID

    I am trying to log into my itunes account and it tells me I need to verify my account by logging into my email.  My AppleID is an old email account that I can no longer access.  I want to log in to itunes to update my email account on file, but when

  • FM to get mail id from user name

    Hi I need a Function module which will give me the mail id for the user name . Regards Vikas Edited by: vikas maurya on Jan 18, 2008 7:33 AM

  • GoLive on MacBook Pro

    I have been running GoLive on my Powerbooks since v.4.0 with no problems. Now I have an Intel Macbook Pro and updated the OS to Leopard and GoLive remains dormant when launched i.e. the icon appears in the Dock and jumps around for a while then nothi

  • Learning Map html error

    Hi, im having this problem with Learning maps, and cant figure out what is the problem, I keep having the same error message: "Logon Error Message" "http://sci.itsgroup.com.br:8000/sap/bc/solman/defaultUser/LearningMap/start.htm wurde abgebrochen, da