java - How to solve SAXException: Invalid element in -


i try results webservice in following way.

list result = new vector(); librarysearchrequest request = new librarysearchrequest(querystring); librarysearchserviceporttypeproxy proxy =                                  new librarysearchserviceporttypeproxy(); librarysearchserviceporttype port = proxy.getlibrarysearchserviceporttype(); librarysearchresponse response = port.process(request); librarysearch.soft.book[] books = response.getbooks(); 

when following exception (stacktrace) :

org.xml.sax.saxexception: invalid element in librarysearch.soft.book - book @ org.apache.axis.encoding.ser.beandeserializer.onstartchild(beandeserializer.java:258) @ org.apache.axis.encoding.deserializationcontext.startelement(deserializationcontext.java:1035) @ org.apache.axis.message.sax2eventrecorder.replay(sax2eventrecorder.java:165) @ org.apache.axis.message.messageelement.publishtohandler(messageelement.java:1141) @ org.apache.axis.message.rpcelement.deserialize(rpcelement.java:236) @ org.apache.axis.message.rpcelement.getparams(rpcelement.java:384) @ org.apache.axis.client.call.invoke(call.java:2467) @ org.apache.axis.client.call.invoke(call.java:2366) @ org.apache.axis.client.call.invoke(call.java:1812) @ librarysearch.soft.librarysearchservicesoap11bindingstub.process(librarysearchservicesoap11bindingstub.java:180) @ softarch.portal.db.ws.ws_regulardatabase.findrecords(ws_regulardatabase.java:44) @ softarch.portal.db.test.testwsregulardatabase.main(testwsregulardatabase.java:39)  regular database has caught unexpected exception: ; nested exception is:  org.xml.sax.saxexception: invalid element in librarysearch.soft.book - book 

i read problem caused result returned webservice not matching classes generated wsdl. regenerated webservice client no succes. else problem?

this related bug (axis-2758), unresolved axis 1.x.

this problem can appear if client stub not date server side (the wsdl file). have re-generate it. axistools:wsdl2java.

the best nowadays, provided use @ least java 6, maybe use jax-ws on client side (jax-ws maven plugin). not work old soap services using rpc/encoded... prefer document/literal style.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -