You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Paul Foxworthy <pa...@cohsoft.com.au> on 2012/05/03 07:58:39 UTC

Re: how to use ofBiz service in .Net application?

Hi Deval,

.NET WCF can receive a Map from a SOAP service. In .NET terms it's a
Dictionary.

There's a nice discussion at
http://www.request-response.com/blog/PermaLink,guid,ff5fab81-affb-4b2b-aa67-c80bdfc86cbd.aspx

Cheers

Paul Foxworthy


devalpatel wrote
> 
> Thanks for your suggestion Jacques.
> 
> I have reviewed the issues suggest by you. The issue
> https://issues.apache.org/jira/browse/OFBIZ-3299f   contains the
> ModelService.java modification, which currently not available in the
> stable ofBiz 10.04 version.
> 
> After implementing the modification the ModelService class based on issue
> resolution, I am successfully able use the ofBiz service using SOAP and
> XML-RPC.
> 
> I would appreciate if you/anyone suggest, how to change a default return
> type pf  ofBiz java service..i.e. instead of MAP, how to change the
> wrapper to return string as Return type of ofBiz services.  Because it
> creates problem while accessing the ofBiz web-service in .Net app as Map 
> is not supported there.
> 
> Again Thanks a lot.
> 
> Best regards,
> 
> Deval
> 


-----
--
Coherent Software Australia Pty Ltd
http://www.cohsoft.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-tp4580144p4605195.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Jacques Le Roux <ja...@les7arts.com>.
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

Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
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

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4631929.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Jacques Le Roux <ja...@les7arts.com>.
Sorry, I never worked with SOAP + .Net.
I'd follow Paul recommendation about WCF

Jacques

From: "devalpatel" <de...@netweb.biz>
> 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. 

Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
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.

Re: how to use ofBiz service in .Net application?

Posted by Jacques Le Roux <ja...@les7arts.com>.
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" <ra...@yahoo.com>
> 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.
> 

Re: how to use ofBiz service in .Net application?

Posted by Rajbir Saini <ra...@yahoo.com>.
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.


Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
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.

Re: how to use ofBiz service in .Net application?

Posted by Paul Foxworthy <pa...@cohsoft.com.au>.
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


devalpatel wrote
> 
> 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
> 
>   ----- Original Message ----- 
>   From: Paul Foxworthy [via OFBiz] 
>   To: devalpatel 
>   Sent: Thursday, May 10, 2012 3:55 AM
>   Subject: Re: how to use ofBiz service in .Net application?
> 
> 
>   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 
> 
> 
>     devalpatel wrote
>     Hi  Paul, 
> 
>     Thanks for your reply. 
> 
>     There is no WSDLException generated. 
> 
>     void CallsearchHelloPerson(ref map)  => Here,  the type of map
> parameter is Map (ofBiz  method 's return type Map). 
> 
>     I have converted it according to the java Map type : 
>     //c# code 
>     static mapEntry makeMap(String keyString, String valString) { 
> 
>         stdString mapKeyString = new stdString(); 
> 
>         stdString mapValString = new stdString(); 
> 
>         mapKeyString.value = keyString; 
> 
>         mapValString.value = valString; 
> 
>         mapKey key = new mapKey(); 
> 
>         key.stdString = mapKeyString; 
> 
>         mapValue val = new mapValue(); 
> 
>         val.Item = mapValString; 
> 
>         val.ItemElementName = ItemChoiceType.stdString; 
> 
>         mapEntry entry = new mapEntry(); 
> 
>         entry.mapKey = key; 
> 
>         entry.mapValue = val; 
> 
>         return entry; 
> 
>       } 
> 
> 
>     //c# code for calling ofBiz service CallupdateInventory. 
> 
>     mapEntry[] mapEntryArray = new mapEntry[5]; 
> 
>     mapEntryArray[0] = makeMap("productId", ofbizProductid); 
> 
>     mapEntryArray[1] = makeMap("quantity", ofbizQOH); 
> 
>     mapEntryArray[2] = makeMap("status", "Paid"); 
> 
>     mapEntryArray[3] = makeMap("login.username", "admin"); 
> 
>     mapEntryArray[4] = makeMap("login.password", "ofbiz"); 
> 
>     ofBizInventory.CallupdateInventory(ref mapEntryArray); 
> 
>     So, the input paramter map passed to ofbiz service is received
> successfully at ofBiz side with all key values set from c# as shown ablve. 
> 
>     But, as you know the return of all methods in ofBiz is map so ofBiz
> returns map as result of "CallupdateInventory" api call. 
> 
>     In C#, the return type of CallupdateInventory API is void. That also
> mystery for me that why the generated client stub classes in c# are having
> return type void?? And, the actual method name in ofBiz is
> updateInventory(), but in the generated classes of c# there isn't
> updateInventory method & its CallupdateInventory(). 
> 
>     Hope, the above details provides more clarity of the problem. 
> 
>     Thanks, 
> 
>     Deval 
> 
>       ----- Original Message ----- 
>       From: Paul Foxworthy [via OFBiz] 
>       To: devalpatel 
>       Sent: Wednesday, May 09, 2012 4:45 AM 
>       Subject: Re: how to use ofBiz service in .Net application? 
> 
> 
>       Hi Deval, 
> 
>       Some of the nulls may not be a problem, if a method takes no
> parameters or returns void. 
> 
>       What's the message from the WSDLException? 
> 
>       Also, I noticed you mentioned earlier that your proxy in C# has 
> 
>       void CallsearchHelloPerson(ref map) 
> 
>       What's the type of the map parameter? Is there any value in it after
> you call OFBiz? 
> 
>       Cheers 
> 
>       Paul Foxworthy 
> 
> 
>         devalpatel wrote 
>         Hi Paul, 
>        
> http://localhost:8080/webtools/control/SOAPService/searchHelloPerson?wsdl
>         while generating the wsdl by hitting above URL in browser,,, i
> have debug the code in public void getWSDL(Definition def, String
> locationURI) throws WSDLException{} method. 
>         *****DEBUG RESULT (i have make BOLD to the null values in below
> result..) 
>        
> ________________________________________________________________________________________ 
>         (com.ibm.wsdl.DefinitionImpl) Definition: name=null
> targetNamespace=http://ofbiz.apache.org/service/
>         Types: 
>         Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
>         Part: name=map-Map 
>         typeName={http://ofbiz.apache.org/service/}map-Map 
>         Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
>         Part: name=map-Map 
>         typeName={http://ofbiz.apache.org/service/}map-Map 
>         PortType:
> name={http://ofbiz.apache.org/service/}searchHelloPersonPortType 
>         Operation: name=searchHelloPerson 
>         Input: name=null 
>         Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
>         Part: name=map-Map 
>         typeName={http://ofbiz.apache.org/service/}map-Map 
>         Output: name=null 
>         Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
>         Part: name=map-Map 
>         typeName={http://ofbiz.apache.org/service/}map-Map 
>         Binding:
> name={http://ofbiz.apache.org/service/}searchHelloPersonSoapBinding 
>         PortType:
> name={http://ofbiz.apache.org/service/}searchHelloPersonPortType 
>         Operation: name=searchHelloPerson 
>         Input: name=null 
>         Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
>         Part: name=map-Map 
>         typeName={http://ofbiz.apache.org/service/}map-Map 
>         Output: name=null 
>         Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
>         Part: name=map-Map 
>         typeName={http://ofbiz.apache.org/service/}map-Map 
>         BindingOperation: name=searchHelloPerson 
>         BindingInput: name=null 
>         SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body): 
>         required=null 
>         use=literal 
>         encodingStyles={http://schemas.xmlsoap.org/soap/encoding/} 
>         namespaceURI=http://ofbiz.apache.org/service/
>         BindingOutput: name=null 
>         SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body): 
>         required=null 
>         use=literal 
>         encodingStyles={http://schemas.xmlsoap.org/soap/encoding/} 
>         namespaceURI=http://ofbiz.apache.org/service/
>         SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation): 
>         required=null 
>         soapActionURI=http://localhost:8080/webtools/control/SOAPService
>         style=rpc 
>         SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding): 
>         required=null 
>         transportURI=http://schemas.xmlsoap.org/soap/http
>         style=rpc 
>        
> ________________________________________________________________________________________ 
>           
>         The generated WSDL is as below : 
> 
> 
>         <wsdl:definitions
> targetNamespace="http://ofbiz.apache.org/service/">
>         − 
>         <wsdl:types>
>         − 
>         <xsd:schema targetNamespace="http://ofbiz.apache.org/service/">
>         − 
>         <xsd:element name="std-String">
>         − 
>         <xsd:complexType>
>         <xsd:attribute name="value" type="xsd:string" use="required"/>
>         </xsd:complexType>
>         </xsd:element>
>         − 
>         <xsd:element name="std-Integer">
>         − 
>         <xsd:complexType>
>         <xsd:attribute name="value" type="xsd:integer" use="required"/>
>         </xsd:complexType>
>         </xsd:element>
>         − 
>         <xsd:element name="std-Long">
>         − 
>         <xsd:complexType>
>         <xsd:attribute name="value" type="xsd:long" use="required"/>
>         </xsd:complexType>
>         </xsd:element>
>         − 
>         <xsd:element name="std-Float">
>         − 
>         <xsd:complexType>
>         <xsd:attribute name="value" type="xsd:float" use="required"/>
>         </xsd:complexType>
>         </xsd:element>
>         − 
>         <xsd:element name="std-Double">
>         − 
>         <xsd:complexType>
>         <xsd:attribute name="value" type="xsd:double" use="required"/>
>         </xsd:complexType>
>         </xsd:element>
>         − 
>         <xsd:element name="std-Boolean">
>         − 
>         <xsd:complexType>
>         <xsd:attribute name="value" type="xsd:boolean" use="required"/>
>         </xsd:complexType>
>         </xsd:element>
>         − 
>         <xsd:element name="std-Locale">
>         − 
>         <xsd:complexType>
>         <xsd:attribute name="value" type="xsd:string" use="required"/>
>         </xsd:complexType>
>         </xsd:element>
>         − 
>         <xsd:element name="sql-Timestamp">
>         − 
>         <xsd:complexType>
>         <xsd:attribute name="value" type="xsd:dateTime" use="required"/>
>         </xsd:complexType>
>         </xsd:element>
>         − 
>         <xsd:element name="sql-Date">
>         − 
>         <xsd:complexType>
>         <xsd:attribute name="value" type="xsd:date" use="required"/>
>         </xsd:complexType>
>         </xsd:element>
>         − 
>         <xsd:element name="sql-Time">
>         − 
>         <xsd:complexType>
>         <xsd:attribute name="value" type="xsd:time" use="required"/>
>         </xsd:complexType>
>         </xsd:element>
>         <xsd:element name="col-ArrayList" type="tns:col-Collection"/>
>         <xsd:element name="col-LinkedList" type="tns:col-Collection"/>
>         <xsd:element name="col-Stack" type="tns:col-Collection"/>
>         <xsd:element name="col-Vector" type="tns:col-Collection"/>
>         <xsd:element name="col-TreeSet" type="tns:col-Collection"/>
>         <xsd:element name="col-HashSet" type="tns:col-Collection"/>
>         <xsd:element name="col-Collection" type="tns:col-Collection"/>
>         <xsd:element name="map-TreeMap" type="tns:map-Map"/>
>         <xsd:element name="map-WeakHashMap" type="tns:map-Map"/>
>         <xsd:element name="map-Hashtable" type="tns:map-Map"/>
>         <xsd:element name="map-Properties" type="tns:map-Map"/>
>         <xsd:element name="map-HashMap" type="tns:map-Map"/>
>         <xsd:element name="map-Map" type="tns:map-Map"/>
>         <xsd:element name="map-Entry" type="tns:map-Entry"/>
>         <xsd:element name="map-Key" type="tns:map-Key"/>
>         <xsd:element name="map-Value" type="tns:map-Value"/>
>         − 
>         <xsd:element name="eepk-" type="tns:map-Map">
>         − 
>         <xsd:annotation>
>         − 
>         <xsd:documentation>
>         The name of element need to be appended with name of entity such
> as eepk-Product for Product entity. 
>         </xsd:documentation>
>         </xsd:annotation>
>         </xsd:element>
>         − 
>         <xsd:element name="eeval-" type="tns:map-Map">
>         − 
>         <xsd:annotation>
>         − 
>         <xsd:documentation>
>         The name of element need to be appended with name of entity such
> as eeval-Product for Product entity. 
>         </xsd:documentation>
>         </xsd:annotation>
>         </xsd:element>
>         − 
>         <xsd:element name="cus-obj">
>         − 
>         <xsd:annotation>
>         − 
>         <xsd:documentation>
>         Object content need to be in CDATA such as <cus-obj></cus-obj>
>         </xsd:documentation>
>         </xsd:annotation>
>         </xsd:element>
>         − 
>         <xsd:complexType name="map-Map">
>         − 
>         <xsd:sequence>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-Entry"/>
>         </xsd:sequence>
>         </xsd:complexType>
>         − 
>         <xsd:complexType name="map-Entry">
>         − 
>         <xsd:sequence>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Key"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Value"/>
>         </xsd:sequence>
>         </xsd:complexType>
>         − 
>         <xsd:complexType name="map-Key">
>         − 
>         <xsd:all>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
>         </xsd:all>
>         </xsd:complexType>
>         − 
>         <xsd:complexType name="map-Value">
>         − 
>         <xsd:choice>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Integer"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Long"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Float"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Double"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Boolean"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Locale"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Timestamp"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Date"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Time"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-ArrayList"/>
>         <xsd:element maxOccurs="1" minOccurs="1"
> ref="tns:col-LinkedList"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Stack"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Vector"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-TreeSet"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-HashSet"/>
>         <xsd:element maxOccurs="1" minOccurs="1"
> ref="tns:col-Collection"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-HashMap"/>
>         <xsd:element maxOccurs="1" minOccurs="1"
> ref="tns:map-Properties"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Hashtable"/>
>         <xsd:element maxOccurs="1" minOccurs="1"
> ref="tns:map-WeakHashMap"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-TreeMap"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Map"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eepk-"/>
>         <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eeval-"/>
>         </xsd:choice>
>         </xsd:complexType>
>         − 
>         <xsd:complexType name="col-Collection">
>         − 
>         <xsd:choice>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-String"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-Integer"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-Long"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-Float"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-Double"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-Boolean"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-Locale"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:sql-Timestamp"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:sql-Date"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:sql-Time"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-ArrayList"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-LinkedList"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-Stack"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-Vector"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-TreeSet"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-HashSet"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-Collection"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-HashMap"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-Properties"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-Hashtable"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-WeakHashMap"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-TreeMap"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-Map"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eepk-"/>
>         <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:eeval-"/>
>         </xsd:choice>
>         </xsd:complexType>
>         </xsd:schema>
>         </wsdl:types>
>         − 
>         <wsdl:message name="searchHelloPersonRequest">
>         − 
>         <wsdl:part name="map-Map" type="tns:map-Map">
>         − 
>         <wsdl:documentation>
>         <attribute java-class="String" name="helloPersonId"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
>         <attribute java-class="java.lang.String" name="login.username"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
>         <attribute java-class="java.lang.String" name="login.password"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
>         </wsdl:documentation>
>         </wsdl:part>
>         </wsdl:message>
>         − 
>         <wsdl:message name="searchHelloPersonResponse">
>         − 
>         <wsdl:part name="map-Map" type="tns:map-Map">
>         − 
>         <wsdl:documentation>
>         <attribute java-class="Map" name="name"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="eeval-"/>
>         </wsdl:documentation>
>         </wsdl:part>
>         </wsdl:message>
>         − 
>         <wsdl:portType name="searchHelloPersonPortType">
>         − 
>         <wsdl:operation name="searchHelloPerson">
>         <wsdl:input message="tns:searchHelloPersonRequest"/>
>         <wsdl:output message="tns:searchHelloPersonResponse"/>
>         </wsdl:operation>
>         </wsdl:portType>
>         − 
>         <wsdl:binding name="searchHelloPersonSoapBinding"
> type="tns:searchHelloPersonPortType">
>         <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>         − 
>         <wsdl:operation name="searchHelloPerson">
>         <soap:operation
> soapAction="http://localhost:8080/webtools/control/SOAPService"
> style="rpc"/>
>         − 
>         <wsdl:input>
>         <soap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://ofbiz.apache.org/service/" use="literal"/>
>         </wsdl:input>
>         − 
>         <wsdl:output>
>         <soap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://ofbiz.apache.org/service/" use="literal"/>
>         </wsdl:output>
>         </wsdl:operation>
>         </wsdl:binding>
>         − 
>         <wsdl:service name="searchHelloPerson">
>         − 
>         <wsdl:port binding="tns:searchHelloPersonSoapBinding"
> name="searchHelloPersonPort">
>         <soap:address
> location="http://localhost:8080/webtools/control/SOAPService"/>
>         </wsdl:port>
>         </wsdl:service>
>         </wsdl:definitions>
> 
>         So, is there any problem in WSDL generation or generated WSDL  or
> any changes reauired in ofbiz ModelService.java???? 
>       -- 
>       Coherent Software Australia Pty Ltd 
>       http://www.cohsoft.com.au/
> 
>       Bonsai ERP, the all-inclusive ERP system 
>       http://www.bonsaierp.com.au/
> 
> 
> 
> 
>    
> ------------------------------------------------------------------------------ 
> 
>       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-tp4580144p4619013.html  
>       To unsubscribe from Re: how to use ofBiz service in .Net
> application?, click here. 
>       NAML 
>   -- 
>   Coherent Software Australia Pty Ltd 
>   http://www.cohsoft.com.au/
> 
>   Bonsai ERP, the all-inclusive ERP system 
>   http://www.bonsaierp.com.au/
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> 
>   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-tp4580144p4621981.html 
>   To unsubscribe from Re: how to use ofBiz service in .Net application?,
> click here.
>   NAML
> 

-----
--
Coherent Software Australia Pty Ltd
http://www.cohsoft.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-tp4580144p4622701.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
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

  ----- Original Message ----- 
  From: Paul Foxworthy [via OFBiz] 
  To: devalpatel 
  Sent: Thursday, May 10, 2012 3:55 AM
  Subject: Re: how to use ofBiz service in .Net application?


  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 


    devalpatel wrote
    Hi  Paul, 

    Thanks for your reply. 

    There is no WSDLException generated. 

    void CallsearchHelloPerson(ref map)  => Here,  the type of map parameter is Map (ofBiz  method 's return type Map). 

    I have converted it according to the java Map type : 
    //c# code 
    static mapEntry makeMap(String keyString, String valString) { 

        stdString mapKeyString = new stdString(); 

        stdString mapValString = new stdString(); 

        mapKeyString.value = keyString; 

        mapValString.value = valString; 

        mapKey key = new mapKey(); 

        key.stdString = mapKeyString; 

        mapValue val = new mapValue(); 

        val.Item = mapValString; 

        val.ItemElementName = ItemChoiceType.stdString; 

        mapEntry entry = new mapEntry(); 

        entry.mapKey = key; 

        entry.mapValue = val; 

        return entry; 

      } 


    //c# code for calling ofBiz service CallupdateInventory. 

    mapEntry[] mapEntryArray = new mapEntry[5]; 

    mapEntryArray[0] = makeMap("productId", ofbizProductid); 

    mapEntryArray[1] = makeMap("quantity", ofbizQOH); 

    mapEntryArray[2] = makeMap("status", "Paid"); 

    mapEntryArray[3] = makeMap("login.username", "admin"); 

    mapEntryArray[4] = makeMap("login.password", "ofbiz"); 

    ofBizInventory.CallupdateInventory(ref mapEntryArray); 

    So, the input paramter map passed to ofbiz service is received successfully at ofBiz side with all key values set from c# as shown ablve. 

    But, as you know the return of all methods in ofBiz is map so ofBiz returns map as result of "CallupdateInventory" api call. 

    In C#, the return type of CallupdateInventory API is void. That also mystery for me that why the generated client stub classes in c# are having return type void?? And, the actual method name in ofBiz is updateInventory(), but in the generated classes of c# there isn't updateInventory method & its CallupdateInventory(). 

    Hope, the above details provides more clarity of the problem. 

    Thanks, 

    Deval 

      ----- Original Message ----- 
      From: Paul Foxworthy [via OFBiz] 
      To: devalpatel 
      Sent: Wednesday, May 09, 2012 4:45 AM 
      Subject: Re: how to use ofBiz service in .Net application? 


      Hi Deval, 

      Some of the nulls may not be a problem, if a method takes no parameters or returns void. 

      What's the message from the WSDLException? 

      Also, I noticed you mentioned earlier that your proxy in C# has 

      void CallsearchHelloPerson(ref map) 

      What's the type of the map parameter? Is there any value in it after you call OFBiz? 

      Cheers 

      Paul Foxworthy 


        devalpatel wrote 
        Hi Paul, 
        http://localhost:8080/webtools/control/SOAPService/searchHelloPerson?wsdl
        while generating the wsdl by hitting above URL in browser,,, i have debug the code in public void getWSDL(Definition def, String locationURI) throws WSDLException{} method. 
        *****DEBUG RESULT (i have make BOLD to the null values in below result..) 
        ________________________________________________________________________________________ 
        (com.ibm.wsdl.DefinitionImpl) Definition: name=null targetNamespace=http://ofbiz.apache.org/service/
        Types: 
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
        Part: name=map-Map 
        typeName={http://ofbiz.apache.org/service/}map-Map 
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
        Part: name=map-Map 
        typeName={http://ofbiz.apache.org/service/}map-Map 
        PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType 
        Operation: name=searchHelloPerson 
        Input: name=null 
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
        Part: name=map-Map 
        typeName={http://ofbiz.apache.org/service/}map-Map 
        Output: name=null 
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
        Part: name=map-Map 
        typeName={http://ofbiz.apache.org/service/}map-Map 
        Binding: name={http://ofbiz.apache.org/service/}searchHelloPersonSoapBinding 
        PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType 
        Operation: name=searchHelloPerson 
        Input: name=null 
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
        Part: name=map-Map 
        typeName={http://ofbiz.apache.org/service/}map-Map 
        Output: name=null 
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
        Part: name=map-Map 
        typeName={http://ofbiz.apache.org/service/}map-Map 
        BindingOperation: name=searchHelloPerson 
        BindingInput: name=null 
        SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body): 
        required=null 
        use=literal 
        encodingStyles={http://schemas.xmlsoap.org/soap/encoding/} 
        namespaceURI=http://ofbiz.apache.org/service/
        BindingOutput: name=null 
        SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body): 
        required=null 
        use=literal 
        encodingStyles={http://schemas.xmlsoap.org/soap/encoding/} 
        namespaceURI=http://ofbiz.apache.org/service/
        SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation): 
        required=null 
        soapActionURI=http://localhost:8080/webtools/control/SOAPService
        style=rpc 
        SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding): 
        required=null 
        transportURI=http://schemas.xmlsoap.org/soap/http
        style=rpc 
        ________________________________________________________________________________________ 
          
        The generated WSDL is as below : 


        <wsdl:definitions targetNamespace="http://ofbiz.apache.org/service/">
        − 
        <wsdl:types>
        − 
        <xsd:schema targetNamespace="http://ofbiz.apache.org/service/">
        − 
        <xsd:element name="std-String">
        − 
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
        </xsd:complexType>
        </xsd:element>
        − 
        <xsd:element name="std-Integer">
        − 
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:integer" use="required"/>
        </xsd:complexType>
        </xsd:element>
        − 
        <xsd:element name="std-Long">
        − 
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:long" use="required"/>
        </xsd:complexType>
        </xsd:element>
        − 
        <xsd:element name="std-Float">
        − 
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:float" use="required"/>
        </xsd:complexType>
        </xsd:element>
        − 
        <xsd:element name="std-Double">
        − 
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:double" use="required"/>
        </xsd:complexType>
        </xsd:element>
        − 
        <xsd:element name="std-Boolean">
        − 
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:boolean" use="required"/>
        </xsd:complexType>
        </xsd:element>
        − 
        <xsd:element name="std-Locale">
        − 
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
        </xsd:complexType>
        </xsd:element>
        − 
        <xsd:element name="sql-Timestamp">
        − 
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:dateTime" use="required"/>
        </xsd:complexType>
        </xsd:element>
        − 
        <xsd:element name="sql-Date">
        − 
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:date" use="required"/>
        </xsd:complexType>
        </xsd:element>
        − 
        <xsd:element name="sql-Time">
        − 
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:time" use="required"/>
        </xsd:complexType>
        </xsd:element>
        <xsd:element name="col-ArrayList" type="tns:col-Collection"/>
        <xsd:element name="col-LinkedList" type="tns:col-Collection"/>
        <xsd:element name="col-Stack" type="tns:col-Collection"/>
        <xsd:element name="col-Vector" type="tns:col-Collection"/>
        <xsd:element name="col-TreeSet" type="tns:col-Collection"/>
        <xsd:element name="col-HashSet" type="tns:col-Collection"/>
        <xsd:element name="col-Collection" type="tns:col-Collection"/>
        <xsd:element name="map-TreeMap" type="tns:map-Map"/>
        <xsd:element name="map-WeakHashMap" type="tns:map-Map"/>
        <xsd:element name="map-Hashtable" type="tns:map-Map"/>
        <xsd:element name="map-Properties" type="tns:map-Map"/>
        <xsd:element name="map-HashMap" type="tns:map-Map"/>
        <xsd:element name="map-Map" type="tns:map-Map"/>
        <xsd:element name="map-Entry" type="tns:map-Entry"/>
        <xsd:element name="map-Key" type="tns:map-Key"/>
        <xsd:element name="map-Value" type="tns:map-Value"/>
        − 
        <xsd:element name="eepk-" type="tns:map-Map">
        − 
        <xsd:annotation>
        − 
        <xsd:documentation>
        The name of element need to be appended with name of entity such as eepk-Product for Product entity. 
        </xsd:documentation>
        </xsd:annotation>
        </xsd:element>
        − 
        <xsd:element name="eeval-" type="tns:map-Map">
        − 
        <xsd:annotation>
        − 
        <xsd:documentation>
        The name of element need to be appended with name of entity such as eeval-Product for Product entity. 
        </xsd:documentation>
        </xsd:annotation>
        </xsd:element>
        − 
        <xsd:element name="cus-obj">
        − 
        <xsd:annotation>
        − 
        <xsd:documentation>
        Object content need to be in CDATA such as <cus-obj></cus-obj>
        </xsd:documentation>
        </xsd:annotation>
        </xsd:element>
        − 
        <xsd:complexType name="map-Map">
        − 
        <xsd:sequence>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Entry"/>
        </xsd:sequence>
        </xsd:complexType>
        − 
        <xsd:complexType name="map-Entry">
        − 
        <xsd:sequence>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Key"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Value"/>
        </xsd:sequence>
        </xsd:complexType>
        − 
        <xsd:complexType name="map-Key">
        − 
        <xsd:all>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
        </xsd:all>
        </xsd:complexType>
        − 
        <xsd:complexType name="map-Value">
        − 
        <xsd:choice>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Integer"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Long"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Float"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Double"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Boolean"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Locale"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Timestamp"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Date"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Time"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-ArrayList"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-LinkedList"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Stack"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Vector"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-TreeSet"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-HashSet"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Collection"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-HashMap"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Properties"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Hashtable"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-WeakHashMap"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-TreeMap"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Map"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eepk-"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eeval-"/>
        </xsd:choice>
        </xsd:complexType>
        − 
        <xsd:complexType name="col-Collection">
        − 
        <xsd:choice>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-String"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Integer"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Long"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Float"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Double"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Boolean"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Locale"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Timestamp"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Date"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Time"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-ArrayList"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-LinkedList"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Stack"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Vector"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-TreeSet"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-HashSet"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Collection"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-HashMap"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Properties"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Hashtable"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-WeakHashMap"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-TreeMap"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Map"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eepk-"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eeval-"/>
        </xsd:choice>
        </xsd:complexType>
        </xsd:schema>
        </wsdl:types>
        − 
        <wsdl:message name="searchHelloPersonRequest">
        − 
        <wsdl:part name="map-Map" type="tns:map-Map">
        − 
        <wsdl:documentation>
        <attribute java-class="String" name="helloPersonId" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
        <attribute java-class="java.lang.String" name="login.username" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
        <attribute java-class="java.lang.String" name="login.password" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
        </wsdl:documentation>
        </wsdl:part>
        </wsdl:message>
        − 
        <wsdl:message name="searchHelloPersonResponse">
        − 
        <wsdl:part name="map-Map" type="tns:map-Map">
        − 
        <wsdl:documentation>
        <attribute java-class="Map" name="name" namespace="http://ofbiz.apache.org/service/" optional="true" type="eeval-"/>
        </wsdl:documentation>
        </wsdl:part>
        </wsdl:message>
        − 
        <wsdl:portType name="searchHelloPersonPortType">
        − 
        <wsdl:operation name="searchHelloPerson">
        <wsdl:input message="tns:searchHelloPersonRequest"/>
        <wsdl:output message="tns:searchHelloPersonResponse"/>
        </wsdl:operation>
        </wsdl:portType>
        − 
        <wsdl:binding name="searchHelloPersonSoapBinding" type="tns:searchHelloPersonPortType">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        − 
        <wsdl:operation name="searchHelloPerson">
        <soap:operation soapAction="http://localhost:8080/webtools/control/SOAPService" style="rpc"/>
        − 
        <wsdl:input>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ofbiz.apache.org/service/" use="literal"/>
        </wsdl:input>
        − 
        <wsdl:output>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ofbiz.apache.org/service/" use="literal"/>
        </wsdl:output>
        </wsdl:operation>
        </wsdl:binding>
        − 
        <wsdl:service name="searchHelloPerson">
        − 
        <wsdl:port binding="tns:searchHelloPersonSoapBinding" name="searchHelloPersonPort">
        <soap:address location="http://localhost:8080/webtools/control/SOAPService"/>
        </wsdl:port>
        </wsdl:service>
        </wsdl:definitions>

        So, is there any problem in WSDL generation or generated WSDL  or any changes reauired in ofbiz ModelService.java???? 
      -- 
      Coherent Software Australia Pty Ltd 
      http://www.cohsoft.com.au/

      Bonsai ERP, the all-inclusive ERP system 
      http://www.bonsaierp.com.au/




    ------------------------------------------------------------------------------ 

      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-tp4580144p4619013.html  
      To unsubscribe from Re: how to use ofBiz service in .Net application?, click here. 
      NAML 
  -- 
  Coherent Software Australia Pty Ltd 
  http://www.cohsoft.com.au/

  Bonsai ERP, the all-inclusive ERP system 
  http://www.bonsaierp.com.au/




------------------------------------------------------------------------------

  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-tp4580144p4621981.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-tp4580144p4622512.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Paul Foxworthy <pa...@cohsoft.com.au>.
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


devalpatel wrote
> 
> Hi  Paul,
> 
> Thanks for your reply.
> 
> There is no WSDLException generated.
> 
> void CallsearchHelloPerson(ref map)  => Here,  the type of map parameter
> is Map (ofBiz  method 's return type Map).
> 
> I have converted it according to the java Map type :
> //c# code 
> static mapEntry makeMap(String keyString, String valString) {
> 
>     stdString mapKeyString = new stdString();
> 
>     stdString mapValString = new stdString();
> 
>     mapKeyString.value = keyString;
> 
>     mapValString.value = valString;
> 
>     mapKey key = new mapKey();
> 
>     key.stdString = mapKeyString;
> 
>     mapValue val = new mapValue();
> 
>     val.Item = mapValString;
> 
>     val.ItemElementName = ItemChoiceType.stdString;
> 
>     mapEntry entry = new mapEntry();
> 
>     entry.mapKey = key;
> 
>     entry.mapValue = val;
> 
>     return entry;
> 
>   }
> 
> 
> //c# code for calling ofBiz service CallupdateInventory.
> 
> mapEntry[] mapEntryArray = new mapEntry[5];
> 
> mapEntryArray[0] = makeMap("productId", ofbizProductid);
> 
> mapEntryArray[1] = makeMap("quantity", ofbizQOH);
> 
> mapEntryArray[2] = makeMap("status", "Paid");
> 
> mapEntryArray[3] = makeMap("login.username", "admin");
> 
> mapEntryArray[4] = makeMap("login.password", "ofbiz");
> 
> ofBizInventory.CallupdateInventory(ref mapEntryArray);
> 
> So, the input paramter map passed to ofbiz service is received
> successfully at ofBiz side with all key values set from c# as shown ablve.
> 
> But, as you know the return of all methods in ofBiz is map so ofBiz
> returns map as result of "CallupdateInventory" api call.
> 
> In C#, the return type of CallupdateInventory API is void. That also
> mystery for me that why the generated client stub classes in c# are having
> return type void?? And, the actual method name in ofBiz is
> updateInventory(), but in the generated classes of c# there isn't
> updateInventory method & its CallupdateInventory().
> 
> Hope, the above details provides more clarity of the problem.
> 
> Thanks,
> 
> Deval
> 
>   ----- Original Message ----- 
>   From: Paul Foxworthy [via OFBiz] 
>   To: devalpatel 
>   Sent: Wednesday, May 09, 2012 4:45 AM
>   Subject: Re: how to use ofBiz service in .Net application?
> 
> 
>   Hi Deval, 
> 
>   Some of the nulls may not be a problem, if a method takes no parameters
> or returns void. 
> 
>   What's the message from the WSDLException? 
> 
>   Also, I noticed you mentioned earlier that your proxy in C# has 
> 
>   void CallsearchHelloPerson(ref map) 
> 
>   What's the type of the map parameter? Is there any value in it after you
> call OFBiz? 
> 
>   Cheers 
> 
>   Paul Foxworthy 
> 
> 
>     devalpatel wrote
>     Hi Paul, 
>    
> http://localhost:8080/webtools/control/SOAPService/searchHelloPerson?wsdl
>     while generating the wsdl by hitting above URL in browser,,, i have
> debug the code in public void getWSDL(Definition def, String locationURI)
> throws WSDLException{} method.
>     *****DEBUG RESULT (i have make BOLD to the null values in below
> result..)
>    
> ________________________________________________________________________________________ 
>     (com.ibm.wsdl.DefinitionImpl) Definition: name=null
> targetNamespace=http://ofbiz.apache.org/service/
>     Types: 
>     Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
>     Part: name=map-Map 
>     typeName={http://ofbiz.apache.org/service/}map-Map 
>     Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
>     Part: name=map-Map 
>     typeName={http://ofbiz.apache.org/service/}map-Map 
>     PortType:
> name={http://ofbiz.apache.org/service/}searchHelloPersonPortType 
>     Operation: name=searchHelloPerson 
>     Input: name=null
>     Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
>     Part: name=map-Map 
>     typeName={http://ofbiz.apache.org/service/}map-Map 
>     Output: name=null
>     Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
>     Part: name=map-Map 
>     typeName={http://ofbiz.apache.org/service/}map-Map 
>     Binding:
> name={http://ofbiz.apache.org/service/}searchHelloPersonSoapBinding 
>     PortType:
> name={http://ofbiz.apache.org/service/}searchHelloPersonPortType 
>     Operation: name=searchHelloPerson 
>     Input: name=null
>     Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
>     Part: name=map-Map 
>     typeName={http://ofbiz.apache.org/service/}map-Map 
>     Output: name=null
>     Message:
> name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
>     Part: name=map-Map 
>     typeName={http://ofbiz.apache.org/service/}map-Map 
>     BindingOperation: name=searchHelloPerson 
>     BindingInput: name=null
>     SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body): 
>     required=null
>     use=literal 
>     encodingStyles={http://schemas.xmlsoap.org/soap/encoding/} 
>     namespaceURI=http://ofbiz.apache.org/service/
>     BindingOutput: name=null 
>     SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body): 
>     required=null
>     use=literal 
>     encodingStyles={http://schemas.xmlsoap.org/soap/encoding/} 
>     namespaceURI=http://ofbiz.apache.org/service/
>     SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation): 
>     required=null
>     soapActionURI=http://localhost:8080/webtools/control/SOAPService
>     style=rpc 
>     SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding): 
>     required=null
>     transportURI=http://schemas.xmlsoap.org/soap/http
>     style=rpc 
>    
> ________________________________________________________________________________________ 
>       
>     The generated WSDL is as below :
> 
> 
>     <wsdl:definitions targetNamespace="http://ofbiz.apache.org/service/">
>     − 
>     <wsdl:types>
>     − 
>     <xsd:schema targetNamespace="http://ofbiz.apache.org/service/">
>     − 
>     <xsd:element name="std-String">
>     − 
>     <xsd:complexType>
>     <xsd:attribute name="value" type="xsd:string" use="required"/>
>     </xsd:complexType>
>     </xsd:element>
>     − 
>     <xsd:element name="std-Integer">
>     − 
>     <xsd:complexType>
>     <xsd:attribute name="value" type="xsd:integer" use="required"/>
>     </xsd:complexType>
>     </xsd:element>
>     − 
>     <xsd:element name="std-Long">
>     − 
>     <xsd:complexType>
>     <xsd:attribute name="value" type="xsd:long" use="required"/>
>     </xsd:complexType>
>     </xsd:element>
>     − 
>     <xsd:element name="std-Float">
>     − 
>     <xsd:complexType>
>     <xsd:attribute name="value" type="xsd:float" use="required"/>
>     </xsd:complexType>
>     </xsd:element>
>     − 
>     <xsd:element name="std-Double">
>     − 
>     <xsd:complexType>
>     <xsd:attribute name="value" type="xsd:double" use="required"/>
>     </xsd:complexType>
>     </xsd:element>
>     − 
>     <xsd:element name="std-Boolean">
>     − 
>     <xsd:complexType>
>     <xsd:attribute name="value" type="xsd:boolean" use="required"/>
>     </xsd:complexType>
>     </xsd:element>
>     − 
>     <xsd:element name="std-Locale">
>     − 
>     <xsd:complexType>
>     <xsd:attribute name="value" type="xsd:string" use="required"/>
>     </xsd:complexType>
>     </xsd:element>
>     − 
>     <xsd:element name="sql-Timestamp">
>     − 
>     <xsd:complexType>
>     <xsd:attribute name="value" type="xsd:dateTime" use="required"/>
>     </xsd:complexType>
>     </xsd:element>
>     − 
>     <xsd:element name="sql-Date">
>     − 
>     <xsd:complexType>
>     <xsd:attribute name="value" type="xsd:date" use="required"/>
>     </xsd:complexType>
>     </xsd:element>
>     − 
>     <xsd:element name="sql-Time">
>     − 
>     <xsd:complexType>
>     <xsd:attribute name="value" type="xsd:time" use="required"/>
>     </xsd:complexType>
>     </xsd:element>
>     <xsd:element name="col-ArrayList" type="tns:col-Collection"/>
>     <xsd:element name="col-LinkedList" type="tns:col-Collection"/>
>     <xsd:element name="col-Stack" type="tns:col-Collection"/>
>     <xsd:element name="col-Vector" type="tns:col-Collection"/>
>     <xsd:element name="col-TreeSet" type="tns:col-Collection"/>
>     <xsd:element name="col-HashSet" type="tns:col-Collection"/>
>     <xsd:element name="col-Collection" type="tns:col-Collection"/>
>     <xsd:element name="map-TreeMap" type="tns:map-Map"/>
>     <xsd:element name="map-WeakHashMap" type="tns:map-Map"/>
>     <xsd:element name="map-Hashtable" type="tns:map-Map"/>
>     <xsd:element name="map-Properties" type="tns:map-Map"/>
>     <xsd:element name="map-HashMap" type="tns:map-Map"/>
>     <xsd:element name="map-Map" type="tns:map-Map"/>
>     <xsd:element name="map-Entry" type="tns:map-Entry"/>
>     <xsd:element name="map-Key" type="tns:map-Key"/>
>     <xsd:element name="map-Value" type="tns:map-Value"/>
>     − 
>     <xsd:element name="eepk-" type="tns:map-Map">
>     − 
>     <xsd:annotation>
>     − 
>     <xsd:documentation>
>     The name of element need to be appended with name of entity such as
> eepk-Product for Product entity. 
>     </xsd:documentation>
>     </xsd:annotation>
>     </xsd:element>
>     − 
>     <xsd:element name="eeval-" type="tns:map-Map">
>     − 
>     <xsd:annotation>
>     − 
>     <xsd:documentation>
>     The name of element need to be appended with name of entity such as
> eeval-Product for Product entity. 
>     </xsd:documentation>
>     </xsd:annotation>
>     </xsd:element>
>     − 
>     <xsd:element name="cus-obj">
>     − 
>     <xsd:annotation>
>     − 
>     <xsd:documentation>
>     Object content need to be in CDATA such as <cus-obj></cus-obj>
>     </xsd:documentation>
>     </xsd:annotation>
>     </xsd:element>
>     − 
>     <xsd:complexType name="map-Map">
>     − 
>     <xsd:sequence>
>     <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Entry"/>
>     </xsd:sequence>
>     </xsd:complexType>
>     − 
>     <xsd:complexType name="map-Entry">
>     − 
>     <xsd:sequence>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Key"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Value"/>
>     </xsd:sequence>
>     </xsd:complexType>
>     − 
>     <xsd:complexType name="map-Key">
>     − 
>     <xsd:all>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
>     </xsd:all>
>     </xsd:complexType>
>     − 
>     <xsd:complexType name="map-Value">
>     − 
>     <xsd:choice>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Integer"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Long"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Float"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Double"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Boolean"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Locale"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Timestamp"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Date"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Time"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-ArrayList"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-LinkedList"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Stack"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Vector"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-TreeSet"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-HashSet"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Collection"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-HashMap"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Properties"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Hashtable"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-WeakHashMap"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-TreeMap"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Map"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eepk-"/>
>     <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eeval-"/>
>     </xsd:choice>
>     </xsd:complexType>
>     − 
>     <xsd:complexType name="col-Collection">
>     − 
>     <xsd:choice>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-String"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-Integer"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Long"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Float"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-Double"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-Boolean"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:std-Locale"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:sql-Timestamp"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Date"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Time"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-ArrayList"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-LinkedList"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Stack"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-Vector"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-TreeSet"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-HashSet"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-Collection"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-HashMap"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-Properties"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-Hashtable"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-WeakHashMap"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-TreeMap"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Map"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eepk-"/>
>     <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eeval-"/>
>     </xsd:choice>
>     </xsd:complexType>
>     </xsd:schema>
>     </wsdl:types>
>     − 
>     <wsdl:message name="searchHelloPersonRequest">
>     − 
>     <wsdl:part name="map-Map" type="tns:map-Map">
>     − 
>     <wsdl:documentation>
>     <attribute java-class="String" name="helloPersonId"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
>     <attribute java-class="java.lang.String" name="login.username"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
>     <attribute java-class="java.lang.String" name="login.password"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
>     </wsdl:documentation>
>     </wsdl:part>
>     </wsdl:message>
>     − 
>     <wsdl:message name="searchHelloPersonResponse">
>     − 
>     <wsdl:part name="map-Map" type="tns:map-Map">
>     − 
>     <wsdl:documentation>
>     <attribute java-class="Map" name="name"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="eeval-"/>
>     </wsdl:documentation>
>     </wsdl:part>
>     </wsdl:message>
>     − 
>     <wsdl:portType name="searchHelloPersonPortType">
>     − 
>     <wsdl:operation name="searchHelloPerson">
>     <wsdl:input message="tns:searchHelloPersonRequest"/>
>     <wsdl:output message="tns:searchHelloPersonResponse"/>
>     </wsdl:operation>
>     </wsdl:portType>
>     − 
>     <wsdl:binding name="searchHelloPersonSoapBinding"
> type="tns:searchHelloPersonPortType">
>     <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>     − 
>     <wsdl:operation name="searchHelloPerson">
>     <soap:operation
> soapAction="http://localhost:8080/webtools/control/SOAPService"
> style="rpc"/>
>     − 
>     <wsdl:input>
>     <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://ofbiz.apache.org/service/" use="literal"/>
>     </wsdl:input>
>     − 
>     <wsdl:output>
>     <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://ofbiz.apache.org/service/" use="literal"/>
>     </wsdl:output>
>     </wsdl:operation>
>     </wsdl:binding>
>     − 
>     <wsdl:service name="searchHelloPerson">
>     − 
>     <wsdl:port binding="tns:searchHelloPersonSoapBinding"
> name="searchHelloPersonPort">
>     <soap:address
> location="http://localhost:8080/webtools/control/SOAPService"/>
>     </wsdl:port>
>     </wsdl:service>
>     </wsdl:definitions>
> 
>     So, is there any problem in WSDL generation or generated WSDL  or any
> changes reauired in ofbiz ModelService.java????
>   -- 
>   Coherent Software Australia Pty Ltd 
>   http://www.cohsoft.com.au/
> 
>   Bonsai ERP, the all-inclusive ERP system 
>   http://www.bonsaierp.com.au/
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> 
>   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-tp4580144p4619013.html 
>   To unsubscribe from Re: how to use ofBiz service in .Net application?,
> click here.
>   NAML
> 

-----
--
Coherent Software Australia Pty Ltd
http://www.cohsoft.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-tp4580144p4621981.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
Hi  Paul,

Thanks for your reply.

There is no WSDLException generated.

void CallsearchHelloPerson(ref map)  => Here,  the type of map parameter is Map (ofBiz  method 's return type Map).

I have converted it according to the java Map type :
//c# code 
static mapEntry makeMap(String keyString, String valString) {

    stdString mapKeyString = new stdString();

    stdString mapValString = new stdString();

    mapKeyString.value = keyString;

    mapValString.value = valString;

    mapKey key = new mapKey();

    key.stdString = mapKeyString;

    mapValue val = new mapValue();

    val.Item = mapValString;

    val.ItemElementName = ItemChoiceType.stdString;

    mapEntry entry = new mapEntry();

    entry.mapKey = key;

    entry.mapValue = val;

    return entry;

  }


//c# code for calling ofBiz service CallupdateInventory.

mapEntry[] mapEntryArray = new mapEntry[5];

mapEntryArray[0] = makeMap("productId", ofbizProductid);

mapEntryArray[1] = makeMap("quantity", ofbizQOH);

mapEntryArray[2] = makeMap("status", "Paid");

mapEntryArray[3] = makeMap("login.username", "admin");

mapEntryArray[4] = makeMap("login.password", "ofbiz");

ofBizInventory.CallupdateInventory(ref mapEntryArray);

So, the input paramter map passed to ofbiz service is received successfully at ofBiz side with all key values set from c# as shown ablve.

But, as you know the return of all methods in ofBiz is map so ofBiz returns map as result of "CallupdateInventory" api call.

In C#, the return type of CallupdateInventory API is void. That also mystery for me that why the generated client stub classes in c# are having return type void?? And, the actual method name in ofBiz is updateInventory(), but in the generated classes of c# there isn't updateInventory method & its CallupdateInventory().

Hope, the above details provides more clarity of the problem.

Thanks,

Deval

  ----- Original Message ----- 
  From: Paul Foxworthy [via OFBiz] 
  To: devalpatel 
  Sent: Wednesday, May 09, 2012 4:45 AM
  Subject: Re: how to use ofBiz service in .Net application?


  Hi Deval, 

  Some of the nulls may not be a problem, if a method takes no parameters or returns void. 

  What's the message from the WSDLException? 

  Also, I noticed you mentioned earlier that your proxy in C# has 

  void CallsearchHelloPerson(ref map) 

  What's the type of the map parameter? Is there any value in it after you call OFBiz? 

  Cheers 

  Paul Foxworthy 


    devalpatel wrote
    Hi Paul, 
    http://localhost:8080/webtools/control/SOAPService/searchHelloPerson?wsdl
    while generating the wsdl by hitting above URL in browser,,, i have debug the code in public void getWSDL(Definition def, String locationURI) throws WSDLException{} method.
    *****DEBUG RESULT (i have make BOLD to the null values in below result..)
    ________________________________________________________________________________________ 
    (com.ibm.wsdl.DefinitionImpl) Definition: name=null targetNamespace=http://ofbiz.apache.org/service/
    Types: 
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
    Part: name=map-Map 
    typeName={http://ofbiz.apache.org/service/}map-Map 
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
    Part: name=map-Map 
    typeName={http://ofbiz.apache.org/service/}map-Map 
    PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType 
    Operation: name=searchHelloPerson 
    Input: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
    Part: name=map-Map 
    typeName={http://ofbiz.apache.org/service/}map-Map 
    Output: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
    Part: name=map-Map 
    typeName={http://ofbiz.apache.org/service/}map-Map 
    Binding: name={http://ofbiz.apache.org/service/}searchHelloPersonSoapBinding 
    PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType 
    Operation: name=searchHelloPerson 
    Input: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest 
    Part: name=map-Map 
    typeName={http://ofbiz.apache.org/service/}map-Map 
    Output: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse 
    Part: name=map-Map 
    typeName={http://ofbiz.apache.org/service/}map-Map 
    BindingOperation: name=searchHelloPerson 
    BindingInput: name=null
    SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body): 
    required=null
    use=literal 
    encodingStyles={http://schemas.xmlsoap.org/soap/encoding/} 
    namespaceURI=http://ofbiz.apache.org/service/
    BindingOutput: name=null 
    SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body): 
    required=null
    use=literal 
    encodingStyles={http://schemas.xmlsoap.org/soap/encoding/} 
    namespaceURI=http://ofbiz.apache.org/service/
    SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation): 
    required=null
    soapActionURI=http://localhost:8080/webtools/control/SOAPService
    style=rpc 
    SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding): 
    required=null
    transportURI=http://schemas.xmlsoap.org/soap/http
    style=rpc 
    ________________________________________________________________________________________ 
      
    The generated WSDL is as below :


    <wsdl:definitions targetNamespace="http://ofbiz.apache.org/service/">
    − 
    <wsdl:types>
    − 
    <xsd:schema targetNamespace="http://ofbiz.apache.org/service/">
    − 
    <xsd:element name="std-String">
    − 
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:string" use="required"/>
    </xsd:complexType>
    </xsd:element>
    − 
    <xsd:element name="std-Integer">
    − 
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:integer" use="required"/>
    </xsd:complexType>
    </xsd:element>
    − 
    <xsd:element name="std-Long">
    − 
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:long" use="required"/>
    </xsd:complexType>
    </xsd:element>
    − 
    <xsd:element name="std-Float">
    − 
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:float" use="required"/>
    </xsd:complexType>
    </xsd:element>
    − 
    <xsd:element name="std-Double">
    − 
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:double" use="required"/>
    </xsd:complexType>
    </xsd:element>
    − 
    <xsd:element name="std-Boolean">
    − 
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:boolean" use="required"/>
    </xsd:complexType>
    </xsd:element>
    − 
    <xsd:element name="std-Locale">
    − 
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:string" use="required"/>
    </xsd:complexType>
    </xsd:element>
    − 
    <xsd:element name="sql-Timestamp">
    − 
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:dateTime" use="required"/>
    </xsd:complexType>
    </xsd:element>
    − 
    <xsd:element name="sql-Date">
    − 
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:date" use="required"/>
    </xsd:complexType>
    </xsd:element>
    − 
    <xsd:element name="sql-Time">
    − 
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:time" use="required"/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="col-ArrayList" type="tns:col-Collection"/>
    <xsd:element name="col-LinkedList" type="tns:col-Collection"/>
    <xsd:element name="col-Stack" type="tns:col-Collection"/>
    <xsd:element name="col-Vector" type="tns:col-Collection"/>
    <xsd:element name="col-TreeSet" type="tns:col-Collection"/>
    <xsd:element name="col-HashSet" type="tns:col-Collection"/>
    <xsd:element name="col-Collection" type="tns:col-Collection"/>
    <xsd:element name="map-TreeMap" type="tns:map-Map"/>
    <xsd:element name="map-WeakHashMap" type="tns:map-Map"/>
    <xsd:element name="map-Hashtable" type="tns:map-Map"/>
    <xsd:element name="map-Properties" type="tns:map-Map"/>
    <xsd:element name="map-HashMap" type="tns:map-Map"/>
    <xsd:element name="map-Map" type="tns:map-Map"/>
    <xsd:element name="map-Entry" type="tns:map-Entry"/>
    <xsd:element name="map-Key" type="tns:map-Key"/>
    <xsd:element name="map-Value" type="tns:map-Value"/>
    − 
    <xsd:element name="eepk-" type="tns:map-Map">
    − 
    <xsd:annotation>
    − 
    <xsd:documentation>
    The name of element need to be appended with name of entity such as eepk-Product for Product entity. 
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    − 
    <xsd:element name="eeval-" type="tns:map-Map">
    − 
    <xsd:annotation>
    − 
    <xsd:documentation>
    The name of element need to be appended with name of entity such as eeval-Product for Product entity. 
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    − 
    <xsd:element name="cus-obj">
    − 
    <xsd:annotation>
    − 
    <xsd:documentation>
    Object content need to be in CDATA such as <cus-obj></cus-obj>
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    − 
    <xsd:complexType name="map-Map">
    − 
    <xsd:sequence>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Entry"/>
    </xsd:sequence>
    </xsd:complexType>
    − 
    <xsd:complexType name="map-Entry">
    − 
    <xsd:sequence>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Key"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Value"/>
    </xsd:sequence>
    </xsd:complexType>
    − 
    <xsd:complexType name="map-Key">
    − 
    <xsd:all>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
    </xsd:all>
    </xsd:complexType>
    − 
    <xsd:complexType name="map-Value">
    − 
    <xsd:choice>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Integer"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Long"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Float"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Double"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Boolean"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Locale"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Timestamp"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Date"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Time"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-ArrayList"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-LinkedList"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Stack"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Vector"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-TreeSet"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-HashSet"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Collection"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-HashMap"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Properties"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Hashtable"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-WeakHashMap"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-TreeMap"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Map"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eepk-"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eeval-"/>
    </xsd:choice>
    </xsd:complexType>
    − 
    <xsd:complexType name="col-Collection">
    − 
    <xsd:choice>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-String"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Integer"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Long"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Float"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Double"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Boolean"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Locale"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Timestamp"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Date"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Time"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-ArrayList"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-LinkedList"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Stack"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Vector"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-TreeSet"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-HashSet"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Collection"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-HashMap"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Properties"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Hashtable"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-WeakHashMap"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-TreeMap"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Map"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eepk-"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eeval-"/>
    </xsd:choice>
    </xsd:complexType>
    </xsd:schema>
    </wsdl:types>
    − 
    <wsdl:message name="searchHelloPersonRequest">
    − 
    <wsdl:part name="map-Map" type="tns:map-Map">
    − 
    <wsdl:documentation>
    <attribute java-class="String" name="helloPersonId" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
    <attribute java-class="java.lang.String" name="login.username" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
    <attribute java-class="java.lang.String" name="login.password" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
    </wsdl:documentation>
    </wsdl:part>
    </wsdl:message>
    − 
    <wsdl:message name="searchHelloPersonResponse">
    − 
    <wsdl:part name="map-Map" type="tns:map-Map">
    − 
    <wsdl:documentation>
    <attribute java-class="Map" name="name" namespace="http://ofbiz.apache.org/service/" optional="true" type="eeval-"/>
    </wsdl:documentation>
    </wsdl:part>
    </wsdl:message>
    − 
    <wsdl:portType name="searchHelloPersonPortType">
    − 
    <wsdl:operation name="searchHelloPerson">
    <wsdl:input message="tns:searchHelloPersonRequest"/>
    <wsdl:output message="tns:searchHelloPersonResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    − 
    <wsdl:binding name="searchHelloPersonSoapBinding" type="tns:searchHelloPersonPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    − 
    <wsdl:operation name="searchHelloPerson">
    <soap:operation soapAction="http://localhost:8080/webtools/control/SOAPService" style="rpc"/>
    − 
    <wsdl:input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ofbiz.apache.org/service/" use="literal"/>
    </wsdl:input>
    − 
    <wsdl:output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ofbiz.apache.org/service/" use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    − 
    <wsdl:service name="searchHelloPerson">
    − 
    <wsdl:port binding="tns:searchHelloPersonSoapBinding" name="searchHelloPersonPort">
    <soap:address location="http://localhost:8080/webtools/control/SOAPService"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

    So, is there any problem in WSDL generation or generated WSDL  or any changes reauired in ofbiz ModelService.java????
  -- 
  Coherent Software Australia Pty Ltd 
  http://www.cohsoft.com.au/

  Bonsai ERP, the all-inclusive ERP system 
  http://www.bonsaierp.com.au/




------------------------------------------------------------------------------

  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-tp4580144p4619013.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-tp4580144p4619935.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Paul Foxworthy <pa...@cohsoft.com.au>.
Hi Deval,

Some of the nulls may not be a problem, if a method takes no parameters or
returns void.

What's the message from the WSDLException?

Also, I noticed you mentioned earlier that your proxy in C# has

void CallsearchHelloPerson(ref map)

What's the type of the map parameter? Is there any value in it after you
call OFBiz?

Cheers

Paul Foxworthy


devalpatel wrote
> 
> *Hi Paul,
> http://localhost:8080/webtools/control/SOAPService/searchHelloPerson?wsdl
> while generating the wsdl by hitting above URL in browser,,, i have debug
> the code in public void getWSDL(Definition def, String locationURI) throws
> WSDLException{} method.*
> ******DEBUG RESULT (i have make BOLD to the null values in below
> result..)*
> ________________________________________________________________________________________
> (com.ibm.wsdl.DefinitionImpl) Definition: name=null
> targetNamespace=http://ofbiz.apache.org/service/
> Types:
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
> Operation: name=searchHelloPerson
> *Input: name=null*
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> *Output: name=null*
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> Binding:
> name={http://ofbiz.apache.org/service/}searchHelloPersonSoapBinding
> PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
> Operation: name=searchHelloPerson
> *Input: name=null*
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> *Output: name=null*
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> BindingOperation: name=searchHelloPerson
> *BindingInput: name=null*
> SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
> *required=null*
> use=literal
> encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
> namespaceURI=http://ofbiz.apache.org/service/
> BindingOutput: name=null
> SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
> *required=null*
> use=literal
> encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
> namespaceURI=http://ofbiz.apache.org/service/
> SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation):
> *required=null*
> soapActionURI=http://localhost:8080/webtools/control/SOAPService
> style=rpc
> SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding):
> *required=null*
> transportURI=http://schemas.xmlsoap.org/soap/http
> style=rpc
> ________________________________________________________________________________________
>  
> *The generated WSDL is as below :*
> 
> 
> <wsdl:definitions targetNamespace="http://ofbiz.apache.org/service/">
> −
> <wsdl:types>
> −
> <xsd:schema targetNamespace="http://ofbiz.apache.org/service/">
> −
> <xsd:element name="std-String">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:string" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Integer">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:integer" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Long">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:long" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Float">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:float" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Double">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:double" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Boolean">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:boolean" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Locale">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:string" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="sql-Timestamp">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:dateTime" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="sql-Date">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:date" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="sql-Time">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:time" use="required"/>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="col-ArrayList" type="tns:col-Collection"/>
> <xsd:element name="col-LinkedList" type="tns:col-Collection"/>
> <xsd:element name="col-Stack" type="tns:col-Collection"/>
> <xsd:element name="col-Vector" type="tns:col-Collection"/>
> <xsd:element name="col-TreeSet" type="tns:col-Collection"/>
> <xsd:element name="col-HashSet" type="tns:col-Collection"/>
> <xsd:element name="col-Collection" type="tns:col-Collection"/>
> <xsd:element name="map-TreeMap" type="tns:map-Map"/>
> <xsd:element name="map-WeakHashMap" type="tns:map-Map"/>
> <xsd:element name="map-Hashtable" type="tns:map-Map"/>
> <xsd:element name="map-Properties" type="tns:map-Map"/>
> <xsd:element name="map-HashMap" type="tns:map-Map"/>
> <xsd:element name="map-Map" type="tns:map-Map"/>
> <xsd:element name="map-Entry" type="tns:map-Entry"/>
> <xsd:element name="map-Key" type="tns:map-Key"/>
> <xsd:element name="map-Value" type="tns:map-Value"/>
> −
> <xsd:element name="eepk-" type="tns:map-Map">
> −
> <xsd:annotation>
> −
> <xsd:documentation>
> The name of element need to be appended with name of entity such as
> eepk-Product for Product entity.
> </xsd:documentation>
> </xsd:annotation>
> </xsd:element>
> −
> <xsd:element name="eeval-" type="tns:map-Map">
> −
> <xsd:annotation>
> −
> <xsd:documentation>
> The name of element need to be appended with name of entity such as
> eeval-Product for Product entity.
> </xsd:documentation>
> </xsd:annotation>
> </xsd:element>
> −
> <xsd:element name="cus-obj">
> −
> <xsd:annotation>
> −
> <xsd:documentation>
> Object content need to be in CDATA such as <cus-obj></cus-obj>
> </xsd:documentation>
> </xsd:annotation>
> </xsd:element>
> −
> <xsd:complexType name="map-Map">
> −
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Entry"/>
> </xsd:sequence>
> </xsd:complexType>
> −
> <xsd:complexType name="map-Entry">
> −
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Key"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Value"/>
> </xsd:sequence>
> </xsd:complexType>
> −
> <xsd:complexType name="map-Key">
> −
> <xsd:all>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
> </xsd:all>
> </xsd:complexType>
> −
> <xsd:complexType name="map-Value">
> −
> <xsd:choice>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Integer"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Long"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Float"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Double"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Boolean"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Locale"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Timestamp"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Date"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Time"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-ArrayList"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-LinkedList"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Stack"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Vector"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-TreeSet"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-HashSet"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Collection"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-HashMap"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Properties"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Hashtable"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-WeakHashMap"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-TreeMap"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Map"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eepk-"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eeval-"/>
> </xsd:choice>
> </xsd:complexType>
> −
> <xsd:complexType name="col-Collection">
> −
> <xsd:choice>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-String"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Integer"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Long"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Float"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Double"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Boolean"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Locale"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Timestamp"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Date"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Time"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-ArrayList"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-LinkedList"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Stack"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Vector"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-TreeSet"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-HashSet"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-Collection"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-HashMap"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-Properties"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Hashtable"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-WeakHashMap"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-TreeMap"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Map"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eepk-"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eeval-"/>
> </xsd:choice>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> −
> <wsdl:message name="searchHelloPersonRequest">
> −
> <wsdl:part name="map-Map" type="tns:map-Map">
> −
> <wsdl:documentation>
> <attribute java-class="String" name="helloPersonId"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
> <attribute java-class="java.lang.String" name="login.username"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
> <attribute java-class="java.lang.String" name="login.password"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
> </wsdl:documentation>
> </wsdl:part>
> </wsdl:message>
> −
> <wsdl:message name="searchHelloPersonResponse">
> −
> <wsdl:part name="map-Map" type="tns:map-Map">
> −
> <wsdl:documentation>
> <attribute java-class="Map" name="name"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="eeval-"/>
> </wsdl:documentation>
> </wsdl:part>
> </wsdl:message>
> −
> <wsdl:portType name="searchHelloPersonPortType">
> −
> <wsdl:operation name="searchHelloPerson">
> <wsdl:input message="tns:searchHelloPersonRequest"/>
> <wsdl:output message="tns:searchHelloPersonResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> −
> <wsdl:binding name="searchHelloPersonSoapBinding"
> type="tns:searchHelloPersonPortType">
> <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> −
> <wsdl:operation name="searchHelloPerson">
> <soap:operation
> soapAction="http://localhost:8080/webtools/control/SOAPService"
> style="rpc"/>
> −
> <wsdl:input>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://ofbiz.apache.org/service/" use="literal"/>
> </wsdl:input>
> −
> <wsdl:output>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://ofbiz.apache.org/service/" use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> −
> <wsdl:service name="searchHelloPerson">
> −
> <wsdl:port binding="tns:searchHelloPersonSoapBinding"
> name="searchHelloPersonPort">
> <soap:address
> location="http://localhost:8080/webtools/control/SOAPService"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> 
> *So, is there any problem in WSDL generation or generated WSDL  or any
> changes reauired in ofbiz ModelService.java????*
> 


-----
--
Coherent Software Australia Pty Ltd
http://www.cohsoft.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-tp4580144p4619013.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Paul Foxworthy <pa...@cohsoft.com.au>.
Hi Deval,

I've checked some WSDL generated elsewhere, and the nulls in the Definition
are all for optional things in the WSDL, so I don't think that's the
problem.

Cheers

Paul Foxworthy


devalpatel wrote
> 
> *Hi Paul,
> http://localhost:8080/webtools/control/SOAPService/searchHelloPerson?wsdl
> while generating the wsdl by hitting above URL in browser,,, i have debug
> the code in public void getWSDL(Definition def, String locationURI) throws
> WSDLException{} method.*
> ******DEBUG RESULT (i have make BOLD to the null values in below
> result..)*
> ________________________________________________________________________________________
> (com.ibm.wsdl.DefinitionImpl) Definition: name=null
> targetNamespace=http://ofbiz.apache.org/service/
> Types:
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
> Operation: name=searchHelloPerson
> *Input: name=null*
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> *Output: name=null*
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> Binding:
> name={http://ofbiz.apache.org/service/}searchHelloPersonSoapBinding
> PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
> Operation: name=searchHelloPerson
> *Input: name=null*
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> *Output: name=null*
> Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
> Part: name=map-Map
> typeName={http://ofbiz.apache.org/service/}map-Map
> BindingOperation: name=searchHelloPerson
> *BindingInput: name=null*
> SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
> *required=null*
> use=literal
> encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
> namespaceURI=http://ofbiz.apache.org/service/
> BindingOutput: name=null
> SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
> *required=null*
> use=literal
> encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
> namespaceURI=http://ofbiz.apache.org/service/
> SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation):
> *required=null*
> soapActionURI=http://localhost:8080/webtools/control/SOAPService
> style=rpc
> SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding):
> *required=null*
> transportURI=http://schemas.xmlsoap.org/soap/http
> style=rpc
> ________________________________________________________________________________________
>  
> *The generated WSDL is as below :*
> 
> 
> <wsdl:definitions targetNamespace="http://ofbiz.apache.org/service/">
> −
> <wsdl:types>
> −
> <xsd:schema targetNamespace="http://ofbiz.apache.org/service/">
> −
> <xsd:element name="std-String">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:string" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Integer">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:integer" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Long">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:long" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Float">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:float" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Double">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:double" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Boolean">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:boolean" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="std-Locale">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:string" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="sql-Timestamp">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:dateTime" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="sql-Date">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:date" use="required"/>
> </xsd:complexType>
> </xsd:element>
> −
> <xsd:element name="sql-Time">
> −
> <xsd:complexType>
> <xsd:attribute name="value" type="xsd:time" use="required"/>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="col-ArrayList" type="tns:col-Collection"/>
> <xsd:element name="col-LinkedList" type="tns:col-Collection"/>
> <xsd:element name="col-Stack" type="tns:col-Collection"/>
> <xsd:element name="col-Vector" type="tns:col-Collection"/>
> <xsd:element name="col-TreeSet" type="tns:col-Collection"/>
> <xsd:element name="col-HashSet" type="tns:col-Collection"/>
> <xsd:element name="col-Collection" type="tns:col-Collection"/>
> <xsd:element name="map-TreeMap" type="tns:map-Map"/>
> <xsd:element name="map-WeakHashMap" type="tns:map-Map"/>
> <xsd:element name="map-Hashtable" type="tns:map-Map"/>
> <xsd:element name="map-Properties" type="tns:map-Map"/>
> <xsd:element name="map-HashMap" type="tns:map-Map"/>
> <xsd:element name="map-Map" type="tns:map-Map"/>
> <xsd:element name="map-Entry" type="tns:map-Entry"/>
> <xsd:element name="map-Key" type="tns:map-Key"/>
> <xsd:element name="map-Value" type="tns:map-Value"/>
> −
> <xsd:element name="eepk-" type="tns:map-Map">
> −
> <xsd:annotation>
> −
> <xsd:documentation>
> The name of element need to be appended with name of entity such as
> eepk-Product for Product entity.
> </xsd:documentation>
> </xsd:annotation>
> </xsd:element>
> −
> <xsd:element name="eeval-" type="tns:map-Map">
> −
> <xsd:annotation>
> −
> <xsd:documentation>
> The name of element need to be appended with name of entity such as
> eeval-Product for Product entity.
> </xsd:documentation>
> </xsd:annotation>
> </xsd:element>
> −
> <xsd:element name="cus-obj">
> −
> <xsd:annotation>
> −
> <xsd:documentation>
> Object content need to be in CDATA such as <cus-obj></cus-obj>
> </xsd:documentation>
> </xsd:annotation>
> </xsd:element>
> −
> <xsd:complexType name="map-Map">
> −
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Entry"/>
> </xsd:sequence>
> </xsd:complexType>
> −
> <xsd:complexType name="map-Entry">
> −
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Key"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Value"/>
> </xsd:sequence>
> </xsd:complexType>
> −
> <xsd:complexType name="map-Key">
> −
> <xsd:all>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
> </xsd:all>
> </xsd:complexType>
> −
> <xsd:complexType name="map-Value">
> −
> <xsd:choice>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Integer"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Long"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Float"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Double"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Boolean"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Locale"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Timestamp"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Date"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Time"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-ArrayList"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-LinkedList"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Stack"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Vector"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-TreeSet"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-HashSet"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Collection"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-HashMap"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Properties"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Hashtable"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-WeakHashMap"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-TreeMap"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Map"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eepk-"/>
> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eeval-"/>
> </xsd:choice>
> </xsd:complexType>
> −
> <xsd:complexType name="col-Collection">
> −
> <xsd:choice>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-String"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Integer"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Long"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Float"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Double"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Boolean"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Locale"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Timestamp"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Date"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Time"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-ArrayList"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-LinkedList"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Stack"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Vector"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-TreeSet"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-HashSet"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:col-Collection"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-HashMap"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-Properties"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Hashtable"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
> ref="tns:map-WeakHashMap"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-TreeMap"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Map"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eepk-"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eeval-"/>
> </xsd:choice>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> −
> <wsdl:message name="searchHelloPersonRequest">
> −
> <wsdl:part name="map-Map" type="tns:map-Map">
> −
> <wsdl:documentation>
> <attribute java-class="String" name="helloPersonId"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
> <attribute java-class="java.lang.String" name="login.username"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
> <attribute java-class="java.lang.String" name="login.password"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="std-String"/>
> </wsdl:documentation>
> </wsdl:part>
> </wsdl:message>
> −
> <wsdl:message name="searchHelloPersonResponse">
> −
> <wsdl:part name="map-Map" type="tns:map-Map">
> −
> <wsdl:documentation>
> <attribute java-class="Map" name="name"
> namespace="http://ofbiz.apache.org/service/" optional="true"
> type="eeval-"/>
> </wsdl:documentation>
> </wsdl:part>
> </wsdl:message>
> −
> <wsdl:portType name="searchHelloPersonPortType">
> −
> <wsdl:operation name="searchHelloPerson">
> <wsdl:input message="tns:searchHelloPersonRequest"/>
> <wsdl:output message="tns:searchHelloPersonResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> −
> <wsdl:binding name="searchHelloPersonSoapBinding"
> type="tns:searchHelloPersonPortType">
> <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> −
> <wsdl:operation name="searchHelloPerson">
> <soap:operation
> soapAction="http://localhost:8080/webtools/control/SOAPService"
> style="rpc"/>
> −
> <wsdl:input>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://ofbiz.apache.org/service/" use="literal"/>
> </wsdl:input>
> −
> <wsdl:output>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://ofbiz.apache.org/service/" use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> −
> <wsdl:service name="searchHelloPerson">
> −
> <wsdl:port binding="tns:searchHelloPersonSoapBinding"
> name="searchHelloPersonPort">
> <soap:address
> location="http://localhost:8080/webtools/control/SOAPService"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> 
> *So, is there any problem in WSDL generation or generated WSDL  or any
> changes reauired in ofbiz ModelService.java????*
> 


-----
--
Coherent Software Australia Pty Ltd
http://www.cohsoft.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-tp4580144p4619039.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
*Hi Paul,
http://localhost:8080/webtools/control/SOAPService/searchHelloPerson?wsdl
while generating the wsdl by hitting above URL in browser,,, i have debug
the code in public void getWSDL(Definition def, String locationURI) throws
WSDLException{} method.*
*DEBUG RESULT ::::::::*
________________________________________________________________________________________
(com.ibm.wsdl.DefinitionImpl) Definition: name=null
targetNamespace=http://ofbiz.apache.org/service/
Types:
Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
Part: name=map-Map
typeName={http://ofbiz.apache.org/service/}map-Map
Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
Part: name=map-Map
typeName={http://ofbiz.apache.org/service/}map-Map
PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
Operation: name=searchHelloPerson
Input: name=null
Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
Part: name=map-Map
typeName={http://ofbiz.apache.org/service/}map-Map
Output: name=null
Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
Part: name=map-Map
typeName={http://ofbiz.apache.org/service/}map-Map
Binding: name={http://ofbiz.apache.org/service/}searchHelloPersonSoapBinding
PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
Operation: name=searchHelloPerson
Input: name=null
Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
Part: name=map-Map
typeName={http://ofbiz.apache.org/service/}map-Map
Output: name=null
Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
Part: name=map-Map
typeName={http://ofbiz.apache.org/service/}map-Map
BindingOperation: name=searchHelloPerson
BindingInput: name=null
SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
required=null
use=literal
encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
namespaceURI=http://ofbiz.apache.org/service/
BindingOutput: name=null
SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
required=null
use=literal
encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
namespaceURI=http://ofbiz.apache.org/service/
SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation):
required=null
soapActionURI=http://localhost:8080/webtools/control/SOAPService
style=rpc
SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding):
required=null
transportURI=http://schemas.xmlsoap.org/soap/http
style=rpc
________________________________________________________________________________________
 
*The generated WSDL is as below :*


<wsdl:definitions targetNamespace="http://ofbiz.apache.org/service/">
−
<wsdl:types>
−
<xsd:schema targetNamespace="http://ofbiz.apache.org/service/">
−
<xsd:element name="std-String">
−
<xsd:complexType>
<xsd:attribute name="value" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
−
<xsd:element name="std-Integer">
−
<xsd:complexType>
<xsd:attribute name="value" type="xsd:integer" use="required"/>
</xsd:complexType>
</xsd:element>
−
<xsd:element name="std-Long">
−
<xsd:complexType>
<xsd:attribute name="value" type="xsd:long" use="required"/>
</xsd:complexType>
</xsd:element>
−
<xsd:element name="std-Float">
−
<xsd:complexType>
<xsd:attribute name="value" type="xsd:float" use="required"/>
</xsd:complexType>
</xsd:element>
−
<xsd:element name="std-Double">
−
<xsd:complexType>
<xsd:attribute name="value" type="xsd:double" use="required"/>
</xsd:complexType>
</xsd:element>
−
<xsd:element name="std-Boolean">
−
<xsd:complexType>
<xsd:attribute name="value" type="xsd:boolean" use="required"/>
</xsd:complexType>
</xsd:element>
−
<xsd:element name="std-Locale">
−
<xsd:complexType>
<xsd:attribute name="value" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
−
<xsd:element name="sql-Timestamp">
−
<xsd:complexType>
<xsd:attribute name="value" type="xsd:dateTime" use="required"/>
</xsd:complexType>
</xsd:element>
−
<xsd:element name="sql-Date">
−
<xsd:complexType>
<xsd:attribute name="value" type="xsd:date" use="required"/>
</xsd:complexType>
</xsd:element>
−
<xsd:element name="sql-Time">
−
<xsd:complexType>
<xsd:attribute name="value" type="xsd:time" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="col-ArrayList" type="tns:col-Collection"/>
<xsd:element name="col-LinkedList" type="tns:col-Collection"/>
<xsd:element name="col-Stack" type="tns:col-Collection"/>
<xsd:element name="col-Vector" type="tns:col-Collection"/>
<xsd:element name="col-TreeSet" type="tns:col-Collection"/>
<xsd:element name="col-HashSet" type="tns:col-Collection"/>
<xsd:element name="col-Collection" type="tns:col-Collection"/>
<xsd:element name="map-TreeMap" type="tns:map-Map"/>
<xsd:element name="map-WeakHashMap" type="tns:map-Map"/>
<xsd:element name="map-Hashtable" type="tns:map-Map"/>
<xsd:element name="map-Properties" type="tns:map-Map"/>
<xsd:element name="map-HashMap" type="tns:map-Map"/>
<xsd:element name="map-Map" type="tns:map-Map"/>
<xsd:element name="map-Entry" type="tns:map-Entry"/>
<xsd:element name="map-Key" type="tns:map-Key"/>
<xsd:element name="map-Value" type="tns:map-Value"/>
−
<xsd:element name="eepk-" type="tns:map-Map">
−
<xsd:annotation>
−
<xsd:documentation>
The name of element need to be appended with name of entity such as
eepk-Product for Product entity.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
−
<xsd:element name="eeval-" type="tns:map-Map">
−
<xsd:annotation>
−
<xsd:documentation>
The name of element need to be appended with name of entity such as
eeval-Product for Product entity.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
−
<xsd:element name="cus-obj">
−
<xsd:annotation>
−
<xsd:documentation>
Object content need to be in CDATA such as <cus-obj></cus-obj>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
−
<xsd:complexType name="map-Map">
−
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Entry"/>
</xsd:sequence>
</xsd:complexType>
−
<xsd:complexType name="map-Entry">
−
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Key"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Value"/>
</xsd:sequence>
</xsd:complexType>
−
<xsd:complexType name="map-Key">
−
<xsd:all>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
</xsd:all>
</xsd:complexType>
−
<xsd:complexType name="map-Value">
−
<xsd:choice>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Integer"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Long"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Float"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Double"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Boolean"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Locale"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Timestamp"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Date"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Time"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-ArrayList"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-LinkedList"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Stack"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Vector"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-TreeSet"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-HashSet"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Collection"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-HashMap"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Properties"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Hashtable"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-WeakHashMap"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-TreeMap"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Map"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:eepk-"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="tns:eeval-"/>
</xsd:choice>
</xsd:complexType>
−
<xsd:complexType name="col-Collection">
−
<xsd:choice>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-String"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Integer"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Long"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Float"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Double"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Boolean"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Locale"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Timestamp"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Date"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Time"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-ArrayList"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-LinkedList"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Stack"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Vector"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-TreeSet"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-HashSet"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Collection"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-HashMap"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Properties"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Hashtable"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-WeakHashMap"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-TreeMap"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Map"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eepk-"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eeval-"/>
</xsd:choice>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
−
<wsdl:message name="searchHelloPersonRequest">
−
<wsdl:part name="map-Map" type="tns:map-Map">
−
<wsdl:documentation>
<attribute java-class="String" name="helloPersonId"
namespace="http://ofbiz.apache.org/service/" optional="true"
type="std-String"/>
<attribute java-class="java.lang.String" name="login.username"
namespace="http://ofbiz.apache.org/service/" optional="true"
type="std-String"/>
<attribute java-class="java.lang.String" name="login.password"
namespace="http://ofbiz.apache.org/service/" optional="true"
type="std-String"/>
</wsdl:documentation>
</wsdl:part>
</wsdl:message>
−
<wsdl:message name="searchHelloPersonResponse">
−
<wsdl:part name="map-Map" type="tns:map-Map">
−
<wsdl:documentation>
<attribute java-class="Map" name="name"
namespace="http://ofbiz.apache.org/service/" optional="true" type="eeval-"/>
</wsdl:documentation>
</wsdl:part>
</wsdl:message>
−
<wsdl:portType name="searchHelloPersonPortType">
−
<wsdl:operation name="searchHelloPerson">
<wsdl:input message="tns:searchHelloPersonRequest"/>
<wsdl:output message="tns:searchHelloPersonResponse"/>
</wsdl:operation>
</wsdl:portType>
−
<wsdl:binding name="searchHelloPersonSoapBinding"
type="tns:searchHelloPersonPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
−
<wsdl:operation name="searchHelloPerson">
<soap:operation
soapAction="http://localhost:8080/webtools/control/SOAPService"
style="rpc"/>
−
<wsdl:input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://ofbiz.apache.org/service/" use="literal"/>
</wsdl:input>
−
<wsdl:output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://ofbiz.apache.org/service/" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
−
<wsdl:service name="searchHelloPerson">
−
<wsdl:port binding="tns:searchHelloPersonSoapBinding"
name="searchHelloPersonPort">
<soap:address
location="http://localhost:8080/webtools/control/SOAPService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

*So, is there any problem in WSDL generation or generated WSDL  or any
changes reauired in ofbiz ModelService.java????*

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4617260.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Rajbir Saini <ra...@yahoo.com>.
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.
>


Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
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.

Re: how to use ofBiz service in .Net application?

Posted by Paul Foxworthy <pa...@cohsoft.com.au>.
Hi Deval,

In step 6, do you mean that you have confirmed that the map data is in the
SOAP response? In other words, have you confirmed that the problem is
definitely in the WSDL description of the message, and not the message
itself?

Assuming that is the case, try writing a simple service in .NET that returns
a Dictionary, which is the .NET equivalent of a Map. Then write a client to
consume the service, verify that it works, and review the WSDL.

In answer to your question, "Is there any file changes required in ofBiz
framework/service package ????". Possibly yes. If you can identify what's
wrong in the WSDL, something can be done about it.

Cheers

Paul Foxworthy


devalpatel wrote
> 
> I have played with the wsdl modification... but no success..
> 
> I can able to call ofbiz service in the .Net app and call comes to the
> ofbiz side.......but, ofbiz does not return anything in response to the
> call and null is received in .net app.....
> 
> STEPS :
> 1) I have implemented ofbiz service to update inventory.
> 2) exported the service for using in .net applicaiton.
> 3) in .net application the client stub is generated using the wsdl.
> 4) called the service from .Net
> 5) service is called the inventory is updated in ofbiz.
> 6) ofbiz sends the response  BUT at in the calling code in C#,,,,,,,,, the
> NULL is returned........
> 
> OTHER POINT --------- Instead of Map the client stub is generated with
> void return type...
> 
> Is there any file changes required in ofBiz framework/service package ????
> 
> Any other solution/suggestion....plzzzz..........
> 


-----
--
Coherent Software Australia Pty Ltd
http://www.cohsoft.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-tp4580144p4611328.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Rajbir Saini <ra...@yahoo.com>.
Based on my experience, I would suggest not to struggle with exporting 
the OFBiz services. I generally  wrap OFBiz services into my own SOAP 
services. It is very easier to wrap the OFBiz in your own and do 
whatever you want to, make your web services to accept any input, return 
whatever you want to.

Thanks,

Raj

On Saturday 05 May 2012 07:49 PM, devalpatel wrote:
> I have played with the wsdl modification... but no success..
>
> I can able to call ofbiz service in the .Net app and call comes to the ofbiz
> side.......but, ofbiz does not return anything in response to the call and
> null is received in .net app.....
>
> STEPS :
> 1) I have implemented ofbiz service to update inventory.
> 2) exported the service for using in .net applicaiton.
> 3) in .net application the client stub is generated using the wsdl.
> 4) called the service from .Net
> 5) service is called the inventory is updated in ofbiz.
> 6) ofbiz sends the response  BUT at in the calling code in C#,,,,,,,,, the
> NULL is returned........
>
> OTHER POINT --------- Instead of Map the client stub is generated with void
> return type...
>
> Is there any file changes required in ofBiz framework/service package ????
>
> Any other solution/suggestion....plzzzz..........
>
>
>
>
>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4611173.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>


Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
I have played with the wsdl modification... but no success..

I can able to call ofbiz service in the .Net app and call comes to the ofbiz
side.......but, ofbiz does not return anything in response to the call and
null is received in .net app.....

STEPS :
1) I have implemented ofbiz service to update inventory.
2) exported the service for using in .net applicaiton.
3) in .net application the client stub is generated using the wsdl.
4) called the service from .Net
5) service is called the inventory is updated in ofbiz.
6) ofbiz sends the response  BUT at in the calling code in C#,,,,,,,,, the
NULL is returned........

OTHER POINT --------- Instead of Map the client stub is generated with void
return type...

Is there any file changes required in ofBiz framework/service package ????

Any other solution/suggestion....plzzzz..........







--
View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4611173.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Paul Foxworthy <pa...@cohsoft.com.au>.
Hi Deval,

Are the map values returned from the service actually in the SOAP response?

If they are, but your method in the proxy is void, the WSDL and
associated XML schema is wrong. Try tweaking the WSDL by hand, and
then define a Service Reference using your customised WSDL. If you can
identify what's missing from the WSDL, it might be possible to fix
inside OFBiz.

I don't hold much hope for getting a Web service proxy to return a
Dictionary/Map, so as I've said I would pursue using WCF.

Cheers

Paul Foxworthy

On 4 May 2012 01:13, devalpatel  wrote:
> Thanks Jacques...
>
> I have taken latest trunk... And I have reviewed the Jira issues. but no
> success... :(

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Phone: (03) 9585 6788
Fax: (03) 9585 1086
Web: http://www.cohsoft.com.au/
Email: sales@cohsoft.com.au

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/

Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
Thanks Jacques...

I have taken latest trunk... And I have reviewed the Jira issues. but no
success... :(




--
View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4606269.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Jacques Le Roux <ja...@les7arts.com>.
OK I have fixed some things in trunk recently.
I have no time at the moment, but I will give you some pointers tonight...
You may already try by yourself searching in OFBiz Jiras

Jacques

From: "devalpatel" <de...@netweb.biz>
> Release-revision : release10.04-133252
>
> --
> View this message in context: 
> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4605524.html
> Sent from the OFBiz - User mailing list archive at Nabble.com. 

Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
Release-revision : release10.04-133252

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4605524.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Jacques Le Roux <ja...@les7arts.com>.
Which Release.revision are you using (see bottom of backend pages) ?

Jacques

From: "devalpatel" <de...@netweb.biz>
> Hi Paul,
>
> I am commited to ofBiz. And, responsible for the integration betweeb ofBiz and .Net application.
>
> I just had made successful call from .Net to the ofBiz service.
>
> But, when my ofBiz service sends  the service call to .Net back,  the .Net receives the response as void. And, the result is null 
> at .Net side.
>
> In short, Now the (.Net[as web client] --> ofBiz[as webservice server])communication occurs, but as a result the .Net receives 
> null value eventhough successful return of ofBiz call.
>
> One thing.... my ofBiz webservice method is searchHelloPerson().
>
> But, after generatting the client stub in .Net I am getting below method :
> void CallsearchHelloPerson(ref map)         instead of Map searchHelloPerson(ref map)
>
> void CallsearchHelloPersonAsync(map)        instead of Map searchHelloPersonAsync(map)
>
> Thats why I can not get the result as return value.
>
> Thanks,
>
> Deval
>
>  ----- Original Message ----- 
>  From: Paul Foxworthy [via OFBiz]
>  To: devalpatel
>  Sent: Thursday, May 03, 2012 12:43 PM
>  Subject: Re: how to use ofBiz service in .Net application?
>
>
>  Hi Deval,
>
>  Assuming you're committed to .NET, I strongly recommend you use WCF. It's a fraction more complicated than just using a Web 
> Service, and vastly more flexible. You could think of this issue as one example of that.
>
>  Cheers
>
>  Paul Foxworthy
>
>
>    devalpatel wrote
>    Hi Paul,
>
>    Thanks for your help.
>
>    We have .Net web site project. We are not using WCF.
>
>    We have tried using the Add Web reference of ofBiz service in .Net. But it gives XML generation error.
>
>    So, is there any other option to call ofBiz service successfully in c# .Net web application.
>
>    Thanks,
>
>    Deval
>
>      ----- Original Message ----- 
>      From: Paul Foxworthy [via OFBiz]
>      To: devalpatel
>      Sent: Thursday, May 03, 2012 11:28 AM
>      Subject: Re: how to use ofBiz service in .Net application?
>
>
>      Hi Deval,
>
>      .NET WCF can receive a Map from a SOAP service. In .NET terms it's a Dictionary.
>
>      There's a nice discussion at http://www.request-response.com/blog/PermaLink,guid,ff5fab81-affb-4b2b-aa67-c80bdfc86cbd.aspx
>
>      Cheers
>
>      Paul Foxworthy
>
>
>        devalpatel wrote
>        Thanks for your suggestion Jacques.
>
>        I have reviewed the issues suggest by you. The issue https://issues.apache.org/jira/browse/OFBIZ-3299f   contains the 
> ModelService.java modification, which currently not available in the stable ofBiz 10.04 version.
>
>        After implementing the modification the ModelService class based on issue resolution, I am successfully able use the ofBiz 
> service using SOAP and XML-RPC.
>
>        I would appreciate if you/anyone suggest, how to change a default return type pf  ofBiz java service..i.e. instead of MAP, 
> how to change the wrapper to return string as Return type of ofBiz services.  Because it creates problem while accessing the ofBiz 
> web-service in .Net app as Map  is not supported there.
>
>        Again Thanks a lot.
>
>        Best regards,
>
>        Deval
>      -- 
>      Coherent Software Australia Pty Ltd
>      http://www.cohsoft.com.au/
>
>      Bonsai ERP, the all-inclusive ERP system
>      http://www.bonsaierp.com.au/
>
>
>
>
>    ------------------------------------------------------------------------------ 
>
>      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-tp4580144p4605195.html
>      To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
>      NAML
>  -- 
>  Coherent Software Australia Pty Ltd
>  http://www.cohsoft.com.au/
>
>  Bonsai ERP, the all-inclusive ERP system
>  http://www.bonsaierp.com.au/
>
>
>
>
> ------------------------------------------------------------------------------
>
>  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-tp4580144p4605288.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-tp4580144p4605335.html
> Sent from the OFBiz - User mailing list archive at Nabble.com. 

Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
Hi Paul,

I am commited to ofBiz. And, responsible for the integration betweeb ofBiz and .Net application.

I just had made successful call from .Net to the ofBiz service.

But, when my ofBiz service sends  the service call to .Net back,  the .Net receives the response as void. And, the result is null at .Net side.

In short, Now the (.Net[as web client] --> ofBiz[as webservice server])communication occurs, but as a result the .Net receives null value eventhough successful return of ofBiz call.

One thing.... my ofBiz webservice method is searchHelloPerson().

But, after generatting the client stub in .Net I am getting below method :
void CallsearchHelloPerson(ref map)         instead of Map searchHelloPerson(ref map)

void CallsearchHelloPersonAsync(map)        instead of Map searchHelloPersonAsync(map)

Thats why I can not get the result as return value.

Thanks,

Deval

  ----- Original Message ----- 
  From: Paul Foxworthy [via OFBiz] 
  To: devalpatel 
  Sent: Thursday, May 03, 2012 12:43 PM
  Subject: Re: how to use ofBiz service in .Net application?


  Hi Deval, 

  Assuming you're committed to .NET, I strongly recommend you use WCF. It's a fraction more complicated than just using a Web Service, and vastly more flexible. You could think of this issue as one example of that. 

  Cheers 

  Paul Foxworthy 


    devalpatel wrote
    Hi Paul, 

    Thanks for your help. 

    We have .Net web site project. We are not using WCF. 

    We have tried using the Add Web reference of ofBiz service in .Net. But it gives XML generation error. 

    So, is there any other option to call ofBiz service successfully in c# .Net web application. 

    Thanks, 

    Deval 

      ----- Original Message ----- 
      From: Paul Foxworthy [via OFBiz] 
      To: devalpatel 
      Sent: Thursday, May 03, 2012 11:28 AM 
      Subject: Re: how to use ofBiz service in .Net application? 


      Hi Deval, 

      .NET WCF can receive a Map from a SOAP service. In .NET terms it's a Dictionary. 

      There's a nice discussion at http://www.request-response.com/blog/PermaLink,guid,ff5fab81-affb-4b2b-aa67-c80bdfc86cbd.aspx

      Cheers 

      Paul Foxworthy 


        devalpatel wrote 
        Thanks for your suggestion Jacques. 

        I have reviewed the issues suggest by you. The issue https://issues.apache.org/jira/browse/OFBIZ-3299f   contains the ModelService.java modification, which currently not available in the stable ofBiz 10.04 version. 

        After implementing the modification the ModelService class based on issue resolution, I am successfully able use the ofBiz service using SOAP and XML-RPC. 

        I would appreciate if you/anyone suggest, how to change a default return type pf  ofBiz java service..i.e. instead of MAP, how to change the wrapper to return string as Return type of ofBiz services.  Because it creates problem while accessing the ofBiz web-service in .Net app as Map  is not supported there. 

        Again Thanks a lot. 

        Best regards, 

        Deval 
      -- 
      Coherent Software Australia Pty Ltd 
      http://www.cohsoft.com.au/

      Bonsai ERP, the all-inclusive ERP system 
      http://www.bonsaierp.com.au/




    ------------------------------------------------------------------------------ 

      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-tp4580144p4605195.html  
      To unsubscribe from Re: how to use ofBiz service in .Net application?, click here. 
      NAML 
  -- 
  Coherent Software Australia Pty Ltd 
  http://www.cohsoft.com.au/

  Bonsai ERP, the all-inclusive ERP system 
  http://www.bonsaierp.com.au/




------------------------------------------------------------------------------

  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-tp4580144p4605288.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-tp4580144p4605335.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by Paul Foxworthy <pa...@cohsoft.com.au>.
Hi Deval,

Assuming you're committed to .NET, I strongly recommend you use WCF. It's a
fraction more complicated than just using a Web Service, and vastly more
flexible. You could think of this issue as one example of that.

Cheers

Paul Foxworthy


devalpatel wrote
> 
> Hi Paul,
> 
> Thanks for your help.
> 
> We have .Net web site project. We are not using WCF. 
> 
> We have tried using the Add Web reference of ofBiz service in .Net. But it
> gives XML generation error.
> 
> So, is there any other option to call ofBiz service successfully in c#
> .Net web application.
> 
> Thanks,
> 
> Deval
> 
>   ----- Original Message ----- 
>   From: Paul Foxworthy [via OFBiz] 
>   To: devalpatel 
>   Sent: Thursday, May 03, 2012 11:28 AM
>   Subject: Re: how to use ofBiz service in .Net application?
> 
> 
>   Hi Deval, 
> 
>   .NET WCF can receive a Map from a SOAP service. In .NET terms it's a
> Dictionary. 
> 
>   There's a nice discussion at
> http://www.request-response.com/blog/PermaLink,guid,ff5fab81-affb-4b2b-aa67-c80bdfc86cbd.aspx
> 
>   Cheers 
> 
>   Paul Foxworthy 
> 
> 
>     devalpatel wrote
>     Thanks for your suggestion Jacques. 
> 
>     I have reviewed the issues suggest by you. The issue
> https://issues.apache.org/jira/browse/OFBIZ-3299f   contains the
> ModelService.java modification, which currently not available in the
> stable ofBiz 10.04 version. 
> 
>     After implementing the modification the ModelService class based on
> issue resolution, I am successfully able use the ofBiz service using SOAP
> and XML-RPC. 
> 
>     I would appreciate if you/anyone suggest, how to change a default
> return type pf  ofBiz java service..i.e. instead of MAP, how to change the
> wrapper to return string as Return type of ofBiz services.  Because it
> creates problem while accessing the ofBiz web-service in .Net app as Map 
> is not supported there. 
> 
>     Again Thanks a lot. 
> 
>     Best regards, 
> 
>     Deval 
>   -- 
>   Coherent Software Australia Pty Ltd 
>   http://www.cohsoft.com.au/
> 
>   Bonsai ERP, the all-inclusive ERP system 
>   http://www.bonsaierp.com.au/
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> 
>   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-tp4580144p4605195.html 
>   To unsubscribe from Re: how to use ofBiz service in .Net application?,
> click here.
>   NAML
> 


-----
--
Coherent Software Australia Pty Ltd
http://www.cohsoft.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-tp4580144p4605288.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: how to use ofBiz service in .Net application?

Posted by devalpatel <de...@netweb.biz>.
Hi Paul,

Thanks for your help.

We have .Net web site project. We are not using WCF. 

We have tried using the Add Web reference of ofBiz service in .Net. But it gives XML generation error.

So, is there any other option to call ofBiz service successfully in c# .Net web application.

Thanks,

Deval

  ----- Original Message ----- 
  From: Paul Foxworthy [via OFBiz] 
  To: devalpatel 
  Sent: Thursday, May 03, 2012 11:28 AM
  Subject: Re: how to use ofBiz service in .Net application?


  Hi Deval, 

  .NET WCF can receive a Map from a SOAP service. In .NET terms it's a Dictionary. 

  There's a nice discussion at http://www.request-response.com/blog/PermaLink,guid,ff5fab81-affb-4b2b-aa67-c80bdfc86cbd.aspx

  Cheers 

  Paul Foxworthy 


    devalpatel wrote
    Thanks for your suggestion Jacques. 

    I have reviewed the issues suggest by you. The issue https://issues.apache.org/jira/browse/OFBIZ-3299f   contains the ModelService.java modification, which currently not available in the stable ofBiz 10.04 version. 

    After implementing the modification the ModelService class based on issue resolution, I am successfully able use the ofBiz service using SOAP and XML-RPC. 

    I would appreciate if you/anyone suggest, how to change a default return type pf  ofBiz java service..i.e. instead of MAP, how to change the wrapper to return string as Return type of ofBiz services.  Because it creates problem while accessing the ofBiz web-service in .Net app as Map  is not supported there. 

    Again Thanks a lot. 

    Best regards, 

    Deval 
  -- 
  Coherent Software Australia Pty Ltd 
  http://www.cohsoft.com.au/

  Bonsai ERP, the all-inclusive ERP system 
  http://www.bonsaierp.com.au/




------------------------------------------------------------------------------

  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-tp4580144p4605195.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-tp4580144p4605247.html
Sent from the OFBiz - User mailing list archive at Nabble.com.