ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How to prototype this method

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to prototype this method

    Im getting method not found. But, Im pretty sure it's the signature. It's almost finished when it gets to the statement.

    Code:
    D jArray          S               O   CLASS(*JAVA                
    D                                         : 'java.util.ArrayList'
                                                                         
    D setFundingInstruments...                                            
    D                 PR                  like(jarray)                    
    D                                     ExtProc(*JAVA:                  
    D                                     'com.paypal.api.payments-       
    D                                     .Payer':                        
    D                                     'setFundingInstruments')        
    D addArray...                                                         
    D                                     like(jArray)                    
    D                                     const


    Code:
    /**
    	 * Setter for fundingInstruments
    	 */
    	public Payer setFundingInstruments(List<FundingInstrument> fundingInstruments) {
    		this.fundingInstruments = fundingInstruments;
    		return this;
    	}

  • #2
    Re: How to prototype this method

    This setFundingInstruments() method returns a Payer object, but your RPG code is set up to return an ArrayList object. That seems wrong...

    Comment


    • #3
      Re: How to prototype this method

      Thanx Scott,

      I though it was returning the arraylist. I didnt notice that. I'll give it a shot ...


      Thank You for your reply

      Comment


      • #4
        Re: How to prototype this method

        How would I return a class.instance in the prototype?

        The Payer class is instantiated with a "new_Payer" constructor prototype. So would I use that somehow?

        Comment


        • #5
          Re: How to prototype this method

          What do you mean by "class.instance"?

          Normally, a prototype can only list classes. Routines can typically accept any object of a given class, they are not limited to one particular object.

          Comment


          • #6
            Re: How to prototype this method

            Thanx Scott, I got it ...

            Your help got me over the top ...

            I was using arraylist as the input parm, I should have been using List ...

            Comment

            Working...
            X