cancel
Showing results for 
Search instead for 
Did you mean: 

Error in generated code after importing WSDL model

Former Member
0 Kudos

hi all,

i encountered errors when creating custom controller linked to a webservice model.

-webservice model is taken from <i>http://www.xmethods.net/sd/2001/TemperatureService.wsdl </i>

-On applying template for custom controller, i got following errors in code generated.

--method <i>wdDoInit</i> implementation is missing complete path of the model element.

<i> //@@begin wdDoInit()

//$$begin Service Controller(-308771993)

wdContext.nodeRequest().bind(new <b>Request_TemperaturePortType_getTemp</b>());

//$$end

</i>

---The above was fixed by giving complete path of model element.

<i>(new <b>com.vkoganti.weather.xmweather.</b>Request_TemperaturePortType_getTemp()</i>

-And also model invoke method <i>executeRequest</i> has compilation errors.

<i> public void executeRequest( ) {

//@@begin executeRequest()

//$$begin Service Controller(190476535)

try{

wdContext.currentRequestElement().modelObject().execute();

wdContext.nodeResponse().invalidate();

} catch(Exception ce) {

<b>// MessageManager manager = (MessageManager)wdThis.wdGetAPI().getComponent().getMessageManager();</b>

<b>// manager.reportException(ce.getLocalizedMessage(), false);</b>

}

//$$end</i>

-class <i>MessageManger</i> is not resolved. i commented exception handling if you notice.

i dont know if i missed something. thanks in advance for any guidance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Venu,

the imports are not inserted in the controller code by the code generator. After applying the template, open the implementation of the controller code or click on one of the errors in the task view to navigate to the implementation and organize the imports. This is done by selecting <b>Source->Organize Imports</b> in the context menu of the code editor or by typing <b>SHIFT-CTRL-O</b>.

Hope that helps.

Regards

Stefan