Hi Deval,
OK. A ref parameter is both an input and an output. Is there anything in the mapEntryArray after you've called the CallupdateInventory method? Cheers Paul Foxworthy
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
Hello Paul.
After CallUpdateInventory method call, the mapEntryArray beocomes null. That means in ofBiz the mapEntryArray is processed and then after it becomes null in ofbiz.
so, after calling CallUpdateInventory in .net, the value for mapEntryArray is null. In ofBiz, i debug the code and found that, the values set in mapEntryArray from c# is retrieved successfully. And after proccessing, the ofbiz method returns the required paramaters . But, i did not come to know that, then after from where the map becomes null ???
Thanks in advance.
Regards, Deval
|
Hi Deval,
I tried to create a .NET web service that returned a Dictionary, then to consume it from another .NET application. When I tried to consume it, I got the error message "The type ... is not supported because it implements IDictionary". It seems Microsoft's XmlSerializer mandates custom serialization and deserialization of Dictionary and Hashtable, which are the .NET equivalents of Map. In other words, you can't use those types in a web service. See discussions of the issue at http://stackoverflow.com/questions/679050/how-to-return-generic-dictionary-in-a-webservice, http://blogs.msdn.com/b/adam/archive/2010/09/10/how-to-serialize-a-dictionary-or-hashtable-in-c.aspx, http://forums.asp.net/t/63683.aspx/1, http://forums.asp.net/t/1567938.aspx/1 You can regard this as a limitation or bug that has been addressed in WCF. Here's an article from Stack Overflow where someone overcame a similar problem by just doing an HTTP request for the URL, then parsing the XML themselves. http://stackoverflow.com/questions/1132536/consuming-apachesoapmap-complex-datatype-in-webservice-using-net Alternatives I can think of: - Go to WCF and do something like http://www.request-response.com/blog/PermaLink,guid,ff5fab81-affb-4b2b-aa67-c80bdfc86cbd.aspx - Do as Rajbir Saini suggested: write a new web service in Java that packages the data you want in a more accessible format for .NET. Cheers Paul Foxworthy
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
In reply to this post by Rajbir Saini
Rajbir,
You have suggested to wrap the ofBiz services into our own SOAP services that returns the primitives types or whatever we want. So, does the SOAP services will be implemented and deployed in ofBiz ? because, i am not clear about how to fit the independent SOAP services into the ofBiz framework. Thanks in advance. Regards, Deval |
Deval,
Yes, you will need to implement the SOAP services and deploy them in the OFBiz. You can use Axis2 (Older version is part of OFBiz) or you can use CXF to deploy your services. I understand it is going to be a lot of work but I think this is the best way out looking at the state of OFBiz exported web services. Thanks, Raj On Friday 11 May 2012 10:38 AM, devalpatel wrote: > Rajbir, > > You have suggested to wrap the ofBiz services into our own SOAP services > that returns the primitives types or whatever we want. > > So, does the SOAP services will be implemented and deployed in ofBiz ? > because, i am not clear about how to fit the independent SOAP services into > the ofBiz framework. > > Thanks in advance. > > Regards, > Deval > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625479.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Hi Rajbir,
Thanks for the reply.
How to deploy the soap service in ofBiz. Means,
if I create a new project for implementing a SOAP webservice,
how to deploy it in ofBiz?
Can you give some simple steps or example...For
exmplae . 1) create a soap webservice. 2) put the war into XXX folder into
ofBiz... 3) required components etc........
Just brief level direction for implementing
wrapper soap service............
Thanks in advance.
Regards,
Deval
|
Hi Deval,
Below is rough outline of the step to deploy a web service using CXF. You can replace CXF with any other web services engine such as Axis2. 1. Download CXF web application from Apache CXF. 2. Create OFBiz component in hot-deploy or you can use your existing component. 3. Configure CXF servlet into the web.xml. You may need to copy the CXF jar files in the lib folder of your component. 4. Deploy your services using cxf.xml. You can inject Delegator and LocalDispatcher using Spring beans and use the dispatcher to call the OFBiz services within your web service. Thanks, Raj On Friday 11 May 2012 06:41 PM, devalpatel wrote: > Hi Rajbir, > > Thanks for the reply. > > How to deploy the soap service in ofBiz. Means, if I create a new project for implementing a SOAP webservice, how to deploy it in ofBiz? > > Can you give some simple steps or example...For exmplae . 1) create a soap webservice. 2) put the war into XXX folder into ofBiz... 3) required components etc........ > > Just brief level direction for implementing wrapper soap service............ > > Thanks in advance. > > Regards, > > Deval > ----- Original Message ----- > From: Rajbir Saini [via OFBiz] > To: devalpatel > Sent: Friday, May 11, 2012 11:30 AM > Subject: Re: how to use ofBiz service in .Net application? > > > Deval, > > Yes, you will need to implement the SOAP services and deploy them in the > OFBiz. You can use Axis2 (Older version is part of OFBiz) or you can use > CXF to deploy your services. I understand it is going to be a lot of > work but I think this is the best way out looking at the state of OFBiz > exported web services. > > Thanks, > > Raj > > On Friday 11 May 2012 10:38 AM, devalpatel wrote: > > > Rajbir, > > > > You have suggested to wrap the ofBiz services into our own SOAP services > > that returns the primitives types or whatever we want. > > > > So, does the SOAP services will be implemented and deployed in ofBiz ? > > because, i am not clear about how to fit the independent SOAP services into > > the ofBiz framework. > > > > Thanks in advance. > > > > Regards, > > Deval > > > > -- > > View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625479.html > > Sent from the OFBiz - User mailing list archive at Nabble.com. > > > > > > > ------------------------------------------------------------------------------ > > If you reply to this email, your message will be added to the discussion below: > http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625558.html > To unsubscribe from Re: how to use ofBiz service in .Net application?, click here. > NAML > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626369.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
Administrator
|
BTW we could build an adapter for that. I mean to encapsulate OFBiz services in CXF when needed...
Also be careful from the other side if ever you use also CXF: https://issues.apache.org/jira/browse/OFBIZ-4245 Jacques From: "Rajbir Saini" <[hidden email]> > Hi Deval, > > Below is rough outline of the step to deploy a web service using CXF. You can replace CXF with any other web services engine such > as Axis2. > > 1. Download CXF web application from Apache CXF. > 2. Create OFBiz component in hot-deploy or you can use your existing component. > 3. Configure CXF servlet into the web.xml. You may need to copy the CXF jar files in the lib folder of your component. > 4. Deploy your services using cxf.xml. You can inject Delegator and LocalDispatcher using Spring beans and use the dispatcher to > call the OFBiz services within your web service. > > Thanks, > > Raj > > On Friday 11 May 2012 06:41 PM, devalpatel wrote: >> Hi Rajbir, >> >> Thanks for the reply. >> >> How to deploy the soap service in ofBiz. Means, if I create a new project for implementing a SOAP webservice, how to deploy it >> in ofBiz? >> >> Can you give some simple steps or example...For exmplae . 1) create a soap webservice. 2) put the war into XXX folder into >> ofBiz... 3) required components etc........ >> >> Just brief level direction for implementing wrapper soap service............ >> >> Thanks in advance. >> >> Regards, >> >> Deval >> ----- Original Message ----- >> From: Rajbir Saini [via OFBiz] >> To: devalpatel >> Sent: Friday, May 11, 2012 11:30 AM >> Subject: Re: how to use ofBiz service in .Net application? >> >> >> Deval, >> >> Yes, you will need to implement the SOAP services and deploy them in the >> OFBiz. You can use Axis2 (Older version is part of OFBiz) or you can use >> CXF to deploy your services. I understand it is going to be a lot of >> work but I think this is the best way out looking at the state of OFBiz >> exported web services. >> >> Thanks, >> >> Raj >> >> On Friday 11 May 2012 10:38 AM, devalpatel wrote: >> >> > Rajbir, >> > >> > You have suggested to wrap the ofBiz services into our own SOAP services >> > that returns the primitives types or whatever we want. >> > >> > So, does the SOAP services will be implemented and deployed in ofBiz ? >> > because, i am not clear about how to fit the independent SOAP services into >> > the ofBiz framework. >> > >> > Thanks in advance. >> > >> > Regards, >> > Deval >> > >> > -- >> > View this message in context: >> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625479.html >> > Sent from the OFBiz - User mailing list archive at Nabble.com. >> > >> >> >> >> >> ------------------------------------------------------------------------------ >> >> If you reply to this email, your message will be added to the discussion below: >> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625558.html >> To unsubscribe from Re: how to use ofBiz service in .Net application?, click here. >> NAML >> >> -- >> View this message in context: >> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626369.html >> Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Jacques,
Is there any other solution to my problem of
calling ofBiz services from .Net? .........may be different
perspective?
|
Administrator
|
Sorry, I never worked with SOAP + .Net.
I'd follow Paul recommendation about WCF Jacques From: "devalpatel" <[hidden email]> > Jacques, > > Is there any other solution to my problem of calling ofBiz services from .Net? .........may be different perspective? > > > ----- Original Message ----- > From: Jacques Le Roux [via OFBiz] > To: devalpatel > Sent: Friday, May 11, 2012 7:53 PM > Subject: Re: how to use ofBiz service in .Net application? > > > BTW we could build an adapter for that. I mean to encapsulate OFBiz services in CXF when needed... > Also be careful from the other side if ever you use also CXF: https://issues.apache.org/jira/browse/OFBIZ-4245 > > Jacques > > From: "Rajbir Saini" <[hidden email]> > > > Hi Deval, > > > > Below is rough outline of the step to deploy a web service using CXF. You can replace CXF with any other web services engine > such > > as Axis2. > > > > 1. Download CXF web application from Apache CXF. > > 2. Create OFBiz component in hot-deploy or you can use your existing component. > > 3. Configure CXF servlet into the web.xml. You may need to copy the CXF jar files in the lib folder of your component. > > 4. Deploy your services using cxf.xml. You can inject Delegator and LocalDispatcher using Spring beans and use the dispatcher > to > > call the OFBiz services within your web service. > > > > Thanks, > > > > Raj > > > > On Friday 11 May 2012 06:41 PM, devalpatel wrote: > >> Hi Rajbir, > >> > >> Thanks for the reply. > >> > >> How to deploy the soap service in ofBiz. Means, if I create a new project for implementing a SOAP webservice, how to deploy > it > >> in ofBiz? > >> > >> Can you give some simple steps or example...For exmplae . 1) create a soap webservice. 2) put the war into XXX folder into > >> ofBiz... 3) required components etc........ > >> > >> Just brief level direction for implementing wrapper soap service............ > >> > >> Thanks in advance. > >> > >> Regards, > >> > >> Deval > >> ----- Original Message ----- > >> From: Rajbir Saini [via OFBiz] > >> To: devalpatel > >> Sent: Friday, May 11, 2012 11:30 AM > >> Subject: Re: how to use ofBiz service in .Net application? > >> > >> > >> Deval, > >> > >> Yes, you will need to implement the SOAP services and deploy them in the > >> OFBiz. You can use Axis2 (Older version is part of OFBiz) or you can use > >> CXF to deploy your services. I understand it is going to be a lot of > >> work but I think this is the best way out looking at the state of OFBiz > >> exported web services. > >> > >> Thanks, > >> > >> Raj > >> > >> On Friday 11 May 2012 10:38 AM, devalpatel wrote: > >> > >> > Rajbir, > >> > > >> > You have suggested to wrap the ofBiz services into our own SOAP services > >> > that returns the primitives types or whatever we want. > >> > > >> > So, does the SOAP services will be implemented and deployed in ofBiz ? > >> > because, i am not clear about how to fit the independent SOAP services into > >> > the ofBiz framework. > >> > > >> > Thanks in advance. > >> > > >> > Regards, > >> > Deval > >> > > >> > -- > >> > View this message in context: > >> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625479.html > >> > Sent from the OFBiz - User mailing list archive at Nabble.com. > >> > > >> > >> > >> > >> > >> ------------------------------------------------------------------------------ > >> > >> If you reply to this email, your message will be added to the discussion below: > >> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625558.html > >> To unsubscribe from Re: how to use ofBiz service in .Net application?, click here. > >> NAML > >> > >> -- > >> View this message in context: > >> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626369.html > >> Sent from the OFBiz - User mailing list archive at Nabble.com. > > > > > > > ------------------------------------------------------------------------------ > > If you reply to this email, your message will be added to the discussion below: > http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626573.html > To unsubscribe from Re: how to use ofBiz service in .Net application?, click here. > NAML > > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626647.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
Hi all,
Finally, I have resolved the .Net - ofBiz webservice communication issue by using following way : 1) In ofBiz, the call for .Net was successful and response also received successfully. 2) The problem was such that, while calling ofBiz service from .Net app...the response was recieved was null values. However, the required task in the ofBiz service was performed. In order to send the response or success notification to .Net app, i have called another .Net webservice in ofBiz service implementation. Hence, after performing the task of .Net request in ofBiz service i send the response to .Net by calling .Net service. e.g. ofBiz service - updateInventory() .Net service - getUpdateInvNotificationFrmOfbiz() 1) .Net app calls updateInventory(). 2) updateInventory { // perform required task based on received params from .Net req. //call getUpdateInvNotificationFrmOfbiz(). } 3) ofBiz sends "SUCCESS" as req param to .Net service getUpdateInvNotificationFrmOfbiz(). This is how the communication achieved. Regards, Deval |
Administrator
|
Thanks for the update,
Maybe you could write a word in the FAQ? https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo Jacques devalpatel wrote: > Hi all, > > Finally, I have resolved the .Net - ofBiz webservice communication issue by > using following way : > > 1) In ofBiz, the call for .Net was successful and response also received > successfully. > > 2) The problem was such that, while calling ofBiz service from .Net > app...the response was recieved was null values. However, the required > task in the ofBiz service was performed. In order to send the response or > success notification to .Net app, i have called another .Net webservice in > ofBiz service implementation. Hence, after performing the task of .Net > request in ofBiz service i send the response to .Net by calling .Net > service. > > e.g. > ofBiz service - updateInventory() > .Net service - getUpdateInvNotificationFrmOfbiz() > > 1) .Net app calls updateInventory(). > > 2) updateInventory { > // perform required task based on received params from .Net req. > //call getUpdateInvNotificationFrmOfbiz(). > } > > 3) ofBiz sends "SUCCESS" as req param to .Net service > getUpdateInvNotificationFrmOfbiz(). > > This is how the communication achieved. > > Regards, > > Deval |
In reply to this post by Jacques Le Roux
Hi,
I want to use ofbiz service in .net 4.0 application. What i did... 1. i added service as web reference in .net 2. i created proxy object. 3. Created Map Entry parameter list 4. Invoked web service method with map entry parameter But i received null response. Can you please tell me what wrong i did? And also please suggest me what steps i need to follow to get the right response. Thanks in advance... |
Hi Ashish,
Please read through this thread from the mailing list. http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144.html Please, please use WCF, so create a Service Reference not a Web Reference. It really is no harder, and gives you much more flexibility. Cheers Paul Foxworthy
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
Administrator
|
Hi Paul,
If you did not do it yet, maybe a reference in FAQ page would help in future? Thanks Jacques From: "Paul Foxworthy" <[hidden email]> > Hi Ashish, > > Please read through this thread from the mailing list. > > http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144.html > > Please, please use WCF, so create a Service Reference not a Web Reference. > It really is no harder, and gives you much more flexibility. > > Cheers > > Paul Foxworthy > > > ashish-gupta wrote >> Hi, >> I want to use ofbiz service in .net 4.0 application. >> >> What i did... >> >> 1. i added service as web reference in .net >> >> 2. i created proxy object. >> >> 3. Created Map Entry parameter list >> >> 4. Invoked web service method with map entry parameter >> >> But i received null response. >> >> Can you please tell me what wrong i did? >> And also please suggest me what steps i need to follow to get the right >> response. >> >> Thanks in advance... > > > > > > ----- > -- > Coherent Software Australia Pty Ltd > http://www.coherentsoftware.com.au/ > > Bonsai ERP, the all-inclusive ERP system > http://www.bonsaierp.com.au/ > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4639795.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
Hi Jacques,
I haven't yet. I intend to put together a simple example when I've got some time. Cheers Paul
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
Free forum by Nabble | Edit this page |