Hello all,
I am not advanced in web services, so bear with me.

I am trying to create a client to call some functions through
webservices. The web services in ofbiz use maps. For example, I am
trying to obtain a product by id. The web service response includes the
product as "eeval-Product". In the wsdl for this service,  I can see:

<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>

So here's what I did. I downloaded the wsdl and added appended the 
entity name to this element. Then re-generated the client stub.

Now when a response is retireved it's obtained correctely, but the
binding doesn't work. For example, eeval-Product is a Map, but it's
null. Attributtes from this element are not bound, they are skipped by
the binding generated with wsdl2java with jaxb binding.

What would be the best way/tool to include the attributes from
"eeval-Product" into the map ?

Here's an exmaple response.

<?xml version="1.0"?>
<findProductByIdResponse xmlns="http://ofbiz.apache.org/service/";>
    <map-Map>
        <map-Entry>
            <map-Key><std-String value="responseMessage"/></map-Key>
            <map-Value><std-String value="success"/></map-Value>
        </map-Entry>
        <map-Entry>
            <map-Key><std-String value="product"/></map-Key>
            <map-Value>
                <eeval-Product 
                    billOfMaterialLevel="0" createdByUserLogin="admin" 
createdDate="2004-08-20 12:49:13.418"
                    createdStamp="2011-02-24 09:30:52.287" 
createdTxStamp="2011-02-24 09:30:52.186" description="Create your own pizza"
                    internalName="Pizza" isVariant="N" isVirtual="N" 
largeImageUrl="/images/products/PIZZA/large.png"
                    lastUpdatedStamp="2011-03-06 21:09:44.134" 
lastUpdatedTxStamp="2011-03-06 21:09:43.527" productId="PIZZA"
                    productName="Gold Pizza" productTypeId="AGGREGATED" 
smallImageUrl="/images/products/PIZZA/small.png"/>
            </map-Value>
        </map-Entry>
        <map-Entry>
            <map-Key><std-String value="productsList"/></map-Key>
            <map-Value><col-Collection/></map-Value>
        </map-Entry>
    </map-Map>
</findProductByIdResponse>


Any advice ?




Reply via email to