cancel
Showing results for 
Search instead for 
Did you mean: 

How to run RFC code in webservice.

Former Member
0 Kudos

Hello Experts,

I am new to webservices but I have done lot of work in Java Webdynpro with RFC.

I have created a model using webservice and I am trying to use this application. I have written following code in wdInit() of my application -

<b>Request_ZAccessoryModel_zhressStationRequisition input = new Request_ZAccessoryModel_zhressStationRequisition();</b>

wdContext.nodeRequest_ZAccessoryModel_zhressStationRequisition().bind(input);

try{

wdContext.currentParametersElement().setServiceid("12");

wdContext.currentParametersElement().setYusertype("EMP");

wdContext.currentParametersElement().setYymod("DIS");

wdContext.currentRequest_ZAccessoryModel_zhressStationRequisitionElement().modelObject().execute();

}

catch(Exception e)

{

}

but this is showing me error at that line where I am initializing the Request Node with "New" keyword (line in bold).

Please correct me if I am missing something or If I am going to wrong way.

Thanx in Advance

Roshan Gupta

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

that is Syntax error , please look for Java expert. You should go to other forum board.

Former Member
0 Kudos

hi,

how about telling us <b>which error</b> is thrown?

judging from what i see, I'd think it's a simple java error, i.e. the object not existing, the constructor being wrong, whatever but not necessarily an error having anything to do with webservices.

anton

Former Member
0 Kudos

Dear All,

I am getting following error while deploying the webservice based webdynpro application -

The initial exception that caused the request to fail, was:

java.lang.Error: Unresolved compilation problems: Syntax error on keyword "return"; "Identifier" expected Syntax error on keyword "return"; "Identifier", "new" expected Syntax error on keyword "return"; "Identifier", "new" expected Syntax error on keyword "return"; "Identifier", "new" expected

at com.test.webdervice.model.p1.ComplexType_ZhressStationRequisitionResponse.<init>(ComplexType_ZhressStationRequisitionResponse.java:361)

at com.test.webdervice.model.Response_ZAccessoryModel_zhressStationRequisition.<init>(Response_ZAccessoryModel_zhressStationRequisition.java:56)

at com.test.webdervice.model.Request_ZAccessoryModel_zhressStationRequisition.<init>(Request_ZAccessoryModel_zhressStationRequisition.java:106)

at com.test.webdervice.TestWebServiceAppComponentView.wdDoInit(TestWebServiceAppComponentView.java:99)

at com.test.webdervice.wdp.InternalTestWebServiceAppComponentView.wdDoInit(InternalTestWebServiceAppComponentView.java:1260)

Please help me to sortout this error.

Thanks in advance,

Roshan Gupta

nilayghosh
Active Participant
0 Kudos

Hi Roshan,

Please refer to the Adaptive Web Service tutorials (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/webcontent/uuid/5b77db42-0a01-0010-d7ba-8aa375593dd3 [original link is broken]) and trouble webservice model tutorials ( [original link is broken]) guide and you will get your answer.

Regards