You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Deepal Jayasinghe (JIRA)" <ji...@apache.org> on 2006/04/26 11:25:04 UTC
[jira] Resolved: (AXIS2-610) error when creating two times
ServiceClient without a service
[ http://issues.apache.org/jira/browse/AXIS2-610?page=all ]
Deepal Jayasinghe resolved AXIS2-610:
-------------------------------------
Fix Version: 0.96
Resolution: Fixed
> error when creating two times ServiceClient without a service
> -------------------------------------------------------------
>
> Key: AXIS2-610
> URL: http://issues.apache.org/jira/browse/AXIS2-610
> Project: Apache Axis 2.0 (Axis2)
> Type: Bug
> Components: client-api
> Versions: 0.95
> Reporter: Andreas Bobek
> Assignee: Deepal Jayasinghe
> Fix For: 0.96
>
> Follow exception is thrown when creating a ServiceClient with a null service two times with the same ConfigurationContext:
> ServiceClient client1 = new ServiceClient(confCtxt, null); // ok .
> ServiceClient client2 = new ServiceClient(confCtxt, null); // throws Exception
> java.lang.NullPointerException
> at org.apache.axis2.context.ServiceGroupContext.getServiceContext(ServiceGroupContext.java:59)
> at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:97)
> Up to now I see two possibilities to avoid this exception:
> 1.) Reusing the client.
> 2.) Check whether an anonymous service was already created and let the ServiceClient create one (if missed):
> ServiceClient client = null;
> AxisService anonymousService =
> confCtxt.getAxisConfiguration().getService(ServiceClient.ANON_SERVICE);
> if(anonymousService == null){
> client = new ServiceClient(confCtxt, null); } else{
> client = new ServiceClient(confCtxt, anonymousService); }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira