I am following this little example in java, to test JRadius client.
But I keep getting this error:
Exception in thread "main" net.sf.jradius.exception.UnknownAttributeException: Unknown attribute MS-CHAP-Challenge
at net.sf.jradius.packet.attribute.AttributeFactory.newAttribute(Unknown Source)
at net.sf.jradius.client.auth.MSCHAPv2Authenticator.processRequest(Unknown Source)
at net.sf.jradius.client.RadiusClient.authenticate(Unknown Source)
at lu.restena.zimbra.RestenaAuthenticator.main(RestenaAuthenticator.java:94)
I have added all jars already and imports too.
My code:
InetAddress remoteInetAddress = InetAddress.getByName(RADIUSname);
RadiusClient radiusClient;
radiusClient = new RadiusClient(
remoteInetAddress, // InetAddress - Address of remote RADIUS Server
sharedSecret); // String - Shared Secret for remote RADIUS Server
AttributeList attributeList;
attributeList = new AttributeList();
attributeList.add(new Attr_UserName(username));
RadiusAuthenticator auth = RadiusClient.getAuthProtocol("mschapv2");
RadiusPacket request;
request = new AccessRequest(radiusClient, attributeList);
request.addAttribute(new Attr_UserPassword(password));
RadiusPacket reply = radiusClient.authenticate((AccessRequest) request, auth, 5);
The error is on:
RadiusPacket reply = radiusClient.authenticate((AccessRequest) request, auth, 5);
Anyone has any idea why? (I am a newbie in JRadius) (MSCHAPv2Authenticator.java)
Before using the JRadius library, a JRadius dictionary should be loaded as below.
AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
Also, ensure you have added JRadius Dictionary (jradius-dictionary-.jar) to you class path.
Related
my code here:
function MsgReceivedInPastHourchannelId,connectorID, status) {
var client = new com.mirth.connect.client.core.Client('https://127.0.0.1:443/');
try{
var loginStatus = client.login('userID', 'psw');
} catch(ex) {
client.close();
throw 'Unable to log-on the server , Error: ' + ex.message;
}
var filter = new com.mirth.connect.model.filters.MessageFilter;
var calendar = java.util.Calendar;
var startDate = new calendar.getInstance();
var endDate = new calendar.getInstance();
..
.. logic to set start/end date
..
filter.setStartDate(startDate);
filter.setEndDate(endDate);
var statuses = new java.util.HashSet();
var Status = com.mirth.connect.donkey.model.message.Status;
var list = Lists.list().append(connectorID);
var metricStatus = Status.SENT;
statuses.add(metricStatus);
filter.setStatuses(statuses);
filter.setIncludedMetaDataIds(list) ;
var nCount =client.getMessageCount(channelId, filter);
client.close();
return nCount
}
reference :
Mirth getMessageCount using Javascript not working
Mostly it works fine, but it randomly throw exception at line number 218, this is
var client = new com.mirth.connect.client.core.Client('https://127.0.0.1:443/')
anyone have experience or solution to get rid of such error:
[2021-06-30 02:00:02,000] ERROR (com.mirth.connect.connectors.js.JavaScriptDispatcher:193):
Error evaluating JavaScript Writer (JavaScript Writer "Submit Hx channel status to DataDog" on channel 1xxxxxxxxxxxxxxxx4).
com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL:
ChannelStatus-Poller-CountCONNECTOR:
Submit Hxchannel status to DataDogSCRIPT SOURCE:
JavaScript WriterSOURCE CODE:
218: var client = new com.mirth.connect.client.core.Client('https://127.0.0.1:443/') 221: // log on to the server222:
try{LINE NUMBER: 218 DETAILS:
Wrapped java.lang.IllegalStateException: zip file closed
at a7fa25a9-af95-4410-bb4f-f4f08ae0badb:218 (MsgReceivedInPastHour)
at a7fa25a9-af95-4410-bb4f-f4f08ae0badb:1013 (doScript)
at a7fa25a9-af95-4410-bb4f-f4f08ae0badb:1033
at com.mirth.connect.connectors.js.JavaScriptDispatcher$JavaScriptDispatcherTask.doCall(JavaScriptDispatcher.java:184)
at com.mirth.connect.connectors.js.JavaScriptDispatcher$JavaScriptDispatcherTask.doCall(JavaScriptDispatcher.java:122)
at com.mirth.connect.server.util.javascript.JavaScriptTask.call(JavaScriptTask.java:113)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:686)
at java.util.zip.ZipFile.access$200(ZipFile.java:60)
at java.util.zip.ZipFile$ZipEntryIterator.hasNext(ZipFile.java:508)
at java.util.zip.ZipFile$ZipEntryIterator.hasMoreElements(ZipFile.java:503)
at java.util.jar.JarFile$JarEntryIterator.hasNext(JarFile.java:253)
at java.util.jar.JarFile$JarEntryIterator.hasMoreElements(JarFile.java:262)
at org.reflections.vfs.ZipDir$1$1.computeNext(ZipDir.java:30)
at org.reflections.vfs.ZipDir$1$1.computeNext(ZipDir.java:26)
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136)
at org.reflections.Reflections.scan(Reflections.java:240)
at org.reflections.Reflections.scan(Reflections.java:204)
at org.reflections.Reflections.<init>(Reflections.java:129)
at org.reflections.Reflections.<init>(Reflections.java:170)
at org.reflections.Reflections.<init>(Reflections.java:143)
at com.mirth.connect.client.core.Client.<init>(Client.java:176)
at com.mirth.connect.client.core.Client.<init>(Client.java:143)
at sun.reflect.GeneratedConstructorAccessor159.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.mozilla.javascript.MemberBox.newInstance(MemberBox.java:159)
at org.mozilla.javascript.NativeJavaClass.constructInternal(NativeJavaClass.java:266)
at org.mozilla.javascript.NativeJavaClass.constructSpecific(NativeJavaClass.java:205)
at org.mozilla.javascript.NativeJavaClass.construct(NativeJavaClass.java:166)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1525)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:405)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3508)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)
at com.mirth.connect.server.util.javascript.JavaScriptTask.executeScript(JavaScriptTask.java:150)
at com.mirth.connect.connectors.js.JavaScriptDispatcher$JavaScriptDispatcherTask.doCall(JavaScriptDispatcher.java:149)
... 6 more
Issue could not be solved in Mirth connector Admin environment, to solve this issue, I used DB query instead.
go to Mirth DB, you can find related tables and it is more safe to query such DB.
The reason not to invoke,
answer from Mirth slack general channel,
"When using the Client class you're pretty much looping back to the server, since all the code is executed on the server anyways."
so always didn't com.mirth.connect.client.core.Client class in Mirth code.
Issue closed.
I am trying to reproduce the example from the Wiki tutorial for Project Wonder REST:
community.org/display/WEB/Your+First+Rest+Project#YourFirstRestProject-Addingpostsandauthorswithcurl
I am the point where you add entries in the DB with curl (I couldn't do it, I added them via SQL).
I am trying to run the curl command to retrieve entries and get an error "Empry reply from server". The console reports the following:
Request start for URI /cgi-bin/WebObjects/BlogTutorial.woa/ra/blogEntries.json
Headers{accept = ("*/*"); host = ("127.0.0.1:45743"); user-agent = ("curl/7.38.0"); }
[2015-8-14 17:20:19 CEST] <WorkerThread14> <er.rest.routes.ERXRouteRequestHandler>: Exception while handling action named "index" on action class "your.app.rest.controllers.BlogEntryController" :com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:java.lang.reflect.InvocationTargetException
_ignoredPackages:: ("com.webobjects", "java.applet", "java.awt", "java.awt.datatransfer", "java.awt.event", "java.awt.image", "java.beans", "java.io", "java.lang", "java.lang.reflect", "java.math", "java.net", "java.rmi", "java.rmi.dgc", "java.rmi.registry", "java.rmi.server", "java.security", "java.security.acl", "java.security.interfaces", "java.sql", "java.text", "java.util", "java.util.zip")
Headers{cache-control = ("private", "no-cache", "no-store", "must-revalidate", "max-age=0"); expires = ("Fri, 14-Aug-2015 15:20:19 GMT"); content-type = ("text/html"); content-length = ("9296"); pragma = ("no-cache"); x-webobjects-loadaverage = ("1"); date = ("Fri, 14-Aug-2015 15:20:19 GMT"); set-cookie = (); }
The request start and both Headers messages are mine, through an override of dispatchRequest.
Any ideas?
I'm having some issues with Kerberos authentication to perform file management with JCifs (Kerberos extension version 1.3.17)
This is my current configuration of krb5.conf:
[libdefaults]
default_realm = <REALM_NAME_UPPERCASE>
udp_preference_limit = 1
[realms]
<REALM_NAME_UPPERCASE> = {
kdc = <DOMAIN_NAME_UPPERCASE>:88
admin_server = <DOMAIN_NAME_UPPERCASE>
default_domain = <DOMAIN_NAME_UPPERCASE>
}
[domain_realm]
.<domain_name> = <REALM_NAME_UPPERCASE>
<domain_name> = <REALM_NAME_UPPERCASE>
[appdefaults]
kinit = {
renewable = true
forwardable = true
}
And this is code authenticating the user and then trying to find a file on a fileserver in the network:
public static void main (String[] args) throws Exception {
Subject subject = new Subject();
System.setProperty("java.security.krb5.conf", "C:/krb5.conf");
System.setProperty("sun.security.krb5.debug", "true");
Map<String, Object> state = new HashMap<String, Object>();
state.put("javax.security.auth.login.name", "USERNAME");
state.put("javax.security.auth.login.password", "PASSWORD".toCharArray());
Map<String, Object> options = new HashMap<String, Object>();
options.put("debug", "true");
options.put("useFirstPass", "true");
Krb5LoginModule login = new Krb5LoginModule();
login.initialize(subject, null, state, options);
if (login.login()) {
login.commit();
}
String path = "file://HOST/242269/"; // existing file server folder
Kerb5Authenticator kerberosAuthenticator = new Kerb5Authenticator(subject);
SmbFile smbFile = new SmbFile(path, kerberosAuthenticator);
SmbFile[] files = smbFile.listFiles();
for (SmbFile file : files) {
System.out.println(file);
}
}
Now, when I run this code, it says it can authenticate the user with those credentials (when I change the credentials, authentication fails) and it creates a ticket for this user.
When I later on try to retrieve the content of a file directory over CIFS, it gives me the following error:
GSSException: No valid credentials provided (Mechanism level: Message stream modified (41))
at sun.security.jgss.krb5.Krb5Context.initSecContext(Unknown Source)
at sun.security.jgss.GSSContextImpl.initSecContext(Unknown Source)
at sun.security.jgss.GSSContextImpl.initSecContext(Unknown Source)
at jcifs.smb.SpnegoContext.initSecContext(SpnegoContext.java:80)
at jcifs.smb.Kerb5Authenticator.setup(Kerb5Authenticator.java:196)
at jcifs.smb.Kerb5Authenticator.access$000(Kerb5Authenticator.java:30)
at jcifs.smb.Kerb5Authenticator$1.run(Kerb5Authenticator.java:168)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at jcifs.smb.Kerb5Authenticator.sessionSetup(Kerb5Authenticator.java:166)
at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:320)
at jcifs.smb.SmbSession.send(SmbSession.java:239)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:176)
at jcifs.smb.SmbFile.doConnect(SmbFile.java:925)
at jcifs.smb.SmbFile.connect(SmbFile.java:974)
at jcifs.smb.SmbFile.connect0(SmbFile.java:890)
at jcifs.smb.SmbFile.resolveDfs(SmbFile.java:669)
at jcifs.smb.SmbFile.send(SmbFile.java:783)
at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:2009)
at jcifs.smb.SmbFile.doEnum(SmbFile.java:1758)
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1735)
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1668)
You can find the complete error log here (some details are obfuscated)
Could someone please get me going in the right direction as to what I'm doing wrong here?
Uppercase of the realm is very important to avoid "Exception: krb_error 41 Message stream modified (41)".
See http://sourceforge.net/p/spnego/discussion/1003769/thread/99b3ff67/
Hate to necrobump but ran into the same problem when launching Spark and Zeppelin inside a Docker container, with the master being a remote Kerberos-enabled YARN cluster. However, in this case, the realm name uppercase/lowercase was not the problem.
After a few hours, I found this thread which suggests removing the following line from the krb5.conf file:
renew_lifetime = 7d
And that solved the issue. Hope this helps someone.
Alternative (and better) answer to removing the renew_lifetime = 7d line in the config, is by allowing the principal to do renewals. In CentOS 7, an example command would be the following:
kadmin -p admin/admin#EXAMPLE.COM
where I assume that admin/admin#EXAMPLE.COM is the Administrator principal, then:
modprinc -maxrenewlife 90day +allow_renewable your_service#EXAMPLE.COM
where I assume the principal for the service that causes the problems is your_service#EXAMPLE.COM; and the 90day renew life is arbitrary.
This solves the issue without removing the renew_lifetime=7d from the krb5.conf file!
Just wondering if anyone can see why i am getting the exception "java.lang.ClassCastException" from the code below.
RISService, RisPortType are lib that i got from a WSDL file and then use wsimport to generate the .java files
I know what the exception means but i am just not sure how to track it down.
// Instantiate the wsimport generated SXML API Service client --
RISService risportService = new RISService();
RisPortType risportPort = risportService.getRisPort();
// Set the URL, user, and password on the JAX-WS client
String hostUrl = "https://10.1.1.1:8443/realtimeservice2/services/RISService";
((BindingProvider) risportPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, hostUrl);
((BindingProvider) risportPort).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, cucmDetails.getAxlUsername());
((BindingProvider) risportPort).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, cucmDetails.getAxlPassword());
// create and populate the selectCmDevice request
SelectCmDevice sxmlParams = new SelectCmDevice();
CmSelectionCriteria criteria = new CmSelectionCriteria();
long maxNum = 200;
long modelNum = 255;
ArrayOfSelectItem items = new ArrayOfSelectItem();
//create a select item criteria to retrieve devices with names matching "SEP123412341234"
SelectItem item = new SelectItem();
item.setItem("SEP123412341234");
items.getItem().add(item);
//Search on all nodes
criteria.setNodeName("Any");
//get back max 200 phones. 9+ can get upto 1000
criteria.setMaxReturnedDevices(maxNum);
//get back phones only
criteria.setDeviceClass("Phone");
//255 means get back ALL phone models
criteria.setModel(modelNum);
//get back only Registered phones
criteria.setStatus("Registered");
//return results in order of name
criteria.setSelectBy("Name");
//array of phones to get results back for
criteria.setSelectItems(items);
sxmlParams.setCmSelectionCriteria(criteria);
//make selectCmDevice request
SelectCmDeviceReturn selectResponse = risportPort.selectCmDevice("",criteria); << This is where i get the exception outline below
Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
java.lang.ClassCastException: [C cannot be cast to java.lang.String
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown Source)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown Source)
at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
at com.sun.proxy.$Proxy40.selectCmDevice(Unknown Source)
at utils._9.APIRIS9.getPhoneIPadd(APIRIS9.java:66)
Thanks
Alexis
I bet your password is being returned as a char[] and jaxws is expecting a String.
in my case
Object port = service.getPort(qname, c);
WSBindingProvider bp = (WSBindingProvider) port;
// Manually set connection timeouts as we seem to hit them during IT testing
Map<String, Object> requestContext = bp.getRequestContext();
requestContext.put(BindingProviderProperties.REQUEST_TIMEOUT, env.getProperty("timeout"));
requestContext.put(BindingProviderProperties.CONNECT_TIMEOUT, env.getProperty("timeout"));
as you can see requestContext.put() takes a String and a object, you thought putting a String timeout would work, but NO, java ws is expecting a int..
this is a massive catch ya.
Java I am using paypal website pro sdk SOAP calls problem is following line of code returns exception after long time
response = (CreateRecurringPaymentsProfileResponseType) caller.call("CreateRecurringPaymentsProfile", request);
Exception is as follows.
java.net.SocketException: Connection reset
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 com.paypal.sdk.core.soap.SOAPAPICaller.callSOAP(SOAPAPICaller.java:462)
at com.paypal.sdk.core.soap.SOAPAPICaller.call(SOAPAPICaller.java:382)
at com.paypal.sdk.services.CallerServices.call(CallerServices.java:125)
at CreateRecurringPaymentsProfile.callCreateRecurringPaymentsProfileAPI(CreateRecurringPaymentsProfile.java:85)
at CreateRecurringPaymentsProfile.run(CreateRecurringPaymentsProfile.java:50)
at CreateRecurringPaymentsProfile.main(CreateRecurringPaymentsProfile.java:22)
Caused by: java.net.SocketException: Connection reset
Do i need any certificate or some thing else currently i am using proxy in classes folder as follows
# This file contains the properties that needs to be set to make the API call via Proxy.
# To make use of proxy, change PROXY_SET to true, uncomment
# PROXY_HOST and PROXY_PORT properties and set values as illustrated below.
# Note: Just remove the # symbol to uncomment.
# Both PROXY_HOST and PROXY_PORT needs to be set. PROXY_PORT should be a number.
# If any one of these properties are not set or invalid, proxy settings will be ignored
# and this information will be logged.
# PROXY_HOST : IP Address or Host Name of the proxy server
# PROXY_PORT: Port number of the proxy server
PROXY_SET = true
PROXY_HOST=128.1.100.13
# eg: PROXY_HOST = 127.0.0.1
PROXY_PORT=8080
# eg: PROXY_PORT = 808
# The following properties are optional.
# If your proxy need username and password to authenticate,
# just uncomment the following two properties and set values as illustrated below.
# Note: Just remove the # symbol to uncomment.
# PROXY_USERNAME=<your proxy username>
# eg: PROXY_USERNAME =test
# PROXY_PASSWORD=<your proxy password>
# eg: PROXY_PASSWORD =test
My Code as follows
public class CreateRecurringPaymentsProfile {
CallerServices caller;
public static void main(String[] args) {
try {
CreateRecurringPaymentsProfile sample = new CreateRecurringPaymentsProfile();
sample.run();
}
catch (Exception e) {
System.out.println("ERROR: " + e.getMessage());
}
}
public CreateRecurringPaymentsProfile() throws PayPalException {
caller = new CallerServices();
/*
WARNING: Do not embed plaintext credentials in your application code.
Doing so is insecure and against best practices.
Your API credentials must be handled securely. Please consider
encrypting them for use in any production environment, and ensure
that only authorized individuals may view or modify them.
*/
APIProfile profile = ProfileFactory.createSignatureAPIProfile();
profile.setAPIUsername("f_1299578055_biz_api1.gmail.com");
profile.setAPIPassword("152578076");
profile.setSignature("A.SG-Qkp9mcSwx0zh23u89eyCcWGA9MwmCgRlo2193..VNw06q1WbLTx");
profile.setEnvironment("sandbox");
caller.setAPIProfile(profile);
}
public void run() throws PayPalException {
callCreateRecurringPaymentsProfileAPI();
System.out.println("\nDone...");
}
public void callCreateRecurringPaymentsProfileAPI() throws PayPalException {
System.out.println("\n########## Starting CreateRecurringPaymentsProfile ##########\n");
//Replace the token value by actual value returned vy SetCustomerBillingAgreementAPI call
String token="RP-8P463231B6009345R";
String amount ="5.00";
int BF=1;
BillingPeriodType BP = BillingPeriodType.Day;
CreateRecurringPaymentsProfileRequestType request=new CreateRecurringPaymentsProfileRequestType();
CreateRecurringPaymentsProfileResponseType response=new CreateRecurringPaymentsProfileResponseType();
request.setVersion("51.0");
request.setCreateRecurringPaymentsProfileRequestDetails(new CreateRecurringPaymentsProfileRequestDetailsType()) ;
request.getCreateRecurringPaymentsProfileRequestDetails().setToken(token);
request.getCreateRecurringPaymentsProfileRequestDetails().setRecurringPaymentsProfileDetails(new RecurringPaymentsProfileDetailsType());
Calendar start_date = Calendar.getInstance();
start_date.set(2008,5,30);
request.getCreateRecurringPaymentsProfileRequestDetails().getRecurringPaymentsProfileDetails().setBillingStartDate(start_date);
request.getCreateRecurringPaymentsProfileRequestDetails().setScheduleDetails(new ScheduleDetailsType());
request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().setPaymentPeriod(new BillingPeriodDetailsType());
request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().setDescription("RP-Test- Java SOAP SDK");
request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().getPaymentPeriod().setAmount(new BasicAmountType());
request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().getPaymentPeriod().getAmount().set_value(amount) ;
request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().getPaymentPeriod().getAmount().setCurrencyID(CurrencyCodeType.USD);
request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().getPaymentPeriod().setBillingFrequency(BF);
request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().getPaymentPeriod().setBillingPeriod(BP);
response = (CreateRecurringPaymentsProfileResponseType) caller.call("CreateRecurringPaymentsProfile", request);
if (!response.getAck().equals(AckCodeType.Success) && !response.getAck().equals(AckCodeType.SuccessWithWarning)) {
// do error processing
System.out.println("\n########## CreateRecurringPaymentsProfile call failed ##########\n");
} else {
//success
System.out.println("\n########## CreateRecurringPaymentsProfile call passed ##########\n");
}
}
}
In developer.paypal.com website i have created the following account.
EDIT Deleted for security reasons.
Can you check your java.policy file to check for any restrictions or otherwise, perhaps you need to add SocketPermission there to allow the application to connect
It was a HTTP proxy problem. It was fixed when I removed the HTTP proxy from the network