+ Start a Discussion
falfadlifalfadli 

importing 3rd party libraries

I am working on developing an integration with PayPal. They have a web service API and I wanted to utilize some paypal SOAP libraries. Can I import libraries similar as you would in java?

 

I am trying to avoid building a SOAP message manually and the wsdl2apex class generator does not support the wsdl because of multiple port bindings and imports within the wsdl. And I do not want to hack the wsdl.  

 

Any advice on how to do this would be appreciated so I can set values on the objects and send the request via object method calls....If I cannot, backup plan is to use the HTTP Request and Response classes

 

 

import com.paypal.sdk.profiles.APIProfile;
import com.paypal.sdk.profiles.ProfileFactory;
import com.paypal.sdk.services.CallerServices;
import com.paypal.soap.api.AddressType;
import com.paypal.soap.api.BasicAmountType;
import com.paypal.soap.api.CountryCodeType;
import com.paypal.soap.api.CreditCardDetailsType;
import com.paypal.soap.api.CreditCardTypeType;
import com.paypal.soap.api.CurrencyCodeType;
import com.paypal.soap.api.DoDirectPaymentRequestDetailsType;
import com.paypal.soap.api.DoDirectPaymentRequestType;
import com.paypal.soap.api.DoDirectPaymentResponseType;
import com.paypal.soap.api.PayerInfoType;
import com.paypal.soap.api.PaymentActionCodeType;
import com.paypal.soap.api.PaymentDetailsType;
import com.paypal.soap.api.PersonNameType;
//Ideally I would like to do something like this.                                                                                                                                              PayerInfoType payer                   PayerInfoType() payer= new PayerInfoType();
PersonNameType name = new PersonNameType();
name.setFirstName(buyerFirstName);
name.setLastName(buyerLastName);
payer.setPayerName(name);
payer.setPayerCountry(CountryCodeType.US);
payer.setAddress(shipTo);

Message Edited by falfadli on 05-04-2009 11:14 AM