cancel
Showing results for 
Search instead for 
Did you mean: 

when visit /sap/bc/soap/rfc, 500 error returned

Former Member
0 Kudos

hi

I program a webservices demo by webdynpro. I create that demo to call a abap webservices.

But when i run the webdynpro program. An exception throws Service call exception; nested exception is: java.lang.NullPointerException.

I read the wsdl file generated by R/3. I try to visit "http://<site>:<port>/sap/bc/soap/rfc" in the browser. 500 error returns with no information.

Can i directly visit that URL? I think it will return a soap response page. What's wrong?

thanX

elliot

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Please post the complete wendynpro error stack.

Regards, Anilkumar

Former Member
0 Kudos

Hi Elliot,

I think the link "http://<site>:<port>/sap/bc/soap/rfc" will point to the service not WSDL .

How did you imported the Model in webdynpro ?

Regards, Anilkumar

Former Member
0 Kudos

hi Guru, Anilkumar :

Thank you for your help. I will say it detail.

First I create a rfc function in the se37.

Then I search that function in the WEBSERVICEBROWSER/search.htm. I download the wsdl file and create a webdynpro webservice module. I import that file in to the webservice module and the studio generates the stub code.

In the generated files, I open the file lport1_1.lp. There is the Target Address: http://<website>:<port>/sap/bc/soap/rfc. I think this is the soap:address location. In the other webservices project, I can browse that url in the web browser to verify it. But in this webdynpro webservice project, when i try to browse the Target address the web browser returns 500 internal error. Of course if i run the webdynpro project, Service Exception will be returned.

I think there is sth wrong, but I don't know the reason.

Btw i initialize the webservices node in the wdDoInit() method:

Request_RfcPortType_z_test_ADD req = new request_RfcPortType_z_test_ADD();

wdContext.nodeRequest_RfcPortType_z_YYS_ADD().bind(req);

can you give some advice

thanks

elliot

Former Member
0 Kudos

Hi Elliot,

Thats true.

When you browse with the URL http://<website>:<port>/sap/bc/soap/rfc it always shows 500 error.

But, when you execute your model from webdynpro using same url, it will give result.

So, problem is not due to this.

Check whether your service in SICF transaction is activated or not.

Regards,

Bhavik

Former Member
0 Kudos

hi:

this rfc node is active.

when I call the webservice, the exception is

java.rmi.RemoteException: Service call exception; nested exception is:

java.lang.NullPointerException

at com.test.ws.proxies.RfcBindingStub.z_test_ADD(RfcBindingStub.java:88)

at com.test.ws.proxies.RfcBindingStub.z_test_ADD(RfcBindingStub.java:97)

at com.test.ws.Request_RfcPortType_z_test_ADD.execute(Request_RfcPortType_z_test_ADD.java:91)

at com.test.AbapWSComponentView.onActionSend(AbapWSComponentView.java:181)

at com.test.wdp.InternalAbapWSComponentView.wdInvokeEventHandler(InternalAbapWSComponentView.java:185)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)

at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:101)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:304)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)

at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:252)

I initial the node in the wdInit()

Request_RfcPortType_z_test_ADD req = new Request_RfcPortType_z_test_ADD();

wdContext.nodeRequest_RfcPortType_z_test_ADD().bind(req);

req.setVALUE(1);

try

{

//wdContext.currentRequest_RfcPortType_z_test_ADDElement().modelObject().setVALUE(3);

wdContext.currentRequest_RfcPortType_z_test_ADDElement().modelObject()._setUser("test");

wdContext.currentRequest_RfcPortType_z_test_ADDElement().modelObject()._setPassword("init");

}

catch(Exception e)

{

wdThis.wdGetAPI().getComponent().getMessageManager().reportException(e.getMessage(),false);

}

and in a onActionSend method

wdContext.currentRequest_RfcPortType_z_test_ADDElement().modelObject().setVALUE(3)

wdContext.currentRequest_RfcPortType_z_test_ADDElement().modelObject().execute();

I once deploy a web services project on java WAS and call that from webdynpro. It is successful. But I can't call a abap web services.

Regards

elliot

guru_subramanianb
Active Contributor
0 Kudos

Hi,

Did you initialize your context variable.pls check that.

Regards,

Guru