cancel
Showing results for 
Search instead for 
Did you mean: 

Problems in Instantiating the Model Node

former_member214651
Active Contributor
0 Kudos

Hi All,

I Have a problem with creating the instance of a Model Node which needs an urgent solution, This is the Scenario:

I Have created a WebDynpro Project using NetWeaver CE Environment and Java EE 5.0 where i am using an Adaptive WebService Model. I have successfully created the model using the WSDL files and have also added to the Controller,

But when I try to create an Instance of the Request Node in my controller ie after writing this line:

Request_MI_Nwce007_AS_SOAPReq objReq = null;

objReq = new Request_MI_Nwce007_AS_SOAPReq();

This is the Request Structure from the WSDL - Request_MI_Nwce007_AS_SOAPReq

it gives me an Error saying The constructor Request_MI_Nwce007_AS_SOAPReq() is undefined.

Please let me know the exact problem and also the way to overcome this problem.

Its Quite URGENT!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Points Rewarded for helpful answers.

Regards,

Poojith MV

Accepted Solutions (1)

Accepted Solutions (1)

nikhil_bose
Active Contributor
0 Kudos

Request_MI_Nwce007_AS_SOAPReq objReq = null;

objReq = new Request_MI_Nwce007_AS_SOAPReq();

As you said there may not be an empty contructor. you can open the model class and find out the constructor parameter. It may need the Model Class instance.

obj = new Request_MI_Nwce007_AS_SOAPReq(new Model())

nikhiL

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Poojitha,

If your imported Webservice has any structure like this Request_MI_Nwce007_AS_SOAPReq_Input then instantiate the input structure.

else

Try instantiating along with the package name, for example if your package name is: com.sdn then try this:

"com.sdn.*Request_MI_Nwce007_AS_SOAPReq objReq = null;

objReq = new com.sdn.Request_MI_Nwce007_AS_SOAPReq();

Hope this solves your problem.

Thanks n Regards,

Jhansi Miryala

former_member214651
Active Contributor
0 Kudos

Hi Jhansi,

Thanks for the quick reply. I Tried doing the way which u have replied, but its still giving me the same error.

Is there a special way of creating an object in NWCE or in Java EE???

Regards,

Poojith MV