Search code examples
javaapache-axis

How to create configurationContext in axis2?


I am using Eclipse, I created stubs using AXis2, I need to create object in my Java class, so I need to create a ConfigurationContext to call created object from stubs, I have constructor as below:

public ZLOGIN_USERStub(org.apache.axis2.context.ConfigurationContext configurationContext) 
throws org.apache.axis2.AxisFault {
     this(configurationContext,"http://smesrv1.spartaconsulting.com:8008/sap/bc/srt/rfc/sap/zlogin_user/100/zlogin_user/zlogin_user" );           
}

For this I need to pass configurationContext, I don't know how to do this. Could you help me with this?


Solution

  • Was that function generated for you by Axis2? You can pass null for the configuration context, and Axis2 will use a context that it creates on its own. In fact, if you'll examine the other stub constructors, you should find a one-argument constructor which takes a String target endpoint. That constructor uses null for the configuration context.