Creating Web services using JDeveloper for Pl/SQL package having ref cursor

Hi,
I am trying to create web services for PL/SQL package in JDeveloper. When I am trying to create this web service, the functions in the package which is returning referential cursor or record cursor are not visible. When I highlight the function and click "Why Not?", it displays the message "The following types used by the program unit do not have an XML schema mapping and/or serializer Specified: REF CURSOR". Could you please let me know, how I can create this web service?
I am getting similar error when I am trying to create web service for a package with overloaded functions also.
Thanks,

Ok so I played around with this some more. I created the same process in bpel using oracle bpel designer and here are the results.
1. Against 10g database running a synch process data is retutned without error.
2. Against 9i database running an asynch process data is retutned without error.
3. Against 9i database running a synch process data is retutned with error.
I'm definilty missing something.

Similar Messages

  • Creating Web Services using Java Implementation

    Hi,
    This is quite a general question on how to create a Web Service using Java Implementation that needs to conform to a client XML schema.
    Here are my Version specs,
    I am using Jdeveloper 10.1.3.4.0 and deploying onto OAS 10.1.3.
    I will be creating a J2ee 1.4 (JAX-RPC) Web Service using Document/Wrapped style.
    I have been provided an XML schema from the client which is quite complex.
    Using a top-down approach, I can create my WSDL file and import the XML Schema for my type definitions.
    The Web service aim is to accept some parameters and return some data from the Oracle Database. The
    XML response from the web service must conform to the element, attribute definitions in the provided XML schema.
    From a Java implementation approach, what is the best (simplest or quickest) way to retrieve data from the Oracle
    tables and map each fields/column to the required XML output (defined in the XML schema).
    I'm not too concerned with using Java to retrieve data from the Database, more with how I can map the data returned
    to the required output. Can this mapping task be controlled within the Java program?
    Thanks in advance.

    Hi,
    This is quite a general question on how to create a Web Service using Java Implementation that needs to conform to a client XML schema.
    Here are my Version specs,
    I am using Jdeveloper 10.1.3.4.0 and deploying onto OAS 10.1.3.
    I will be creating a J2ee 1.4 (JAX-RPC) Web Service using Document/Wrapped style.
    I have been provided an XML schema from the client which is quite complex.
    Using a top-down approach, I can create my WSDL file and import the XML Schema for my type definitions.
    The Web service aim is to accept some parameters and return some data from the Oracle Database. The
    XML response from the web service must conform to the element, attribute definitions in the provided XML schema.
    From a Java implementation approach, what is the best (simplest or quickest) way to retrieve data from the Oracle
    tables and map each fields/column to the required XML output (defined in the XML schema).
    I'm not too concerned with using Java to retrieve data from the Database, more with how I can map the data returned
    to the required output. Can this mapping task be controlled within the Java program?
    Thanks in advance.

  • Adding Authentication to Web Service using JDeveloper

    Hi Gurus,
    I am new to weblogic 10.3 and Jdeveloper 11.1.3. Using Jdeveloper, I imported few packages from database , right clicked and published them as a webservice on a weblogic server. I did not select any WLS policies. The web service is working fine. Now i want to add some basic authorization (username/password) to this webservice.
    Which policy should i use ?
    Where should i configure this username\password so that all the webservices uses same user for authenctication ? Do i have to create this user on the weblogic server? If yes then how.
    Thanks in Advance.
    Jack

    Hi,
    If you are using JAXWS based WebService then you can give it a try:
    http://weblogic-wonders.com/weblogic/2010/01/09/username-token-in-jaxws-webservice/
    This sample demonstrates ..How we can use UserName/Password Authentication in JAXWS Service. This will be very Easy for you to develop using JDeveloper...U need to Just the add Following XML file as a Policy inside your Application.
    Using the following Policy:
    <font color=maroon>
    <?xml version=”1.0″?>
    <wsp:Policy
    xmlns:wsp=”http://schemas.xmlsoap.org/ws/2004/09/policy”
    xmlns:sp=”http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512″>
    <sp:SupportingTokens>
    <wsp:Policy>
    <sp:UsernameToken
    sp:IncludeToken=”http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512/IncludeToken/AlwaysToRecipient”>
    <wsp:Policy>
    <sp:WssUsernameToken10/>
    </wsp:Policy>
    </sp:UsernameToken>
    </wsp:Policy>
    </sp:SupportingTokens>
    </wsp:Policy>
    </font>
    Thanks
    Jay SenSharma

  • Create web service using java class

    Hi,
    I created the web service using java class then i deployed this web service in to the weblogic admin server.when i tested this process it is working fine.
    when I tested The generated WSDL to this process in browser(IE). it is not working.
    I need to to invoke this webservice from another BPEL but this WSDL is not working.

    Hi,
    when i created the webservice in jdeveloper by default it is connected to integrated weblogic server and generates this wsdl.
    http://localhost:7101/helloApplication-javaexcel-context-root/MyWebService1Soap12HttpPort?WSDL
    then I deployed this webservice in to the Adminserver.it gives the following URL.
    http://192.168.56.1:7001/extracExcelToCSV-extractExcelToCSV-context-root/ExtractExcelToCSVSoap12HttpPort?wsdl
    This URL is not working but when i tested this process it is working fine.
    It is giving below error when i try to invoke from jdeveloper
    Error while reading wsdl file
    caused by:java.net.connectExcepption :Connection timed out:connect

  • Create Web service using nwds

    Dear all,
           steps for create web service in nwds 7.01
    Regards,
    Antony.A

    Please check this. http://scn.sap.com/community/java/blog/2013/10/16/create-simple-web-service-to-save-data-in-java-table-using-ejb-and-jpa

  • How to Create web service using JMS with PUB/SUB pattern.

    Hi All,
    I need to expose web service using JMS with PUB/SUB pattern.
    if you have any source for this.
    I tried to use @WLJmsTransport annotation but unable to get it done.
    I have configured all JMS server, topic, and connection factory.
    Thanks.

    Hi, I am having web sample web service program which is simple one.
    But I need to Modify this to JMS enable.
    Can any one help me?
    Thanks.

  • Books and resources teaching J2EE 5 (and creating web services using it)

    Hi!
    I'm starting a new job next week, developing a J2EE 5 system. I have a solid background in J2SE 1.4 and know most of the new syntactical and semantic stuff in J2SE 5.
    What I need is a good book teaching J2SE 5 to someone inexperienced with J2SE in general. There isn't a need for me to study J2SE 1.4 as we won't be using it. Also, we will develop some web services using the platform. As time is of the essence I'd prioritize learning about those within the platform, at first.
    I don't need to read the entire book in one week, of course. But I need something to study and also have as a reference by my side when programming.
    As the offerings in J2SE 5 books seems quite low, I need some advice from you, more experienced people. What book or web resource do you recommend? Thank you for your time reading this post!
    Best Regards,
    Kent

    Hello Kent!
    I have found "Enterprise JavaBeans 3.0" by by Richard Monson-Haefel and Bill Burke really interesting. If you have some knowledge about Java EE in general go for it it's really good one!

  • How to create Web Services Using EP7

    Hi
    I got a chance to work on Web Service using EP7 and i am new to web services
    This is the first time i am working on Web Services
    so please can you guide me where to start and how to start.
    if possible reffer some links regarding web services.
    regards
    mmukesh

    Hi Mukesh,
    Please refer to the document
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60046fb9-ac5b-2910-08a6-b7b04b463c62
    Thanks
    Sarang

  • Problem with XSU when trying to execute pl/sql package returning ref cursor

    Hi,
    I'm exploring xsu with 8i database.
    I tried running sample program which I took from oracle
    documentation. Here is the details of these.
    ------create package returning ref cursor---
    CREATE OR REPLACE package testRef is
         Type empRef IS REF CURSOR;
         function testRefCur return empRef;
    End;
    CREATE OR REPLACE package body testRef is
    function testRefCur RETURN empREF is
    a empREF;
    begin
    OPEN a FOR select * from emp;
    return a;
    end;
    end;
    ---------package successfully created-----
    Now I use java program to generate xml data from ref cursor
    ------------java program ----------
    import org.w3c.dom.*;
    import oracle.xml.parser.v2.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    import java.io.*;
    public class REFCURt
    public static void main(String[] argv)
    throws SQLException
    String str = null;
    Connection conn = getConnection("scott","tiger"); //
    create connection
    // Create a ResultSet object by calling the PL/SQL function
    CallableStatement stmt =
    conn.prepareCall("begin ? := testRef.testRefCur();
    end;");
    stmt.registerOutParameter(1,OracleTypes.CURSOR); // set
    the define type
    stmt.execute(); // Execute the statement.
    ResultSet rset = (ResultSet)stmt.getObject(1); // Get the
    ResultSet
    OracleXMLQuery qry = new OracleXMLQuery(conn,rset); //
    prepare Query class
         try
    qry.setRaiseNoRowsException(true);
    qry.setRaiseException(true);
    qry.keepCursorState(true); // set options (keep the
    cursor alive..
         System.out.println("..before printing...");
    while ((str = qry.getXMLString())!= null)
    System.out.println(str);
         catch(oracle.xml.sql.OracleXMLSQLNoRowsException ex)
    System.out.println(" END OF OUTPUT ");
    qry.close(); // close the query..!
    // qry.close(); // close the query..!
    // Note since we supplied the statement and resultset,
    closing the
    // OracleXMLquery instance will not close these. We would
    need to
    // explicitly close this ourselves..!
    stmt.close();
    conn.close();
    // Get the connection given the user name and password..!
    private static Connection getConnection(String user, String
    passwd)
    throws SQLException
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@xxxx:1521:yyyy",user,passwd);
    return conn;
    when I ran the program after successful compilation,I got the
    following error
    ==========
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException:
    1
    at oracle.xml.sql.core.OracleXMLConvert.getXML(Compiled
    Code)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLString
    (OracleXMLQuery.java:263)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLString
    (OracleXMLQuery.java:217)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLString
    (OracleXMLQuery.java:194)
    at REFCURt.main(Compiled Code)
    ============================
    Can anybody tell me why I'm getting this error.Am I missing any
    settings?
    thanks

    We are using 8.1.7 Oracle db with latest xdk loaded.
    am I missing any settings?

  • Develop PLSQL web services using JDeveloper.

    Dear Sir,
    1. Must we use OC4J to generate PLSQL webservices? or we can use any other J2EE compliant app server?
    2. Does it mean in Oracle environment, we can only use JAVA and not other language to wrap PLSQL stored procedures to create PLSQL web services?
    Please advise.
    Thank you.

    You don't need OC4J - you can use JDeveloper to generate Web services from PL/SQL
    You can manuall wrap PL/SQL into web services with any language - however JDeveloper uses Java to do this without the need for you to code anything.

  • Implementation of Asynchronous Web Services using JDeveloper

    Various articles and tutorials, which I have read, are talking about asynchronous BPEL processes. These asynch BPEL processes are result of the orchestration of different synch and asynch atomic services (web services in specific). There are even tutorials as part of Oracle SOA Suite and JDeveloper explaining how to consume asynchronous services in a BPEL process. Well and good.
    But unfortunately I haven’t seen any tutorial or article talks about the implementation of asynchronous web services (How to implement an asynchronous service?). All what they talk about is the consumption side of it and the applicability of WS-Addressing or Correlation ID for the consumption of the Service.
    As part of my research, I delved further into the sample BPEL processes comes out with Oracle BPEL Process Manager. For example; I have had a look into the Asynchronous Loan Processor process, where it is orchestrating a Synch Credit Rating Service and three asynch services namely Star Loan, United Loan and American Loans. But as I delved down into those, I realized that these services are simply BPEL Processes where it is implemented as a sequence of Receive, Assign and Invoke activities, where each of the activities does the following.
    Receive -- Receives the request from the client
    Assign -- Does some manipulation on the Input variable and set the output variable
    Invoke -- Invokes the client back (call back)
    These kinds of asynch services are pretty fine to demonstrate theory.
    But if we put ourselves more into practical scenarios, where we invoke a service from some application and the result of that invocation shall happen after some time (minutes to hours) in the form of a callback. In that case we WON’T be able to realize the service simply by a simple BPEL Process, rather we will have to implement as a Web Service with two port types implemented, where one port type is for the request and another one for the callback.
    I do understand these kinds of services can be implemented using JAX-WS.
    Question Here: How I do it using Oracle JDeveloper and Oracle Application Server???
    If anyone have done it, the REAL implementation of ASYNCH Web Services *(NOT BY USING BPEL or BPEL Wrapper)* using JDeveloper to deploy on Oracle Application Server or on Oracle SOA Suite, please post the know-how. If someone else is interested in taking it forward, we can take it further together.
    -Sudheer
    P.S: I am NOT at all interested in theory, as I had enough. Here I don’t want to be Conceptual; rather I am talking about hands-on.

    Hi Sudheer,
    I am not sure if this will help you
    If you take Oracle SOA Suite Order Booking Tutorial and go to Chapter 5 Creating the CreditService Project ( http://download.oracle.com/docs/cd/B31017_01/core.1013/b28937/creditservice.htm ), you learn how to create a synchronous Web service from a WSDL file.
    If you take the wsdl and delete output and fault tags (you can see it below) and follow the steps you'll generate an asynchronous web service.
    The generated Java method will be a void method
    public class ValidateCreditCardImpl {
    public void verifyCC(CreditCard creditCard) {
    Inside this void method you can try to call to a Receive BPEL Activity.
    I hope this will be useful . Regards,
    J
    <definitions targetNamespace="http://www.globalcompany.com/ns/credit"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://www.globalcompany.com/ns/credit"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:types="http://www.globalcompany.com/ns/credit.xsd">
    <types>
    <schema targetNamespace="http://www.globalcompany.com/ns/credit.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <complexType name="CreditCard">
    <sequence>
    <element name="ccType" type="string"/>
    <element name="ccNum" type="string"/>
    </sequence>
    </complexType>
    <element name="CreditCard" type="types:CreditCard"/>
    <element name="valid" type="boolean"/>
    <element name="error" type="string"/>
    </schema>
    </types>
    <message name="CreditCardValidationRequestMessage">
    <part name="CreditCard" element="types:CreditCard"/>
    </message>
    <message name="CreditCardValidationResponseMessage">
    <part name="valid" element="types:valid"/>
    </message>
    <message name="CreditCardValidationFaultMessage">
    <part name="error" element="types:error"/>
    </message>
    <portType name="ValidateCreditCard">
    <operation name="VerifyCC">
    <input message="tns:CreditCardValidationRequestMessage"
    name="CreditCardInfo"/>
    </operation>
    </portType>
    <binding name="ValidateCreditCardSoapHttp" type="tns:ValidateCreditCard">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="VerifyCC">
    <soap:operation soapAction="http://www.globalcompany.com/ns/credit/VerifyCC"/>
    <input name="CreditCardInfo">
    <soap:body use="literal" parts="CreditCard"/>
    </input>
    </operation>
    </binding>
    <service name="CreditService">
    <port name="ValidateCreditCardServiceSoapHttp"
    binding="tns:ValidateCreditCardSoapHttp">
    <soap:address location="http://localhost:8888/CreditService"/>
    </port>
    </service>
    </definitions>
    Edited by: user10262974 on 30-mar-2009 16:19

  • Creating Web Services using Netbeans GUI only

    Hi all,
    Creating, deploying & testing simple web-services through Netbeans point-n-click interface is quite simple (demo at: http://download.java.net/javaee5/screencasts/hello-simple-glassfish/). The demo shows a very simple service creation scenario, accepting and returning String types only. The service can easily be tested using the GUI option 'Test Web Service', which simply test the service through a simple web page at http://localhost:8080/MyWebApplication/MyWebService?Tester
    In a similar manner, I am trying to implement a web service (a little complex one, accepting and returning custom types) using Netbeans GUI only. Versioning information I am using are as follows:
    NetBeans IDE 6.1
    Sun Java System Application Server 9.1_02 (build b04-fcs)
    JAX-WS 2.1.3.1
    Roughly speaking, the service's method signature I am using is shown below:
    public abstract myclass.X MyService.serviceMethod( myclass.X )
    Since it uses a custom type in parameter and return-types, the web-based test doesn't work any more. I wrote a separate client class to invoke the service using client-side stub classes (suppose to be generated by JAX-WS generated classes). The client code looks like as follows:
    public class ServiceClient {
         public static void main(String[] args) {
              MyService srv = new MyService ().getMyServicePort();
              X xin= new X();
              X xout= srv.serviceMethod( xin );
              System.out.println( "Result: "+ xout.toString());
    Netbeans shows a compiler error on "MyService srv = new MyService ().getMyServicePort();
    Is it possible to get it resolved without making use of ant scripts for generating client-side artifacts (stubs etc.)?
    Thanks,
    irfan

    Hello Sandy,
    Have you installed the Sun Java System App Server or JWSDP? If so, please make sure that one of the libraries in your Netbeans project contains the jaxrpc-api and jaxrpc-impl jars (which seem to be necessary to run wscompile).
    Netbeans ("standalone") doesn't seem to install the jaxrpx libraries and other jars required to compile and run webservices.
    Regards,
    Jonatan

  • Cant create Web services using netbeans 5.5

    I tried lots of tutorials to create a simple web service but i couldn't make it to run.
    I am using
    IDE :NB 5.5.
    App servers: SJSAS9 and Apache Tomcat 5.5.17
    JDK 1.5 available
    Apart from these do i have to use any other plug in.
    i need to continue with this sample application.
    http://www.netbeans.org/kb/55/websvc-jax-ws.html
    please help this is the complete code, and giving error once i tried to run the web service.
    package org.me.calculator;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    @WebService()
    public class CalculatorWS
         * Web service operation
        @WebMethod
        public int add(@WebParam(name = "i") int i, @WebParam(name = "j") int j)
           int k = i + j;
            return k;
    Error is:
    init:
    deps-module-jar:
    deps-ear-jar:
    deps-jar:
    library-inclusion-in-archive:
    library-inclusion-in-manifest:
    compile:
    compile-jsps:
    do-dist:
    dist:
    In-place deployment at D:\NetBeans\WS\CalculatorWSApplication\build\web
    Start registering the project's server resources
    Finished registering server resources
    moduleID=CalculatorWSApplication
    deployment started : 0%
    Deploying application in domain failed; com.sun.tools.apt.Main.process(Lcom/sun/mirror/apt/AnnotationProcessorFactory;[Ljava/lang/String;)I
    D:\NetBeans\WS\CalculatorWSApplication\nbproject\build-impl.xml:453: Deployment error:
    The module has not been deployed.
    See the server log for details.
    BUILD FAILED (total time: 1 second)
    Please help, i am really stucked here.

    which app server did u deploy yr web service into?
    SJSAS9 or Tomcat?I am using SJSAS9.
    did u receive any java exceptions? can u attach them
    here if u have them..?
    I am getting this under output -> Sun java system application server tab
    Exception occured in J2EEC Phase
    java.lang.NoSuchMethodError: com.sun.tools.apt.Main.process(Lcom/sun/mirror/apt/AnnotationProcessorFactory;[Ljava/lang/String;)I
    at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:605)
    at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:538)
    at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:56)
    at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:44)
    at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1820)
    at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2089)
    at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:396)
    at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:155)
    at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:160)
    at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
    at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
    at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)

  • Creating web services using WAS 6.40

    Hello All,
      When I try to create one in my WAS 6.40, I always get stuck @ the entry that prompts for the package. The error messgae that I received is "Test objects cannot be created in foreign namespaces". Can someone advise what could be the problem ? Am I missing something here ? My apologies if the questions is too trivial but I am totally new to all this R/3 / ABAP thingy. Thank you.
    from
    Kwok Wei

    Hi Kwok,
    There are two solutions for your problem.
    first, if you want to make it transportable then create a
    package and asign your object to that package, you'll get
    Request Number for package and object assigned.
    Secondly you can also save it as Local Object.
    To read about web services in details visit <a href="http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/frameset.htm">this</a> and <a href="http://help.sap.com/saphelp_nw04/helpdata/en/D6/F9BC3D52F39D33E10000000A11405A/frameset.htm">this</a>
    Hope it helps.
    Regards,
    Narinder Hartala

  • Integrating Windows Live web service using Jdeveloper

    Hi,
    We are integrating windows live web service in our oracle portal application. We are trying to create a web service proxy using the URL https://domains.live.com/service/managedomain2.asmx?wsdl. But, we just get an error saying "No WSDL document could be found". Please let me know how to access this web service.
    Please note that we are able to access this web service through the browser.
    Regards,
    MJ

    When building the service, there is an option to deploy a stateful service: check the stateful checkbox, in the step 2 of the wizard - Methods definition.
    On the client side, you will have to enable HTTP based cookie, so that the client remember the JSESSION cookie.
    Hope this helps,
    Eric

Maybe you are looking for

  • Firmware Upgrade causes severe slowness and Hangs

    Has anyone else encountered this problem? I did do the firmware upgrade, and that caused slowness in responsiveness (followed immediately by that spinning wheel). In some cases, it completely hangs. At this time, I also tried to VNC into it, and it w

  • Automatic posting in GL Master record

    Dear All:              I want to know that can automatic posting tick in GL Master be made optional for certain users. I mean i am a power user of FI,but i share my login with GM Finance so what happens whenever he wants to make direct entry into cer

  • How do I copy my  music from one external hard drive to another one?

    How do I copy my itunes library from  one external drive to a bigger drive?

  • Importing photos from iphoto to iphone

    I have the 'old' version of the iphone and cannot transfer photos from iphoto to the iphone. When i click on the photos tab for the iphone in itunes, the albums and everything except "sync photos from" at the very top are grayed out. Then my only opt

  • Total using SUM not working on Account field on Lead History report

    Hi, I have a report based on Lead History on which I need to use the SUM of a field that is under the Account.Custom Number/Integer. This basically is a report of leads along with some fields from the account the lead is associated with. The SUM on t