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.


Reply via email to