Hello,
I am trying ofBIZ for evaluation purposes and need to access some web services. I did an installation of the trunk some days ago (revision 1064096), then enabled the updateProduct service (and some others) by setting export="true" in applications/product/servicedef/services.xml - no other customizations done. WSDL and service work. But if I provide an attribute that has type std-Long in the WSDL, I get a conversion error on server side. Eg. the following request payload (taken from SOAPUI, note hte productWeight attribute): <raw><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > <soapenv:Header/> <soapenv:Body> <ns1:updateProduct xmlns:ns1="http://ofbiz.apache.org/service/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><map-Map> <map-Entry><map-Key><std-String value="login.username"/></map-Key><map-Value><std-String value="admin"/></map-Value></map-Entry> <map-Entry><map-Key><std-String value="login.password"/></map-Key><map-Value><std-String value="ofbiz"/></map-Value></map-Entry> <map-Entry><map-Key><std-String value="productWeight"/></map-Key><map-Value><std-Long value="0"/></map-Value></map-Entry> <map-Entry><map-Key><std-String value="productId"/></map-Key><map-Value><std-String value="10009"/></map-Value></map-Entry> </map-Map></ns1:updateProduct> </soapenv:Body> </soapenv:Envelope> </raw> causes this error in ofbiz.log: <raw>2011-02-02 11:40:07,152 (http-0.0.0.0-8080-1) [RequestHandler.java:420:ERROR] Request SOAPService caused an error with the following message: Error calling event: org.ofbiz.webapp.event.EventHandlerException: Type check failed for field [updateProduct.productWeight]; expected type is [java.math.BigDecimal]; actual type is [java.lang.Long] </raw> What can I do to update the productWeight or any other std-Long typed attribute (the same error happens for attribute "weight", no change if I provide other values like "0.0", "17.0", "1e10" etc.)? Thanks, Uwe. |
Administrator
|
Uwe,
You could try to use https://issues.apache.org/jira/browse/OFBIZ-3877 If you do so please report your results to this ML, or even better in the Jira issue itself... Thanks Jacques From: "Uwe Schuster" <[hidden email]> > Hello, > > I am trying ofBIZ for evaluation purposes and need to access some web services. > I did an installation of the trunk some days ago (revision 1064096), then enabled the updateProduct service (and some others) by > setting export="true" in applications/product/servicedef/services.xml - no other customizations done. > WSDL and service work. But if I provide an attribute that has type std-Long in the WSDL, I get a conversion error on server side. > Eg. the following request payload (taken from SOAPUI, note hte productWeight attribute): > <raw><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >> > <soapenv:Header/> > <soapenv:Body> > <ns1:updateProduct xmlns:ns1="http://ofbiz.apache.org/service/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"><map-Map> > <map-Entry><map-Key><std-String > value="login.username"/></map-Key><map-Value><std-String > value="admin"/></map-Value></map-Entry> > <map-Entry><map-Key><std-String > value="login.password"/></map-Key><map-Value><std-String > value="ofbiz"/></map-Value></map-Entry> > <map-Entry><map-Key><std-String > value="productWeight"/></map-Key><map-Value><std-Long > value="0"/></map-Value></map-Entry> > <map-Entry><map-Key><std-String > value="productId"/></map-Key><map-Value><std-String > value="10009"/></map-Value></map-Entry> > </map-Map></ns1:updateProduct> > </soapenv:Body> > </soapenv:Envelope> > </raw> > causes this error in ofbiz.log: > <raw>2011-02-02 11:40:07,152 (http-0.0.0.0-8080-1) [RequestHandler.java:420:ERROR] Request SOAPService caused an error with the > following message: > Error calling event: org.ofbiz.webapp.event.EventHandlerException: Type check failed for field [updateProduct.productWeight]; > expected type is [java.math.BigDecimal]; actual type is [java.lang.Long] > </raw> > What can I do to update the productWeight or any other std-Long typed attribute (the same error happens for attribute "weight", no > change if I provide other values like "0.0", "17.0", "1e10" etc.)? > > Thanks, > Uwe. > > > |
Does this mean that the default web service is broken?
Are there plans to have that fixed or is there an idea how to fix it by myself or will the proposed replacement (Jira https://issues.apache.org/jira/browse/OFBIZ-3877) be the future web service implementation for ofBIZ? If so, when will it be part of the trunk? It seems to me that this requires a lot of manual configuration per service as long as it's a patch only! |
Administrator
|
No, we can't say it's broken. It works well in most cases, notably when calling OFBiz services exported. It seems we have some
problems to call external services http://svn.apache.org/viewvc?rev=1072378&view=rev For https://issues.apache.org/jira/browse/OFBIZ-3877 it will depend on how much effort the community will put on it If I cross issues with a current custom project I will have a serious look. But it depends more on my client than my goodwill... Jacques From: "plm_uwe" <[hidden email]> > Does this mean that the default web service is broken? > Are there plans to have that fixed or is there an idea how to fix it by > myself or will the proposed replacement (Jira > https://issues.apache.org/jira/browse/OFBIZ-3877) be the future web service > implementation for ofBIZ? If so, when will it be part of the trunk? It seems > to me that this requires a lot of manual configuration per service as long > as it's a patch only! > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/updateProduct-WebService-Type-check-failed-for-field-updateProduct-productWeight-expected-type-is-ja-tp3254137p3320806.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Free forum by Nabble | Edit this page |