xm bobd988 wrote:
Hi,
I am trying to use a web service to receive message and inoke to another web services. But I kept getting the below errors when invoking the web services,
WSDLException: faultCode=CONFIGURATION_ERROR: Problem instantiating factory implementation.: org.apache.wsif.wsdl.WSIFWSDLFactoryImpl: java.lang.ClassNotFoundException: org.apache.wsif.wsdl.WSIFWSDLFactoryImpl
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:854)
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at javax.wsdl.factory.WSDLFactory.newInstance(Unknown Source)
the problem seems to be with WSDL4J - make sure that you do not have multiple copies of WSDL4J jar files in tomcat/** and in your webapps/WEB-INF/lib/* - also try different versions of WSDL4J.
HTH,
alek
at MessageHandler.testWsif(MessageHandler.java:61) ...
Here is my code for invoking the webservice ,
...
WSIFPluggableProviders.overrideDefaultProvider("http://schemas.xmlsoap.org/wsdl/soap/", new WSIFDynamicProvider_ApacheAxis());
System.out.println("Reading WSDL document from '" + wsdlLocation + "'");
try
{
//org.apache.wsif.wsdl.WSIFWSDLFactoryImpl ();
WSDLFactory factory = WSDLFactory.newInstance("org.apache.wsif.wsdl.WSIFWSDLFactoryImpl");
Definition def = factory.newDefinition(); // test line
Definition def1 = org.apache.wsif.util.WSIFUtils.readWSDL(null, wsdlLocation); //test
} catch(WSDLException e) { e.printStackTrace(); } System.out.println("Preparing WSIF dynamic invocation"); ...
However, with the same wsdl4j.jar and wsif. jar, the above code works fine from a non-servlet client, but once put into servlet( in my case, web service API), the error happened.
I use the Jbuilder 2005, Tomcat 5.0.28, wsif.jar ( from 2.0 release), wsdl4j.jar
Have anyone experienced this issue before, how to solve this? Thanks.
Bob
-- The best way to predict the future is to invent it - Alan Kay
