You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "gerhard presser (JIRA)" <ji...@apache.org> on 2010/06/23 09:15:50 UTC

[jira] Commented: (AXIS2-566) Multiple ServiceClients using the same configurationContext causes NPE

    [ https://issues.apache.org/jira/browse/AXIS2-566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881590#action_12881590 ] 

gerhard presser commented on AXIS2-566:
---------------------------------------

I think this issue should be reopened.
i can confirm this exact behavior on an axis2 1.5.1 installation.

it seems to me, that the problem is, that when using the dynamic service client, both generated AxisServices have the same name.
all other service-invocations (stub, anonservice) use unique ids.

regards,
 gerhard

> Multiple ServiceClients using the same configurationContext causes NPE
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-566
>                 URL: https://issues.apache.org/jira/browse/AXIS2-566
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 0.95
>            Reporter: rnell
>
> This code causes an NPE.  Am I using the API wrong?
> public class MultiServiceClientTest extends TestCase {
>     public MultiServiceClientTest( String name ) {
>         super( name );
>     }
>     public void test() throws Exception {
>         ConfigurationContext configurationContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem( null, null );
>         URL wsdlURL = new URL( "http://localhost:8080/axis2/services/MyService?wsdl" );
>         QName serviceName = new QName( "http://org.apache.axis2/", "MyService" );
>         String portName = "MyServicePortType0";
>         ServiceClient sender1 = new ServiceClient( configurationContext, wsdlURL, serviceName, portName );
>         ServiceClient sender2 = new ServiceClient( configurationContext, wsdlURL, serviceName, portName );
>     }
>     public static void main( String[] args ) {
>         junit.textui.TestRunner.run( new TestSuite( MultiServiceClientTest.class ) );
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org