开发者

Axis2 empty array

I recive null insted of empty array on the client side when my POJO axis2 method returns empty array. I understand that the problem is in WSDL.

Is there is any way to configure axis2 to generate valid WSDL? I create axis2 service programmatically:

ConfigurationContext context = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);

Map<String, Mes开发者_运维技巧sageReceiver> mrMap = new HashMap<String, MessageReceiver>();
mrMap.put("http://www.w3.org/ns/wsdl/in-only", RPCInOnlyMessageReceiver.class.newInstance());
mrMap.put("http://www.w3.org/ns/wsdl/in-out",  RPCMessageReceiver.class.newInstance());

AxisService service = AxisService.createService(...);
context.getAxisConfiguration().addService(service);
SimpleHTTPServer server = new SimpleHTTPServer(context, port);

server.start();

And anybody can give example of custom SchemaGenerator for Axis2 Services?

Thanks.


It's too late but let me answer this question. I think you did not create object inside your POJO. You might have just declared its reference. Create an object for it. Then it will show empty instead of null in the response.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜