Hi Tony,

This looks like a similar problem to one you had some time ago where the
thread contextClassLoader is null. You could try adding the following
before you get the WSIFPort:

    if (Thread.currentThread().getContextClassLoader() == null) {
        ClassLoader cl = getClass().getClassLoader();
        Thread.currentThread().setContextClassLoader(cl);
    }

If you try this and it does resolve the problem, but you think WSIF should
be handling this for you could you reply to wsif-dev so it can be
discussed?

Thanks,

       ...ant

Anthony Elder
[EMAIL PROTECTED]
Web Services Development
IBM UK Laboratories,  Hursley Park
(+44) 01962 818320, x248320, MP208.


"Chen, Tony" <[EMAIL PROTECTED]> on 26/03/2003 18:11:26

Please respond to [EMAIL PROTECTED]

To:    [EMAIL PROTECTED]
cc:
Subject:    Exception when axis.jar is included



Hi,

I do the following to get a port so that I can call createOperation() on
it.

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service = factory.getService(definition, service,
portType);
        WSIFPort port = service.getPort();


Everything has been working fine until I had to add axis.jar to the
classpath for other functionality. Now I am getting this warning and then
an
exception:

[WARN] wsif - -WSIF0006W: Multiple WSIFProvider found supporting the same
namespace URI 'http://schemas.xmlsoap.org/wsdl/soap/'. Found
('org.apache.wsif.providers.soap.apachesoap.WSIFDynamicProvider_ApacheSOAP,
org.apache.wsif.providers.soap.apacheaxis.WSIFDynamicProvider_ApacheAxis')

java.lang.NullPointerException
 at org.apache.wsif.util.WSIFProperties$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.wsif.util.WSIFProperties.getProperty(Unknown Source)
 at
org.apache.wsif.util.WSIFPluggableProviders.isDefaultProvider(Unknown
Source)
 at
org.apache.wsif.util.WSIFPluggableProviders.chooseProvider(Unknown Source)
 at org.apache.wsif.util.WSIFPluggableProviders.getProvider(Unknown
Source)
 at
org.apache.wsif.base.WSIFServiceImpl.createDynamicWSIFPort(Unknown Source)
 at org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)
 at org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)

Before I dig any deeper I wonder if anyone has seen this before and if
there
is a known solultion? Thanks.

Tony



Reply via email to