Administrator
|
Please use rather user ML for such questions, I will try to answer you there, in order to share with others...
You can subscribe here http://cwiki.apache.org/confluence/display/OFBADMIN/Mailing+Lists Thanks Jacques From: <[hidden email]> > Hi, > > I am new to this forum and ofBiz. I have reviewed the forums and most of the queries are answered by you. > > I have to use ofBiz catalog and inventory in other .net application. I am little successful in calling .net service in ofBiz. > But, I am not able to use ofBiz service in .Net application. The client stub generated in .Net app for the ofBiz service wsdl are > not proper. And, also facing the problem related ofBiz service return type Map in .net app. > > Please suggest me the proper way of using ofBiz services in .Net application. > > Thanks in advance. > > Regards, > > Deval |
Thanks Jacques ..
I have subscribed to mailing list. I would appreciate if i can get suggestion/help/ guide in using the ofBiz services in .Net. Thanks. |
Administrator
|
OK, I must say 1st I never worked with OFBiz AND a .net app and did not work with .net since 2005...
I guess you know how to export an OFBiz service and used export attribute to generate the WSDLs I have no solution to offer you, but you might be interested by https://issues.apache.org/jira/browse/OFBIZ-4245 https://issues.apache.org/jira/browse/OFBIZ-3299 There have been other issues with .net, but AFAIK all of them have been fixed... Maybe (but at 5% I' say) https://issues.apache.org/jira/browse/OFBIZ-743 https://issues.apache.org/jira/browse/OFBIZ-3405 HTH Jacques From: "devalpatel" <[hidden email]> > Thanks Jacques .. > > I have subscribed to mailing list. > > I would appreciate if i can get suggestion/help/ guide in using the ofBiz > services in .Net. > > Thanks. > > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4580280.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
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 |
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
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
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
|
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
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
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,
|
Administrator
|
Which Release.revision are you using (see bottom of backend pages) ?
Jacques From: "devalpatel" <[hidden email]> > 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. |
Release-revision : release10.04-133252 |
Administrator
|
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" <[hidden email]> > 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. |
Thanks Jacques...
I have taken latest trunk... And I have reviewed the Jira issues. but no success... :( |
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: [hidden email] Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
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.......... |
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
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
In reply to this post by devalpatel
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. > |
This post was updated on .
In reply to this post by Paul Foxworthy
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> <![CDATA[--byteHex--]]></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???? |
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
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
In reply to this post by devalpatel
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
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
In reply to this post by Paul Foxworthy
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
|
Free forum by Nabble | Edit this page |