You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Hans Bakker <ma...@antwebsystems.com> on 2009/11/20 07:20:12 UTC

upgrading axis v1 to v2 in OFbiz

To solve the problem of complex parameters as list and map in
webservices, we are working on upgrading apache Axis to version 2 in
ofbiz

We would appreciate advice or co-operation in this area.

anybody working on that?

-- 
Antwebsystems.com: Quality OFBiz services for competitive rates


Re: upgrading axis v1 to v2 in OFbiz

Posted by Chatree Srichart <ch...@gmail.com>.
Hi Jacques

Thank you for your attention. Now I try to see AXIS1 source code how it
work.
I think AXIS2 may use JAX-WS for this task.

Re: upgrading axis v1 to v2 in OFbiz

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Chatree,

Sorry I did not find even enough time to read your message, hopefully tomorrow. Anyway not sure I have any solutions...

Jacques

From: "Chatree Srichart" <ch...@gmail.com>
>I try to send parameters as Map object but I not work. I try to use
> OMElement as message and use BeanUtil as converter.
> 
> This is code example.
> 
> ...
> parameters.add(new QName("parameterName"));
> parameters.add(bos.toByteArray()); // byte code of Map object
> 
> XMLStreamReader xr = new ADBXMLStreamReaderImpl(opName,
> parameters.toArray(), null, typeTable, false);
>            StreamWrapper parser = new StreamWrapper(xr);
>            StAXOMBuilder stAXOMBuilder =
>                    OMXMLBuilderFactory.createStAXOMBuilder(
>                            OMAbstractFactory.getSOAP11Factory(), parser);
>            OMElement payload = stAXOMBuilder.getDocumentElement();
>            OMElement message = (OMElement) payload.getChildrenWithName(new
> QName("message")).next();
>            Object objMap = BeanUtil.deserialize(LinkedHashMap.class,
> message, objectSupplier, null);
>            OMElement clientResult = client.sendReceive(payload);
> ....
> 
> I convert Map object to byte code and convert it to xml message. But when I
> deserialize message to map, it returned empty Map object.
> 
> Are there any one have other solution for solve it?
>


Re: upgrading axis v1 to v2 in OFbiz

Posted by Chatree Srichart <ch...@gmail.com>.
I try to send parameters as Map object but I not work. I try to use
OMElement as message and use BeanUtil as converter.

This is code example.

...
parameters.add(new QName("parameterName"));
parameters.add(bos.toByteArray()); // byte code of Map object

XMLStreamReader xr = new ADBXMLStreamReaderImpl(opName,
parameters.toArray(), null, typeTable, false);
            StreamWrapper parser = new StreamWrapper(xr);
            StAXOMBuilder stAXOMBuilder =
                    OMXMLBuilderFactory.createStAXOMBuilder(
                            OMAbstractFactory.getSOAP11Factory(), parser);
            OMElement payload = stAXOMBuilder.getDocumentElement();
            OMElement message = (OMElement) payload.getChildrenWithName(new
QName("message")).next();
            Object objMap = BeanUtil.deserialize(LinkedHashMap.class,
message, objectSupplier, null);
            OMElement clientResult = client.sendReceive(payload);
....

I convert Map object to byte code and convert it to xml message. But when I
deserialize message to map, it returned empty Map object.

Are there any one have other solution for solve it?

Re: upgrading axis v1 to v2 in OFbiz

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Hans,

Yes I worked on that and even opened a Jira 
https://issues.apache.org/jira/browse/OFBIZ-2448

>From the top of my head I don't recall the exact status, I will have a look...

Jacques

From: "Hans Bakker" <ma...@antwebsystems.com>
> To solve the problem of complex parameters as list and map in
> webservices, we are working on upgrading apache Axis to version 2 in
> ofbiz
> 
> We would appreciate advice or co-operation in this area.
> 
> anybody working on that?
> 
> -- 
> Antwebsystems.com: Quality OFBiz services for competitive rates
>