Skip to content

Commit 12e99f2

Browse files
author
ArnoSoontjens
committed
Corrected a mistake in creation of the client (was always HTTPS port)
1 parent 96460c9 commit 12e99f2

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

Odoo-Java/src/main/java/com/arnowouter/javaodoo/client/OdooClient.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public OdooClient(String protocol, String hostname, boolean HTTPS) throws Malfor
4141

4242
public OdooClient(String protocol, String hostName, boolean HTTPS, boolean ignoreInvalidSSL) throws MalformedURLException {
4343
int port = changePortIfHTTPS(HTTPS);
44-
URL commonClientURL = new URL(protocol,hostName,OdooConnectorDefaults.DEFAULT_HTTPS_PORT, OdooConnectorDefaults.COMMON_ENDPOINT);
45-
URL objectClientURL = new URL(protocol,hostName,OdooConnectorDefaults.DEFAULT_HTTPS_PORT, OdooConnectorDefaults.OBJECT_ENDPOINT);
44+
URL commonClientURL = new URL(protocol,hostName,port, OdooConnectorDefaults.COMMON_ENDPOINT);
45+
URL objectClientURL = new URL(protocol,hostName,port, OdooConnectorDefaults.OBJECT_ENDPOINT);
4646
objectClient = createClient(objectClientURL, ignoreInvalidSSL);
4747
commonClient = createClient(commonClientURL, ignoreInvalidSSL);
4848
}
@@ -86,12 +86,7 @@ public OdooVersionInfo getVersion() throws XMLRPCException {
8686
}
8787

8888
public int[] search(Object[] params) throws XMLRPCException {
89-
Object[] result;
90-
//try {
91-
result = executeCall(params);
92-
/*} catch (XMLRPCException ex) {
93-
return new int[0];
94-
}*/
89+
Object[] result = executeCall(params);
9590
int[] ids = new int[result.length];
9691
int i=0;
9792
for(Object id : result){

0 commit comments

Comments
 (0)