[idempiere] iDempiere test webservice REST API NOT WORKING

341 views
Skip to first unread message

quynh...@gmail.com

unread,
Jun 14, 2022, 10:40:06 AM6/14/22
to idem...@googlegroups.com

Hi Everyone,

 

I tried to try webservice but got error like below. Can anyone help me?

 

Exception on SOAPUI

 

 

Exception on Eclipse:

 


Regards,

 

image001.jpg
image002.jpg

quynh...@gmail.com

unread,
Jun 21, 2022, 9:42:03 AM6/21/22
to idem...@googlegroups.com

Hi Evereyone,

 

Has anyone encountered an error like this?

image001.jpg
image002.jpg

Anozi Mada

unread,
Jun 21, 2022, 10:33:09 AM6/21/22
to iDempiere
Your request is using json but the error indicate that it expect xml type. Did you set the Content-Type and Accept headers to application/json?
Also you might want to check the new REST plugin here https://github.com/bxservice/idempiere-rest

Regards,
Anozi Mada

Anozi Mada

unread,
Jun 21, 2022, 10:51:00 AM6/21/22
to iDempiere
Wait I think I misread the stack trace. I guess you need to debug it to know the actual exception that caused InvocationTargetException.
But I recommend just use the new rest plugin.

quynh...@gmail.com

unread,
Jun 25, 2022, 11:52:14 PM6/25/22
to idem...@googlegroups.com

Thanks very much, but I want to use it for both soap and rest. Have you found the cause of the error yet?

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/f2b46d13-96ab-4d8c-91cf-aad943b67d12n%40googlegroups.com.

Anozi Mada

unread,
Jun 26, 2022, 4:59:40 AM6/26/22
to iDempiere
You need to debug it yourself. I'm not using it and I don't have the data setup ready.

Carlos Antonio Ruiz Gomez

unread,
Jul 16, 2022, 9:45:14 AM7/16/22
to idem...@googlegroups.com
The message is wrong, it worked fine for me testing in postman with this one:
{
"ModelCRUDRequest": {
"ModelCRUD": {
"serviceType": "ReadBPartner",
"TableName": "C_BPartner",
"RecordID": 119,
"Action": "Read"
},
"ADLoginRequest": {
"user": "{{userName}}",
"pass": "{{password}}",
"lang": "{{language}}",
"ClientID": "{{clientId}}",
"RoleID": "{{roleId}}",
"OrgID": "{{organizationId}}",
"WarehouseID": "{{warehouseId}}",
"stage": "9"
}
}
}

Regards,

Carlos Ruiz


El 14/6/22 a las 16:39, quynh...@gmail.com escribió:

Tayyoo

unread,
Jul 25, 2022, 4:21:55 AM7/25/22
to iDempiere
Hello everyone, i got some errors that related with this topic.

I execute the CompositeRequest using JSON format but the response from server is 415 Unsupported Media Type.  
Here is my request header and request body in Postman. I hope someone can help me :)

Thank you guys.

Regard, 
AN'IM FALAHUDDIN
request_header.jpg
response.jpg
request.json
request_body.jpg

Heng Sin Low

unread,
Jul 25, 2022, 4:37:32 AM7/25/22
to idem...@googlegroups.com
This is only available for iDempiere 9+, are you using iD9 ?

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.

Tayyoo

unread,
Jul 25, 2022, 4:49:06 AM7/25/22
to iDempiere
Thanks hengsin for your response.

Yes, i've already using iDempiere 9. When i execute the ModelCRUDRequest it's working fine, but i got errors when using CompositeRequest.

Regards,
AN'IM FALAHUDDIN

Heng Sin Low

unread,
Jul 25, 2022, 5:15:37 AM7/25/22
to idem...@googlegroups.com
ic, perhaps it is not implemented for CompositeRequest, I've never used CompositeRequest before.

Tayyoo

unread,
Jul 25, 2022, 5:49:13 AM7/25/22
to iDempiere
Any clue to make sure it's not implemented or other clue to make it happen for CompositeRequest mr. hengsin?

Regards,
AN'IM FALAHUDDIN

Tayyoo

unread,
Jul 25, 2022, 6:13:42 AM7/25/22
to iDempiere
Ohh may be i must change the CompositeService.java to consume and produce not only application/xml but also application/json

Heng Sin Low

unread,
Jul 25, 2022, 9:44:24 PM7/25/22
to idem...@googlegroups.com
Yes, that might fix the problem.

Tayyoo

unread,
Aug 30, 2022, 4:26:25 AM8/30/22
to iDempiere
I've tried and it works for me thanks hengsin

Tayyoo

unread,
Aug 30, 2022, 4:27:59 AM8/30/22
to iDempiere
I have another question :D
How we upload image via idempiere webservice??

On Tuesday, July 26, 2022 at 8:44:24 AM UTC+7 hengsin wrote:

Anozi Mada

unread,
Aug 30, 2022, 4:35:29 AM8/30/22
to iDempiere
Please create a new post/thread.

Tayyoo

unread,
Aug 30, 2022, 5:16:29 AM8/30/22
to iDempiere
I apologize for my mistakes. I will create new thread about my question Thankyou.
Reply all
Reply to author
Forward
0 new messages