1
I’m having an error that I can’t figure out what it is. I took the SWDL from Nfeauthorization (homologation) and used the Axis2 to generate the classes. I solved some import and lib problems, but there are still some problems.
Code snippet where error:
org.apache.axiom.om.OMDataSource dataSource =new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME);
return factory.createOMElement(dataSource,MY_QNAME);
First line error:
Cannot instantiate the type Adbdatasource.
Error of the second line:
The method createOMElement(Qname, Omcontainer) in the type Omfactory is not applicable for the Arguments (Omdatasource, Qname).
If I made the generation according to the WSDL, it shouldn’t have that kind of problem, right?
By the error described, maybe it is the arguments passed to the method that are not correct (I can’t be sure), but there is no way to know if you do not tell where the variables come from
this
,MY_QNAME
anddataSource
and of type they are, post an example of the code that can be reproduced to generate the error.– Guilherme Nascimento
@I ended up solving it in a strange way. When I had the bug, I had generated the classes with the newer version of Axis, then I took a slightly older version, generated them again, and ended up solving. I have no idea why it decided being that the generation was made the same way, only with an older version.
– Cristiano Bombazar
Good that solved, could inform something more about the generated classes? Mainly put in all question if possible (do not need to be your project, preferably try to reproduce your problem in a simpler version) and add your question (editing it) and provide the Axi version and or any other tool you used to generate.
– Guilherme Nascimento