开发者

Axis generates all classes but not Axis2?

I've generated stubs using following commands

Axis: java org.apache.axis.wsdl.WSDL2Java CrmDiscoveryServiceWsdl.xml : Generates all classes

Axis2 : wsdl2java.bat -u -uri CrmDiscoveryServiceWsdl.xml : Generates only a few classes.

       Pattern I observed is, in the wsdl:types section, it has created classes for the <s:element> types but not  <s:complexTypes>. I don't get why.开发者_如何学Go I have to use those complexType elements to consume webservice.

I've also tried -pn, -ap options, thought they might work, but ports had nothing to with this. I understood after I did it.

Note: I could generate all with Axis2 when I use -ss -g options, which also generates server side. Obviously, it's a workaround and I don't need atleast some of them.

Please help.

Thanks.


I noticed this too with something a little different. Generating stubs with Axis2 1.6 against Great Plains 10, some types were missing. They were all xsd complex types which derived from other types in the schema definition. This only caused an error when parsing a response that included these missing types. The error was thrown from the ExtensionMapper.

After generating with the '-g' option, more types (including these missing derived types) are included in the ExtensionMapper and the problem is fixed.

I'm not sure what generating server side code has to do with properly parsing and generating the adb beans, but it works now.

There's also bug in the Apache Axis JIRA which mentions differing beans when using -g vs not using it: http://issues.apache.org/jira/browse/AXIS2-3988

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜