for 3E_webservice

343 views
Skip to first unread message

chen li

unread,
Dec 6, 2011, 8:34:07 AM12/6/11
to iDempiere
hi, i want to learn the 3E web service but fail serveral times to get
started. How to integrate it into 360lts and debug it?

Please indicate the steps. Thanks very much. I really appreciate your
support.

Alejandro Falcone

unread,
Dec 6, 2011, 7:48:10 PM12/6/11
to idem...@googlegroups.com
Hi chen li,

there is a good book (called ADempiere 3.6 Cookbook) where you can find the 3E web service integration.

Best regards,

Alejandro



2011/12/6 chen li <china....@gmail.com>

chen li

unread,
Dec 6, 2011, 9:41:06 PM12/6/11
to iDempiere
I read the book 'ADempiere 3.6 cookbook'. I need to say, it is a
fantastic book which helps me a lot. But later on, i have a question
about the web service.

i want to use web service to register a client through launching the
process "initial client setup".

i configure a web service named "register_client" in Web Service
Security.

The questions came up:

1,in Tab "web service type", i select "model oriented web services_Run
Process", but for Table, as the "initial client setup" will do
multiple tables so i select "AD_Client_Client". Am i right?

2,As shown in the source code of InitialClientSetup.java, i make all
the required fields in Tab "web service parameters", they are:
AD_Menu_ID Constant 225
AD_Process_ID Constant 53161
C_Currency_ID Constant 100
C_Country_ID Constant 100
CoAFile Constant C:\ADempiere\data\import\AccountingUS.csv
ClientName Free
OrgName Free
AdminUserName Free
NormalUserName Free

3, i save the web service security and launch the jboss.

i put in the XML below and failed like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/"; xmlns:adin="http://3e.pl/ADInterface">;
<soapenv:Header/>
<soapenv:Body>
<adin:runProcess>
<adin:ModelRunProcessRequest>
<adin:ModelRunProcess AD_Process_ID="53161" AD_Menu_ID="225">
<adin:ParamValues/>
<adin:serviceType>register_client</adin:serviceType>
<adin:ClientName>register_client_1</adin:ClientName>
<adin:OrgName>register_org_1t</adin:OrgName>
<adin:AdminUserName>clientAdmin_1</adin:AdminUserName>
<adin:NormalUserName>clientUser_1</adin:NormalUserName>
</adin:ModelRunProcess> <adin:ADLoginRequest>
<adin:user>System</adin:user>
<adin:pass>System</adin:pass>
<adin:lang>192</adin:lang>
<adin:ClientID>0</adin:ClientID>
<adin:RoleID>0</adin:RoleID>
<adin:OrgID>0</adin:OrgID>
<adin:WarehouseID>103</adin:WarehouseID>
<adin:stage>0</adin:stage> </adin:ADLoginRequest>
</adin:ModelRunProcessRequest>
</adin:runProcess>
</soapenv:Body>
</soapenv:Envelope>

The returned XML is :

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance">;
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Fault: java.lang.NullPointerException</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>


So please help me to fix this, thanks very much! the eager learner of
ADempiere ,


On 12月7日, 上午8时48分, Alejandro Falcone <alejandro.falc...@gmail.com>
wrote:


> Hi chen li,
>
> there is a good book (called ADempiere 3.6 Cookbook) where you can find the
> 3E web service integration.
> Take a look here for a revision:http://www.red1.org/adempiere/viewtopic.php?f=33&t=1167
>
> Best regards,
>
> Alejandro
>

> 2011/12/6 chen li <china.lic...@gmail.com>


>
>
>
> > hi, i want to learn the 3E web service but fail serveral times to get
> > started. How to integrate it into 360lts and debug it?
>
> > Please indicate the steps. Thanks very much. I really appreciate your

> > support.- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Carlos Antonio Ruiz Gomez

unread,
Dec 6, 2011, 9:57:43 PM12/6/11
to idem...@googlegroups.com

Hi chen li, can you please upload a compressed file with the console log?

Regards,

Carlos Ruiz

chen li

unread,
Dec 7, 2011, 1:47:59 AM12/7/11
to iDempiere
Hi, Carlos Ruiz.

Really appreciate your help. It seems no upload function here in the
forum. So i copy the console log since it started. Pls help me to fix
the problem :)

~~~~~~~~~~~~~~~~~~~~~~~

14:38:49,826 INFO [EARDeployer] Started J2EE application: file:/C:/
JBOSS_423_GA
/server/default/deploy/adempiere.ear/
14:39:38,818 ERROR [STDERR] -----------> EMail.addTo: admin @
gardenworld.com: j
avax.mail.internet.AddressException: Illegal whitespace in address in
string ``a
dmin @ gardenworld.com'' [12]
14:39:38,820 ERROR [STDERR] -----------> EMail.addTo: admin @
gardenworld.com: j
avax.mail.internet.AddressException: Illegal whitespace in address in
string ``a
dmin @ gardenworld.com'' [12]
14:39:38,834 ERROR [STDERR] -----------> EMail.isValid: No To [12]
14:39:38,838 ERROR [STDERR] -----------> EMail.isValid: No To [12]
14:39:38,842 ERROR [STDERR] -----------> EMail.isValid: No To [12]
14:39:38,850 ERROR [STDERR] -----------> EMail.isValid: No To [12]
14:39:39,047 ERROR [STDERR] -----------> MClient.sendEmailNow: Could
NOT Send Em
ail: Inactivity Alert: Request 10000002 to admin @ gardenworld.com:
Invalid Data
(GardenWorld) [12]
14:39:39,048 ERROR [STDERR] -----------> MClient.sendEmailNow: Could
NOT Send Em
ail: Inactivity Alert: Request 10000002 to admin @ gardenworld.com:
Invalid Data
(GardenWorld) [12]
14:42:40,329 ERROR [STDERR] -----------> MClient.createEMail: No To
address: MUs
er[0,Name=null,EMailUserID=null] [13]
14:42:40,330 ERROR [STDERR] -----------> MClient.createEMail: No To
address: MUs
er[0,Name=null,EMailUserID=null] [13]
14:42:53,197 INFO [STDOUT] 14:42:53,197 INFO
[XFireConfigurableServlet$Generic
WebApplicationContextX] No beans defined in application context
[org.codehaus.xf
ire.transport.http.XFireConfigurableServlet
$GenericWebApplicationContextX;hashCo
de=9018963]
14:42:53,251 INFO [STDOUT] 14:42:53,251 INFO [CollectionFactory]
Commons Colle
ctions 3.x available
14:42:53,269 INFO [STDOUT] 14:42:53,268 INFO
[XFireConfigurableServlet$Generic
WebApplicationContextX] Unable to locate MessageSource with name
'messageSource'
: using default
[org.springframework.context.support.DelegatingMessageSource@222
b9a]
14:42:53,280 INFO [STDOUT] 14:42:53,280 INFO
[XFireConfigurableServlet$Generic
WebApplicationContextX] Unable to locate ApplicationEventMulticaster
with name '
applicationEventMulticaster': using default
[org.springframework.context.event.S
impleApplicationEventMulticaster@137fded]
14:42:53,290 INFO [STDOUT] 14:42:53,290 INFO
[UiApplicationContextUtils] Unabl
e to locate ThemeSource with name 'themeSource': using default
[org.springframew
ork.ui.context.support.ResourceBundleThemeSource@21f9c0]
14:42:53,293 INFO [STDOUT] 14:42:53,292 INFO
[DefaultListableBeanFactory] Pre-
instantiating singletons in factory
[org.springframework.beans.factory.support.D
efaultListableBeanFactory defining beans []; root of BeanFactory
hierarchy]
14:42:53,407 INFO [STDOUT] 14:42:53,407 INFO
[XBeanXmlBeanDefinitionReader] Lo
ading XML bean definitions from class path resource [org/codehaus/
xfire/spring/x
fire.xml]
14:42:53,442 INFO [STDOUT] 14:42:53,442 INFO
[XBeanXmlBeanDefinitionReader] Lo
ading XML bean definitions from class path resource [org/codehaus/
xfire/spring/c
ustomEditors.xml]
14:42:53,889 INFO [STDOUT] 14:42:53,889 INFO
[XBeanXmlBeanDefinitionReader] Lo
ading XML bean definitions from class path resource [META-INF/xfire/
services.xml
]
14:42:53,979 INFO [STDOUT] 14:42:53,979 INFO
[GenericApplicationContext] 14 be
ans defined in application context
[org.codehaus.xfire.spring.GenericApplication
Context;hashCode=18703761]
14:42:54,126 INFO [STDOUT] 14:42:54,126 INFO
[GenericApplicationContext] Unabl
e to locate MessageSource with name 'messageSource': using default
[org.springfr
amework.context.support.DelegatingMessageSource@1c80063]
14:42:54,127 INFO [STDOUT] 14:42:54,127 INFO
[GenericApplicationContext] Unabl
e to locate ApplicationEventMulticaster with name
'applicationEventMulticaster':
using default
[org.springframework.context.event.SimpleApplicationEventMulticas
ter@19172db]
14:42:54,129 INFO [STDOUT] 14:42:54,128 INFO
[DefaultListableBeanFactory] Pre-
instantiating singletons in factory
[org.springframework.beans.factory.support.D
efaultListableBeanFactory defining beans
[xfire.customEditorConfigurer,xfire.ser
viceRegistry,xfire.transportManager,xfire,xfire.typeMappingRegistry,xfire.aegisB
indingProvider,xfire.serviceFactory,xfire.servletController,xfire.messageService
Factory,xfire.messageBindingProvider,org.codehaus.xfire.spring.ServiceBean,org.c
odehaus.xfire.spring.ServiceBean#1,org.codehaus.xfire.spring.ServiceBean#2,org.c
odehaus.xfire.spring.ServiceBean#3]; parent:
org.springframework.beans.factory.s
upport.DefaultListableBeanFactory defining beans []; root of
BeanFactory hierarc
hy]
14:42:56,071 INFO [STDOUT] 14:42:56,070 INFO [ServiceBean] Exposing
service wi
th name {http://3e.pl/ADInterface}ADService
14:42:56,195 INFO [STDOUT] 14:42:56,195 INFO [ServiceBean] Exposing
service wi
th name {http://3e.pl/ADInterface}ModelADService
14:42:56,354 INFO [STDOUT] 14:42:56,354 INFO [ServiceBean] Exposing
service wi
th name {http://externalSales.ws.erpCommon.openbravo.org}ExternalSales
14:42:56,413 INFO [STDOUT] 14:42:56,413 INFO [ServiceBean] Exposing
service wi
th name {http://externalSales.ws.erpCommon.openbravo.org}WebService
14:42:57,452 INFO [STDOUT] 14:42:57,449 ERROR [DefaultFaultHandler]
Fault occur
red!
java.lang.NullPointerException
at
com._3e.ADInterface.ModelADServiceImpl.modelLogin(ModelADServiceImpl.
java:321)
at
com._3e.ADInterface.ModelADServiceImpl.runProcess(ModelADServiceImpl.
java:401)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInv
oker.java:59)
at
org.codehaus.xfire.service.invoker.ObjectInvoker.invoke(ObjectInvoker
.java:45)
at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessa
ge(ServiceInvocationHandler.java:320)
at org.codehaus.xfire.service.binding.ServiceInvocationHandler
$1.run(Ser
viceInvocationHandler.java:86)
at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(S
erviceInvocationHandler.java:134)
at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(Se
rviceInvocationHandler.java:109)
at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.jav
a:131)
at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoin
t.java:64)
at
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.
java:38)
at
org.codehaus.xfire.transport.http.XFireServletController.invoke(XFire
ServletController.java:304)
at
org.codehaus.xfire.transport.http.XFireServletController.doService(XF
ireServletController.java:129)
at
org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.ja
va:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:182)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:44
6)
at java.lang.Thread.run(Thread.java:662)


On 12月7日, 上午10时57分, Carlos Antonio Ruiz Gomez <car...@gmail.com>
wrote:


> Hi chen li, can you please upload a compressed file with the console log?
>
> Regards,
>
> Carlos Ruiz

> > > - 显示引用的文字 -- 隐藏被引用文字 -
>
> - 显示引用的文字 -

armenrz

unread,
Jan 24, 2012, 6:26:55 AM1/24/12
to iDempiere
Hi Chen Li,

How is it going on so far ?
As far as I know, when you're using Service Type Run_Process, you
don't need to fill in the table.

Armen
> ...
>
> read more >>

Carlos Antonio Ruiz Gomez

unread,
Jan 26, 2012, 11:59:07 PM1/26/12
to idem...@googlegroups.com
Hi Chen, seems like you have a problem with the warehouse configuration,
probably you don't have a default warehouse, or the user you're using
don't have access to any.

Regards,

Carlos Ruiz

chen li

unread,
Feb 14, 2012, 9:10:01 PM2/14/12
to iDempiere
Thanks carlos and armenz, your support really works.

Another question raised up, i try to use the queryData webservice with
a LOOKUP for some culumns which ends with "_ID" linkage to another
table.

But it doesn't work?

i try to use the "populating the combo-box list" in "Adempiere 3.6
book" page 76, it worked.

So how could i make a similiar function in web service "queryData" ?

Thanks very much.

On 1月27日, 下午12时59分, Carlos Antonio Ruiz Gomez <car...@gmail.com>
wrote:
> > the problem :)- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Carlos Ruiz

unread,
Feb 23, 2012, 9:22:00 AM2/23/12
to iDempiere
Hi Chen, I think you better use the getList service:
http://www.adempiere.com/Adempiere_Web_Services#getList

Regards,

Carlos Ruiz
Reply all
Reply to author
Forward
0 new messages