Hi OfBiz Gurus...
OfBiz does a great job of auto-generating WSDL definitions for exported/externalized services. However, the resulting XML is difficult for me to map on my client end. Instead of doing back-flips on the client - I'd like to simplify the SOAP Service response XML being generated by OfBiz. Can anyone here - direct me to examples, tutorials etc. that describe the following ? I've searched and cannot find references to what I would think is a common scenario.... For example - if I've defined a service like this: <service name="tenedaServiceTest" engine="java" location="com.teneda.ofbiz.testing.TestService" invoke="testMethod" auth="false" use-transaction="false" export="true"> <description> Test Service </description> <attribute name="testAttrib1String" type="String" mode="IN" optional="false"/> <attribute name="testAttrib2String" type="String" mode="IN" optional="false"/> <attribute name="testOutputResults" type="List" mode="OUT" optional="false"/> </service> I'd like the auto-generated WSDL to support/define - a response XML that takes this approach: With WSDL - That Supports/Defines this... <MyResponseObject> <testOutputResults> <MyAttribute1>StringValue</MyAttribute1> <MyAttribute2>123</MyAttribute2> </testOutputResults> </MyResponseObject> Instead of List of Maps or List of Serialized objects - which the framework seems to default to: My past attempts have yielded these responses - that I find very cumbersome to work with on the client side.... Any thoughts, suggestions - would be much appreciated ! Thanks Frank <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body><tenedaServiceTestResponse xmlns="http://ofbiz.apache.org/service/"> <map-Map> <map-Entry> <map-Key> <std-String value="responseMessage"></std-String> </map-Key> <map-Value> <std-String value="success"></std-String> </map-Value> </map-Entry> <map-Entry> <map-Key> <std-String value="testOutputResults"></std-String> </map-Key> <map-Value> <col-ArrayList> <cus-obj>aced000573720029636f6d2e74656e6564612e6f6662697a2e74657374696e672e54657374526573756c744f626a65637400000000000000010200034c00097465737444617461317400124c6a6176612f6c616e672f537472696e673b4c000974657374446174613271007e00014c000974657374446174613371007e00017870740001317400013274000133</cus-obj> <cus-obj>aced000573720029636f6d2e74656e6564612e6f6662697a2e74657374696e672e54657374526573756c744f626a65637400000000000000010200034c00097465737444617461317400124c6a6176612f6c616e672f537472696e673b4c000974657374446174613271007e00014c000974657374446174613371007e00017870740001617400016274000163</cus-obj> <cus-obj>aced000573720029636f6d2e74656e6564612e6f6662697a2e74657374696e672e54657374526573756c744f626a65637400000000000000010200034c00097465737444617461317400124c6a6176612f6c616e672f537472696e673b4c000974657374446174613271007e00014c000974657374446174613371007e00017870740001417400014274000143</cus-obj> </col-ArrayList> </map-Value> </map-Entry> <map-Entry> <map-Key> <std-String value="testOutputResults2"></std-String> </map-Key> <map-Value> <col-ArrayList> <map-HashMap> <map-Entry> <map-Key> <std-String value="class"></std-String> </map-Key> <map-Value> <std-String value="class com.teneda.ofbiz.testing.TestResultObject"></std-String> </map-Value> </map-Entry> <map-Entry> <map-Key> <std-String value="testData2"></std-String> </map-Key> <map-Value> <std-String value="2"></std-String> </map-Value> </map-Entry> </map-HashMap> </col-ArrayList> </map-Value> </map-Entry> </map-Map> </tenedaServiceTestResponse> </soapenv:Body></soapenv:Envelope> |
Anyone ?
Nobody encounter this same requirement ? Hope to hear some thoughts from group... Thanks F |
Free forum by Nabble | Edit this page |