Web service client (applet) keeps asking for “/META-INF/services/javax.xml.ws.spi.provider”
-
20-02-2021 - |
Pergunta
Consider the following snippet running in an applet insdie a browser:
WebServiceClient s = MyWS_Service.class.getAnnotation(WebServiceClient.class);
String servicePath = pathName;
String wsdlLocation = "http//host.dns.name:80/MYWSAPP/MyWS?wsdl";
MyWS_Service service = null;
WebServiceClient s = MyWSService.class.getAnnotation(WebServiceClient.class);
try{
wsdlURL = new URL(wsdlLocation);
service = new myWSService(wsdlURL, new QName(s.targetNamespace(), s.name()));
myWS = service.getMyWSSOAP();
}catch (MalformedURLException e){
System.out.println ("unable to create wsdlURL = "+wsdlLocation);
}
If myWS was created without problems, I use it to make calls to the web service methods (the web service uses Metro and runs on Tomcat).
Everything works fine except that I noticed the following two irritants:
- It takes a long time to execute the chunk of code quoted above
- Network traces show the client sends HTTP GET requests for: /MYWSAPP/META-INF/services/javax.xml.ws.spi.provider and /MYWSAPP/META-INF/services/javax.xml.stream.XMLInputFactory.
The reply for these GET requests is HTTP/1.1 404 Not Found.
Any thoughts on how to prevent these needless HTTP GET requests? Also is it reasonable that the code above takes roughly 3 seconds to execute while the actual web service calls take less than 100ms to execute?
Solução
Pass this parameter to the applet:
codebase_lookup = false
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow