We are moving from Weblogic to Tomcat.
In Weblogic, we used weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask
, with ant, to generate the webservice client jars from WSDLs.
In Tomcat, we are trying to use Axis 1.4 with Maven, to generate the same webservice clients.
One of the webservice calls is responding with the following example:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Tue, 04 Jul 2017 20:35:37 GMT
Connection: close
Content-Length: 898
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body>
<MyRequestResponse xmlns="http://tempuri.org/">
<MyRequestResult>~BLDSQPQP(........)2678700000 000 </MyRequestResult>
</MyRequestResponse>
</s:Body></s:Envelope>
However, we are getting a runtime exception when we invoke/call the webservice client generated by Axis 1.4:
org.xml.sax.SAXParseException; lineNumber: x; columnNumber: y; Character reference "&#
It appears that the Axis' SAX Parser isn't expecting an XML entity with a # after &. Unfortunately, we can't alter the behavior/content of the webservice responses.
Is there any way to resolve this problem on the client side by, for example, disabling the XML validation or make it understand those entities?
Code invoking the client:
service = new BrowserServiceLocator();
service.setEndpointAddress("HttpWebService", webserviceUrl);
IBrowserService myService = (IBrowserService) service.getHttpWebService();
myResponse = myService.myRequest(object, verb, user.getMyUser(), user.getCenter(), inputData);
Note: we are currently not able to update to Axis 2 because we are using RPC-encoded WSDLs.
EDIT - Please see below how Weblogic was handling this character.