Hi,
I have hosted one service in Ofbiz as webservices, <service name="updateScanResult" export="true" auth="false" engine="soap" location="http://localhost:8080/webtools/control/SOAPService" invoke="updateScanResult"> <description>add the scan details to the database</description> <attribute name="scanResult" type="String" mode="IN" optional="false"/> <attribute name="response" type="String" mode="OUT" optional="true"/> </service> And I am calling this service through a standalone class public static void main(String str[]) { String output=null; String endpoint,inputParam, username, password; inputParam= "orderId"; try{ endpoint = "http://localhost:8080/webtools/control/SOAPService"; username="admin"; password="ofbiz"; Call call = (Call) new Service().createCall(); call.setTargetEndpointAddress(new URL (endpoint)); call.setOperationName(new javax.xml.namespace.QName("updateScanResult")); call.addParameter ("scanResult", org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); Object response = call.invoke(new Object[]{inputParam}); output = (String) response; try{ System.out.println(output); } catch(Exception e){ e.printStackTrace(); } }catch(Exception e){ e.printStackTrace(); } } Not sure what wrong am doing, but there is no response from the service back to the calling client. However in the logs I am seeing that the SOAPEngine is invoked.. 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:39,414 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:104:INFO ] [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: scanResult (IN) - 0 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: userLogin (INOUT) - 1 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: locale (INOUT) - 2 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: timeZone (INOUT) - 3 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:136:INFO ] [SOAPClientEngine.invoke] : Sending Call To SOAP Server 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ControlEventListener.java:63 :INFO ] Creating session: 000E9158D77B97A81E928B0AB38B211F.jvm1 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [Request]: /webtools/control/SOAPService 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 18 messages due to full event buffer including: [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Creating session: CD55E84B19E7258E0E850B0A1499009C.jvm1 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:20:27,063 (default-invoker-Thread-10) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-10] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-8) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-8] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-7) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-7] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-11) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-11] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-9) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-9] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,141 (default-invoker-Thread-9) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@134d2bf[20304] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-11) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@f7fa37[20303] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-10) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@95ec91[20302] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-7) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@1290d3[20300] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-8) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@c18933[20301] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 8 messages due to full event buffer including: Sync service [JobDispatcher/sendEmailDated] finished in [313] milliseconds 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 3 messages due to full event buffer including: [CommonPermissionServices.xml#genericBasePermissionCheck] Checking for primary permission ACCOUNTING_CREATE Thanks & Regards, Deepa ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ |
Hi Deepa,
Did you try the request with SoapUI ? You will get the exact problem in that. Regards -- Chirag Manocha Emforium Software Pvt. Ltd. | ALL-IN Software +91-98735-47457 | +91-98263-19099 Please don't print this Email unless you really need to - this will preserve trees on planet earth. From: "Deepa Priolkar" <[hidden email]> To: [hidden email] Sent: Tuesday, October 26, 2010 7:21:17 PM Subject: Ofbiz Service as Webservice - Need Help Hi, I have hosted one service in Ofbiz as webservices, <service name="updateScanResult" export="true" auth="false" engine="soap" location="http://localhost:8080/webtools/control/SOAPService" invoke="updateScanResult"> <description>add the scan details to the database</description> <attribute name="scanResult" type="String" mode="IN" optional="false"/> <attribute name="response" type="String" mode="OUT" optional="true"/> </service> And I am calling this service through a standalone class public static void main(String str[]) { String output=null; String endpoint,inputParam, username, password; inputParam= "orderId"; try{ endpoint = "http://localhost:8080/webtools/control/SOAPService"; username="admin"; password="ofbiz"; Call call = (Call) new Service().createCall(); call.setTargetEndpointAddress(new URL (endpoint)); call.setOperationName(new javax.xml.namespace.QName("updateScanResult")); call.addParameter ("scanResult", org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); Object response = call.invoke(new Object[]{inputParam}); output = (String) response; try{ System.out.println(output); } catch(Exception e){ e.printStackTrace(); } }catch(Exception e){ e.printStackTrace(); } } Not sure what wrong am doing, but there is no response from the service back to the calling client. However in the logs I am seeing that the SOAPEngine is invoked.. 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:39,414 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:104:INFO ] [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: scanResult (IN) - 0 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: userLogin (INOUT) - 1 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: locale (INOUT) - 2 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: timeZone (INOUT) - 3 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:136:INFO ] [SOAPClientEngine.invoke] : Sending Call To SOAP Server 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ControlEventListener.java:63 :INFO ] Creating session: 000E9158D77B97A81E928B0AB38B211F.jvm1 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [Request]: /webtools/control/SOAPService 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 18 messages due to full event buffer including: [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Creating session: CD55E84B19E7258E0E850B0A1499009C.jvm1 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:20:27,063 (default-invoker-Thread-10) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-10] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-8) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-8] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-7) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-7] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-11) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-11] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-9) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-9] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,141 (default-invoker-Thread-9) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@134d2bf[20304] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-11) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@f7fa37[20303] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-10) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@95ec91[20302] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-7) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@1290d3[20300] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-8) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@c18933[20301] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 8 messages due to full event buffer including: Sync service [JobDispatcher/sendEmailDated] finished in [313] milliseconds 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 3 messages due to full event buffer including: [CommonPermissionServices.xml#genericBasePermissionCheck] Checking for primary permission ACCOUNTING_CREATE Thanks & Regards, Deepa ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ |
Hi Chirag,
I haven’t tried with the SOAP UI, but the issue with my case is when I am trying to invoke the service, the call comes to SOAPClientEngine, but then it goes in infinite loop which I am not able to understand.. can you please give me some leads to fix this issue... -----Original Message----- From: Chirag Manocha [mailto:[hidden email]] Sent: Wednesday, October 27, 2010 10:04 AM To: [hidden email] Subject: Re: Ofbiz Service as Webservice - Need Help Hi Deepa, Did you try the request with SoapUI ? You will get the exact problem in that. Regards -- Chirag Manocha Emforium Software Pvt. Ltd. | ALL-IN Software +91-98735-47457 | +91-98263-19099 Please don't print this Email unless you really need to - this will preserve trees on planet earth. From: "Deepa Priolkar" <[hidden email]> To: [hidden email] Sent: Tuesday, October 26, 2010 7:21:17 PM Subject: Ofbiz Service as Webservice - Need Help Hi, I have hosted one service in Ofbiz as webservices, <service name="updateScanResult" export="true" auth="false" engine="soap" location="http://localhost:8080/webtools/control/SOAPService" invoke="updateScanResult"> <description>add the scan details to the database</description> <attribute name="scanResult" type="String" mode="IN" optional="false"/> <attribute name="response" type="String" mode="OUT" optional="true"/> </service> And I am calling this service through a standalone class public static void main(String str[]) { String output=null; String endpoint,inputParam, username, password; inputParam= "orderId"; try{ endpoint = "http://localhost:8080/webtools/control/SOAPService"; username="admin"; password="ofbiz"; Call call = (Call) new Service().createCall(); call.setTargetEndpointAddress(new URL (endpoint)); call.setOperationName(new javax.xml.namespace.QName("updateScanResult")); call.addParameter ("scanResult", org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); Object response = call.invoke(new Object[]{inputParam}); output = (String) response; try{ System.out.println(output); } catch(Exception e){ e.printStackTrace(); } }catch(Exception e){ e.printStackTrace(); } } Not sure what wrong am doing, but there is no response from the service back to the calling client. However in the logs I am seeing that the SOAPEngine is invoked.. 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:39,414 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:104:INFO ] [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: scanResult (IN) - 0 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: userLogin (INOUT) - 1 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: locale (INOUT) - 2 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: timeZone (INOUT) - 3 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:136:INFO ] [SOAPClientEngine.invoke] : Sending Call To SOAP Server 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ControlEventListener.java:63 :INFO ] Creating session: 000E9158D77B97A81E928B0AB38B211F.jvm1 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [Request]: /webtools/control/SOAPService 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 18 messages due to full event buffer including: [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Creating session: CD55E84B19E7258E0E850B0A1499009C.jvm1 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:20:27,063 (default-invoker-Thread-10) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-10] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-8) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-8] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-7) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-7] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-11) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-11] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-9) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-9] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,141 (default-invoker-Thread-9) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@134d2bf[20304] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-11) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@f7fa37[20303] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-10) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@95ec91[20302] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-7) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@1290d3[20300] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-8) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@c18933[20301] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 8 messages due to full event buffer including: Sync service [JobDispatcher/sendEmailDated] finished in [313] milliseconds 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 3 messages due to full event buffer including: [CommonPermissionServices.xml#genericBasePermissionCheck] Checking for primary permission ACCOUNTING_CREATE Thanks & Regards, Deepa ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ |
This means that its coming to OFBiz and you can trace by putting logs or debug mode that why its getting in the infinite loop. Right ? I also have to check this.
Regards -- Chirag Manocha Emforium Software Pvt. Ltd. | ALL-IN Software +91-98735-47457 | +91-98263-19099 Please don't print this Email unless you really need to - this will preserve trees on planet earth. From: "Deepa Priolkar" <[hidden email]> To: [hidden email] Sent: Wednesday, October 27, 2010 1:30:20 PM Subject: RE: Ofbiz Service as Webservice - Need Help Hi Chirag, I haven’t tried with the SOAP UI, but the issue with my case is when I am trying to invoke the service, the call comes to SOAPClientEngine, but then it goes in infinite loop which I am not able to understand.. can you please give me some leads to fix this issue... -----Original Message----- From: Chirag Manocha [mailto:[hidden email]] Sent: Wednesday, October 27, 2010 10:04 AM To: [hidden email] Subject: Re: Ofbiz Service as Webservice - Need Help Hi Deepa, Did you try the request with SoapUI ? You will get the exact problem in that. Regards -- Chirag Manocha Emforium Software Pvt. Ltd. | ALL-IN Software +91-98735-47457 | +91-98263-19099 Please don't print this Email unless you really need to - this will preserve trees on planet earth. From: "Deepa Priolkar" <[hidden email]> To: [hidden email] Sent: Tuesday, October 26, 2010 7:21:17 PM Subject: Ofbiz Service as Webservice - Need Help Hi, I have hosted one service in Ofbiz as webservices, <service name="updateScanResult" export="true" auth="false" engine="soap" location="http://localhost:8080/webtools/control/SOAPService" invoke="updateScanResult"> <description>add the scan details to the database</description> <attribute name="scanResult" type="String" mode="IN" optional="false"/> <attribute name="response" type="String" mode="OUT" optional="true"/> </service> And I am calling this service through a standalone class public static void main(String str[]) { String output=null; String endpoint,inputParam, username, password; inputParam= "orderId"; try{ endpoint = "http://localhost:8080/webtools/control/SOAPService"; username="admin"; password="ofbiz"; Call call = (Call) new Service().createCall(); call.setTargetEndpointAddress(new URL (endpoint)); call.setOperationName(new javax.xml.namespace.QName("updateScanResult")); call.addParameter ("scanResult", org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); Object response = call.invoke(new Object[]{inputParam}); output = (String) response; try{ System.out.println(output); } catch(Exception e){ e.printStackTrace(); } }catch(Exception e){ e.printStackTrace(); } } Not sure what wrong am doing, but there is no response from the service back to the calling client. However in the logs I am seeing that the SOAPEngine is invoked.. 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:39,414 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:104:INFO ] [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: scanResult (IN) - 0 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: userLogin (INOUT) - 1 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: locale (INOUT) - 2 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: timeZone (INOUT) - 3 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:136:INFO ] [SOAPClientEngine.invoke] : Sending Call To SOAP Server 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ControlEventListener.java:63 :INFO ] Creating session: 000E9158D77B97A81E928B0AB38B211F.jvm1 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [Request]: /webtools/control/SOAPService 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 18 messages due to full event buffer including: [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Creating session: CD55E84B19E7258E0E850B0A1499009C.jvm1 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:20:27,063 (default-invoker-Thread-10) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-10] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-8) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-8] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-7) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-7] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-11) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-11] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-9) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-9] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,141 (default-invoker-Thread-9) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@134d2bf[20304] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-11) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@f7fa37[20303] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-10) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@95ec91[20302] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-7) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@1290d3[20300] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-8) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@c18933[20301] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 8 messages due to full event buffer including: Sync service [JobDispatcher/sendEmailDated] finished in [313] milliseconds 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 3 messages due to full event buffer including: [CommonPermissionServices.xml#genericBasePermissionCheck] Checking for primary permission ACCOUNTING_CREATE Thanks & Regards, Deepa ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ |
Hi Chirag,
This is fixed now.. the issue was I calling back the same soap service, instead of forwarding the request to another service.. Now I have one questions.. is it possible to map one of the input parameter as user defined object.. something like <service name="updateScanResult" export="true" auth="false" engine="soap" location="http://localhost:8080/webtools/control/SOAPService" invoke="updateResult"> <description>add the scan details to the database</description> <attribute name="scanResult" type="com.pci.asvengine.ScanResultData" mode="IN" optional="false"/> <attribute name="response" type="String" mode="OUT" optional="true"/> </service> I have made the changes in our calling client to have the parameter type as ScanResultData scanResultData = new ScanResultData(); scanResultData.setEngine("ASVEngine"); scanResultData.setResult("success"); call.addParameter ("scanResult", org.apache.axis.Constants.XSD_ANY,javax.xml.rpc.ParameterMode.IN); but it gives me error which says.. xisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: No serializer found for class com.pci.asvengine.ScanResultData in registry org.apache.axis.encoding.TypeMappingDelegate@18f6235 faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class com.pci.asvengine.ScanResultData in registry org.apache.axis.encoding.TypeMappingDelegate@18f6235 Deepa -----Original Message----- From: Chirag Manocha [mailto:[hidden email]] Sent: Wednesday, October 27, 2010 1:42 PM To: [hidden email] Subject: Re: Ofbiz Service as Webservice - Need Help This means that its coming to OFBiz and you can trace by putting logs or debug mode that why its getting in the infinite loop. Right ? I also have to check this. Regards -- Chirag Manocha Emforium Software Pvt. Ltd. | ALL-IN Software +91-98735-47457 | +91-98263-19099 Please don't print this Email unless you really need to - this will preserve trees on planet earth. From: "Deepa Priolkar" <[hidden email]> To: [hidden email] Sent: Wednesday, October 27, 2010 1:30:20 PM Subject: RE: Ofbiz Service as Webservice - Need Help Hi Chirag, I haven’t tried with the SOAP UI, but the issue with my case is when I am trying to invoke the service, the call comes to SOAPClientEngine, but then it goes in infinite loop which I am not able to understand.. can you please give me some leads to fix this issue... -----Original Message----- From: Chirag Manocha [mailto:[hidden email]] Sent: Wednesday, October 27, 2010 10:04 AM To: [hidden email] Subject: Re: Ofbiz Service as Webservice - Need Help Hi Deepa, Did you try the request with SoapUI ? You will get the exact problem in that. Regards -- Chirag Manocha Emforium Software Pvt. Ltd. | ALL-IN Software +91-98735-47457 | +91-98263-19099 Please don't print this Email unless you really need to - this will preserve trees on planet earth. From: "Deepa Priolkar" <[hidden email]> To: [hidden email] Sent: Tuesday, October 26, 2010 7:21:17 PM Subject: Ofbiz Service as Webservice - Need Help Hi, I have hosted one service in Ofbiz as webservices, <service name="updateScanResult" export="true" auth="false" engine="soap" location="http://localhost:8080/webtools/control/SOAPService" invoke="updateScanResult"> <description>add the scan details to the database</description> <attribute name="scanResult" type="String" mode="IN" optional="false"/> <attribute name="response" type="String" mode="OUT" optional="true"/> </service> And I am calling this service through a standalone class public static void main(String str[]) { String output=null; String endpoint,inputParam, username, password; inputParam= "orderId"; try{ endpoint = "http://localhost:8080/webtools/control/SOAPService"; username="admin"; password="ofbiz"; Call call = (Call) new Service().createCall(); call.setTargetEndpointAddress(new URL (endpoint)); call.setOperationName(new javax.xml.namespace.QName("updateScanResult")); call.addParameter ("scanResult", org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); Object response = call.invoke(new Object[]{inputParam}); output = (String) response; try{ System.out.println(output); } catch(Exception e){ e.printStackTrace(); } }catch(Exception e){ e.printStackTrace(); } } Not sure what wrong am doing, but there is no response from the service back to the calling client. However in the logs I am seeing that the SOAPEngine is invoked.. 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:39,414 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:104:INFO ] [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: scanResult (IN) - 0 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: userLogin (INOUT) - 1 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: locale (INOUT) - 2 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: timeZone (INOUT) - 3 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:136:INFO ] [SOAPClientEngine.invoke] : Sending Call To SOAP Server 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ControlEventListener.java:63 :INFO ] Creating session: 000E9158D77B97A81E928B0AB38B211F.jvm1 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [Request]: /webtools/control/SOAPService 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 18 messages due to full event buffer including: [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Creating session: CD55E84B19E7258E0E850B0A1499009C.jvm1 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:20:27,063 (default-invoker-Thread-10) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-10] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-8) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-8] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-7) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-7] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-11) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-11] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-9) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-9] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,141 (default-invoker-Thread-9) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@134d2bf[20304] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-11) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@f7fa37[20303] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-10) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@95ec91[20302] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-7) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@1290d3[20300] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-8) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@c18933[20301] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 8 messages due to full event buffer including: Sync service [JobDispatcher/sendEmailDated] finished in [313] milliseconds 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 3 messages due to full event buffer including: [CommonPermissionServices.xml#genericBasePermissionCheck] Checking for primary permission ACCOUNTING_CREATE Thanks & Regards, Deepa ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ |
When I am trying to export the service as a wsdl it gives an error.. so not sure if we can have userdefined object for the service which is exposed as webservice.. please advice.
WSDLException: faultCode=OTHER_ERROR: Service cannot be described with WSDL (scanResult / com.pci.asvengine.ScanResultData) -----Original Message----- From: Deepa Priolkar [mailto:[hidden email]] Sent: Wednesday, October 27, 2010 2:44 PM To: [hidden email] Subject: RE: Ofbiz Service as Webservice - Need Help Hi Chirag, This is fixed now.. the issue was I calling back the same soap service, instead of forwarding the request to another service.. Now I have one questions.. is it possible to map one of the input parameter as user defined object.. something like <service name="updateScanResult" export="true" auth="false" engine="soap" location="http://localhost:8080/webtools/control/SOAPService" invoke="updateResult"> <description>add the scan details to the database</description> <attribute name="scanResult" type="com.pci.asvengine.ScanResultData" mode="IN" optional="false"/> <attribute name="response" type="String" mode="OUT" optional="true"/> </service> I have made the changes in our calling client to have the parameter type as ScanResultData scanResultData = new ScanResultData(); scanResultData.setEngine("ASVEngine"); scanResultData.setResult("success"); call.addParameter ("scanResult", org.apache.axis.Constants.XSD_ANY,javax.xml.rpc.ParameterMode.IN); but it gives me error which says.. xisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: No serializer found for class com.pci.asvengine.ScanResultData in registry org.apache.axis.encoding.TypeMappingDelegate@18f6235 faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class com.pci.asvengine.ScanResultData in registry org.apache.axis.encoding.TypeMappingDelegate@18f6235 Deepa -----Original Message----- From: Chirag Manocha [mailto:[hidden email]] Sent: Wednesday, October 27, 2010 1:42 PM To: [hidden email] Subject: Re: Ofbiz Service as Webservice - Need Help This means that its coming to OFBiz and you can trace by putting logs or debug mode that why its getting in the infinite loop. Right ? I also have to check this. Regards -- Chirag Manocha Emforium Software Pvt. Ltd. | ALL-IN Software +91-98735-47457 | +91-98263-19099 Please don't print this Email unless you really need to - this will preserve trees on planet earth. From: "Deepa Priolkar" <[hidden email]> To: [hidden email] Sent: Wednesday, October 27, 2010 1:30:20 PM Subject: RE: Ofbiz Service as Webservice - Need Help Hi Chirag, I haven’t tried with the SOAP UI, but the issue with my case is when I am trying to invoke the service, the call comes to SOAPClientEngine, but then it goes in infinite loop which I am not able to understand.. can you please give me some leads to fix this issue... -----Original Message----- From: Chirag Manocha [mailto:[hidden email]] Sent: Wednesday, October 27, 2010 10:04 AM To: [hidden email] Subject: Re: Ofbiz Service as Webservice - Need Help Hi Deepa, Did you try the request with SoapUI ? You will get the exact problem in that. Regards -- Chirag Manocha Emforium Software Pvt. Ltd. | ALL-IN Software +91-98735-47457 | +91-98263-19099 Please don't print this Email unless you really need to - this will preserve trees on planet earth. From: "Deepa Priolkar" <[hidden email]> To: [hidden email] Sent: Tuesday, October 26, 2010 7:21:17 PM Subject: Ofbiz Service as Webservice - Need Help Hi, I have hosted one service in Ofbiz as webservices, <service name="updateScanResult" export="true" auth="false" engine="soap" location="http://localhost:8080/webtools/control/SOAPService" invoke="updateScanResult"> <description>add the scan details to the database</description> <attribute name="scanResult" type="String" mode="IN" optional="false"/> <attribute name="response" type="String" mode="OUT" optional="true"/> </service> And I am calling this service through a standalone class public static void main(String str[]) { String output=null; String endpoint,inputParam, username, password; inputParam= "orderId"; try{ endpoint = "http://localhost:8080/webtools/control/SOAPService"; username="admin"; password="ofbiz"; Call call = (Call) new Service().createCall(); call.setTargetEndpointAddress(new URL (endpoint)); call.setOperationName(new javax.xml.namespace.QName("updateScanResult")); call.addParameter ("scanResult", org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); Object response = call.invoke(new Object[]{inputParam}); output = (String) response; try{ System.out.println(output); } catch(Exception e){ e.printStackTrace(); } }catch(Exception e){ e.printStackTrace(); } } Not sure what wrong am doing, but there is no response from the service back to the calling client. However in the logs I am seeing that the SOAPEngine is invoked.. 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,289 (http-0.0.0.0-8080-97) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:39,414 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:104:INFO ] [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: scanResult (IN) - 0 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: userLogin (INOUT) - 1 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: locale (INOUT) - 2 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:119:INFO ] [SOAPClientEngine.invoke} : Parameter: timeZone (INOUT) - 3 2010-10-26 19:16:39,429 (http-0.0.0.0-8080-97) [ SOAPClientEngine.java:136:INFO ] [SOAPClientEngine.invoke] : Sending Call To SOAP Server 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ControlEventListener.java:63 :INFO ] Creating session: 000E9158D77B97A81E928B0AB38B211F.jvm1 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ContextFilter.java:193:INFO ] [Request]: /webtools/control/SOAPService 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ ControlServlet.java:131:INFO ] [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:16:39,570 (http-0.0.0.0-8080-98) [ VisitHandler.java:221:INFO ] Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [Request]: /webtools/control/SOAPService 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 18 messages due to full event buffer including: [SOAPClientEngine.invoke] : Parameter length - 4 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Found visitorId [null] in cookie 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: Creating session: CD55E84B19E7258E0E850B0A1499009C.jvm1 2010-10-26 19:16:40,211 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 2 messages due to full event buffer including: [[[SOAPService] Request Begun, encoding=[utf-8]- total:0.0,since last(Begin):0.0]] 2010-10-26 19:20:27,063 (default-invoker-Thread-10) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-10] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-8) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-8] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,063 (default-invoker-Thread-7) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-7] received job [Send Email] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-11) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-11] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,079 (default-invoker-Thread-9) [ JobInvoker.java:231:INFO ] Invoker [default-invoker-Thread-9] received job [Auto-create Fixed Asset Maintenances] from poller [org.ofbiz.service.job.JobPoller@757fad] 2010-10-26 19:20:27,141 (default-invoker-Thread-9) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@134d2bf[20304] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-11) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@f7fa37[20303] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,141 (default-invoker-Thread-10) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@95ec91[20302] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-7) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@1290d3[20300] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:27,173 (default-invoker-Thread-8) [PersistedServiceJob.java:176:INFO ] org.ofbiz.service.job.PersistedServiceJob@c18933[20301] -- Next runtime: Tue Oct 26 19:25:27 IST 2010 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 8 messages due to full event buffer including: Sync service [JobDispatcher/sendEmailDated] finished in [313] milliseconds 2010-10-26 19:20:28,001 (Dispatcher-Thread-1) [ ?:? :INFO ] Discarded 3 messages due to full event buffer including: [CommonPermissionServices.xml#genericBasePermissionCheck] Checking for primary permission ACCOUNTING_CREATE Thanks & Regards, Deepa ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ ============================================================================================================================Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================ |
Free forum by Nabble | Edit this page |