Hi Brecht,

If you just drop the jar (with the axis2.xml) into the classpath it should work.

Thanks,
Ruchith

On 8/8/06, Brecht Yperman <[EMAIL PROTECTED]> wrote:
This works, thanks.

But what will happen once I put my classes in a jar-file?
I think there will have to be a path, starting from the jar-file, to
com/invenso/xb/isp/xbconnect/wscall/axis2.xml. However, I would like to
include the file in the jar-file (well, I think).

Brecht

-----Original Message-----
From: Ruchith Fernando [mailto:[EMAIL PROTECTED]
Sent: dinsdag 8 augustus 2006 11:54
To: axis-user@ws.apache.org
Subject: Re: [Axis2] NullPointerException when loading services (using
Rampart)

Hi Brecht,

Can you please try using :
ConfigurationContext configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(rep
ository,axis2xml);

Instead of :

> String axis2xml =
> "com/invenso/xb/isp/xbconnect/wscall/axis2.xml";
>
> String repository = "com/invenso/xb/isp/xbconnect/wscall/";
>
> URL configFileUrl =
> ClassLoader.getSystemClassLoader().getResource(axis2xml);
>
> URL repositoryUrl =
> ClassLoader.getSystemClassLoader().getResource(repository);
>
> URLBasedAxisConfigurator configurator = new
> URLBasedAxisConfigurator(configFileUrl, repositoryUrl);
>
> ConfigurationContext cc =
> ConfigurationContextFactory.createConfigurationContext(configurator);

Thanks,
Ruchith


On 8/7/06, Brecht Yperman <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi,
>
>
>
> I use the following bit of code to call a webservice. I am now trying
to
> engage the rampart module.
>
>
>
> String axis2xml =
> "com/invenso/xb/isp/xbconnect/wscall/axis2.xml";
>
> String repository = "com/invenso/xb/isp/xbconnect/wscall/";
>
> URL configFileUrl =
> ClassLoader.getSystemClassLoader().getResource(axis2xml);
>
> URL repositoryUrl =
> ClassLoader.getSystemClassLoader().getResource(repository);
>
> URLBasedAxisConfigurator configurator = new
> URLBasedAxisConfigurator(configFileUrl, repositoryUrl);
>
> ConfigurationContext cc =
> ConfigurationContextFactory.createConfigurationContext(configurator);
>
>
>
> Definition serviceDefinition = getWsdlDefinition(wsdl);
>
> ServiceClient client = new ServiceClient(cc,  serviceDefinition,
> serviceName, port);
>
> client.getOptions().setProperty(MessageContextConstants.CHUNKED, new
> Boolean(true));
>
>
>
> The call to ConfigurationContextFactory throws an exception:
>
>
>
> getBundle(org.apache.axis2,org.apache.axis2.i18n,resource,null,...)
>
> loadBundle: Ignoring MissingResourceException: Can't find bundle for
base
> name org.apache.axis2.resource, locale en_US
>
> Created org.apache.axis2.i18n.resource, linked to parent null
>
> getBundle(org.apache.axis2,org.apache.axis2.i18n,resource,null,...)
>
> org.apache.axis2.i18n.resource::handleGetObject(addingnewmodule)
>
> adding new module
>
> [ERROR] Something went wrong
>
> java.lang.NullPointerException
>
>       at
>
org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngi
ne.java:91)
>
>       at
>
org.apache.axis2.deployment.URLBasedAxisConfigurator.loadServices(URLBas
edAxisConfigurator.java:102)
>
>       at
>
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
Context(ConfigurationContextFactory.java:42)
>
>       at
>
com.invenso.xb.isp.xbconnect.wscall.WebserviceCallWorker.run(WebserviceC
allWorker.java:113)
>
>       [...]
>
>       at java.lang.Thread.run(Unknown Source)
>
>
>
> repoListener is null, because it is only initialized in
> loadRepository(String repoDir), not in loadRepostoryFromURL, which is
used
> when using the URLBasedAxisConfigurator.
>
>
>
> The repository directory contains one directory, modules, containing a
file
> modules.list (with in that file only "rampart-1.0.mar") and a file
> rampart-1.0.mar.
>
>
>
> My axis2.xml file contains the following bit:
>
> <axisconfig name="AxisJava2.0">
>
>     <module ref="rampart-1.0" />
>
>
>
> I guess this is a bug, but I can't find a way around it...
>
>
>
> Any help is very much appreciated,
>
> Thanks,
>
> Brecht
>
> Invenso - The "Integration Software" specialists.
>  _____________________________________________
>
> Brecht Yperman
>  Development team
>
>  Direct: +32 (0)3 780 30 05
>  Email: [EMAIL PROTECTED]
>
> INVENSO bvba
>  Industriepark-West 75
>  9100 Sint-Niklaas
>  Belgium - Europe
>
>  Phone: +32 (0)3 780 30 02
>  Fax: +32 (0)3 780 30 03
>  Email: [EMAIL PROTECTED]
>  Website: www.invenso.com
>
> "E-mail disclaimer: This e-mail, and any attachments thereto, is
intended
> only for use by the addressee(s) named herein and may contain legally
> privileged and/or confidential information. If you are not the
intended
> recipient, please note that any review, dissemination, disclosure,
> alteration, printing, copying or transmission of this e-mail and/or
any file
> transmitted with it, is strictly prohibited and may be unlawful. If
you have
> received this e-mail by mistake, please immediately notify the sender
and
> permanently delete the original as well as any copy of any e-mail and
any
> printout thereof."
>
>


--
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to