webservice client example
Description
Environment
- 05 Mar 2019, 05:05 AM
- 04 Mar 2019, 10:56 AM
- 03 Mar 2019, 09:52 PM
- 03 Mar 2019, 09:47 PM
- 03 Mar 2019, 04:44 PM
- 02 Mar 2019, 01:25 PM
Carlos Ruiz
Adding software heritage links for the disappeared Bitbucket projects:
Hiep Lq
update example to use cxf stack with security policy
https://github.com/hieplq/web.service.client.bnd
Carlos Ruiz
Thanks @Hiep Lq, test plugin working now.
Carlos Ruiz
Thanks @Hiep Lq
I applied the patch and that solved the issue with server.product and also demo.globalqss.com is running now fine the webservices.
But now the project https://bitbucket.org/idplugin/org.globalqss.idempiere.test.fe is failing with a different error:
java.lang.Error: javax.xml.soap.SOAPException: Unable to create SAAJ meta-factory: Provider com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl not found
Hiep Lq
hi @Carlos Ruiz please apply that
need to refresh target platform, you can delete .metadata folder for easy
i just change dependency of axis to news
Carlos Ruiz
Hi @Hiep Lq, after the latest commits I'm having problems to run server.product from eclipse.
Firstly it takes a lot of CPU and time to start, and then after started is showing the following error:
2019-03-04 20:07:36.351 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=es_ES
Framework arguments: -product org.adempiere.server.server_product
Command-line arguments: -product org.adempiere.server.server_product -data /home/carlos/hgIdempiere/local62/runtime-server.product -dev file:/home/carlos/hgIdempiere/local62/.metadata/.plugins/org.eclipse.pde.core/server.product/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog -console
!ENTRY org.idempiere.webservices 4 0 2019-03-04 20:09:39.173
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.idempiere.webservices [303]
Bundle was not resolved because of a uses constraint violation.
org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.idempiere.webservices [osgi.identity; osgi.identity="org.idempiere.webservices"; type="osgi.bundle"; version:Version="6.2.0.qualifier"; singleton:="true"] because it is exposed to package 'javax.xml.soap' from resources javax.xml.soap [osgi.identity; osgi.identity="javax.xml.soap"; type="osgi.bundle"; version:Version="1.3.0.v201105210645"] and jakarta.xml.soap-api [osgi.identity; osgi.identity="jakarta.xml.soap-api"; type="osgi.bundle"; version:Version="1.4.1"] via two dependency chains.
Chain 1:
org.idempiere.webservices [osgi.identity; osgi.identity="org.idempiere.webservices"; type="osgi.bundle"; version:Version="6.2.0.qualifier"; singleton:="true"]
require: (&(osgi.wiring.bundle=javax.xml.soap)(bundle-version>=1.3.0))
|
provide: osgi.wiring.bundle: javax.xml.soap
javax.xml.soap [osgi.identity; osgi.identity="javax.xml.soap"; type="osgi.bundle"; version:Version="1.3.0.v201105210645"]
Chain 2:
org.idempiere.webservices [osgi.identity; osgi.identity="org.idempiere.webservices"; type="osgi.bundle"; version:Version="6.2.0.qualifier"; singleton:="true"]
require: (osgi.wiring.bundle=org.apache.servicemix.bundles.spring-web)
|
provide: osgi.wiring.bundle; bundle-version:Version="4.3.19.RELEASE_1"; osgi.wiring.bundle="org.apache.servicemix.bundles.spring-web"
org.apache.servicemix.bundles.spring-web [osgi.identity; osgi.identity="org.apache.servicemix.bundles.spring-web"; type="osgi.bundle"; version:Version="4.3.19.RELEASE_1"]
import: (osgi.wiring.package=javax.xml.soap)
|
export: osgi.wiring.package: javax.xml.soap
jakarta.xml.soap-api [osgi.identity; osgi.identity="jakarta.xml.soap-api"; type="osgi.bundle"; version:Version="1.4.1"]
at org.eclipse.osgi.container.Module.start(Module.java:451)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1762)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1725)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1656)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)Same error is appearing on server demo.globalqss.com - when starting the webservices plugin.
Sorry, I thought I tested the webservices before committing the patches, but maybe my tests were very quick and didn't notice this before.

how to make simple webservice client run inside idempiere?
1. clone simple client https://bitbucket.org/idplugin/org.globalqss.idempiere.test.fe
2. clone feature manage bundle use for client webservice https://bitbucket.org/idplugin/org.idempiere.webservices.client-feature
3. import both into idempiere source
(org.idempiere.webservices.client-feature reference to parent pom by relative path do bellow step to remove that dependency)
go to [idempiere-source]/org.idempiere.parent
run mvn install
4. open org.idempiere.p2.targetplatform/org.idempiere.p2.targetplatform.target
add more repository: https://raw.githubusercontent.com/idempiere/binary.file/master/p2.maven/org.idempiere.webservice.client-p2-R20190302
5. reload target platform
6. open org.adempiere.server-feature/server.product
7. go to content tab to add feature org.idempiere.webservices.client-feature
8. go to overview tab to run server by click to (launch an eclipse application)
(have warning dialog about missing constraing of org.glassfish.pfl.pfl-basic but can ignore by continue )