yd yd
Posts: 2
Nickname: yd
Registered: Oct, 2009
|
|
Re: How to solve org.xml.sax.SAXException: Invalid element in problem
|
Posted: Oct 19, 2009 5:35 AM
|
|
> I had exactly this same error and fixed it as follows; > > In the generated file for the web service request object, > e.g Event, there an attribute typeDesc and a static > body follows initialising typeDesc. > > For each element added to the typeDesc, there are lines; > elemField.setFieldName("eventID"); > elemField.setXmlName(new > Name(new javax.xml.namespace.QName("", "EventID")); > > make sure the string literals are of the same case, i.e > both should be "EventID" > > hope it helps someone
Thanks !!! That helped ... So the issue is because of :-
This part is either not mentioned or screwed up :
elemField.setFieldName("eventID"); elemField.setXmlName(new javax.xml.namespace.QName("", "EventID"));
Normally this should not pose a problem if you are using Axis's wsdl2java tool. Be completely sure that the xsd files that the wsdl references has the properties correctly set(eventID in the above line)..
This solved my problem
|
|