I have a jar file which houses client code to connect to our infrastructure webservices that was initially created using axis’ wsdl2java. I converted the guts of the connectivity this week to use the extract from wsimport. When running on my local Windows XP tomcat using java6_18 I have no issues and all runs perfectly. I have now moved my code to our development AIX instance and have lost total web service communication while receiving the following error:
XML reader error: javax.xml.stream.XMLStreamException:
The root element is required in a well-formed document
On AIX we are running java6_64.
I am assuming it is the AIX java libs not being compatible with the Sun provided java runtime libs however I am at a total loss at the moment as to how to resolve.
Can anybody shed some light on why I am receiving this exception?
I don’t like answering my own question but thought recording the answer could be beneficial to others…
After digging a bit, the resolution was simply the format of the wsdl url. With axis, I specified the wsdl URL as the path to the webservice. For JAX-WS, it requires path to the service+”?wsdl” (the actual wsdl to load at runtime).
The above error was generated since the “axis” path did not result in the wsdl to pull but rather a blank resultset. Once I added the “?wsdl” all works fine.