I'm using wsdl2java generated classes and this code:
MyService f = new MyService();
MyServicePortType type = f.getMyServicePortType();
Each of these calls is taking up to 30 seconds. Why is that?
After hours of googling and tinkering the problem was in how scheme files were referenced: although WSDL and XSD were locally stored there was still some referenced to w3.org that looked like this:
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd" [...
<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd" />
w3.org server was resposing super-slowly hence the slow initialization of my client.
I have changed the reference to local:
<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With