cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing ABAP Web Service

Former Member
0 Kudos

Our environment:

ECC 6.0

Netweaver 7.0 Enhancement Pack 3

Java Stack is NOT INSTALLED

I have created an ABAP web service and exposed it. I am able to:

> start SOAManager

> click Business Administration tab

> click Web Service Administration

> Find the 'Internal Name'

> Apply selection

> Click on the link 'Open WSDL document for selected binding'

> the wsdl document for the web service is presented in a browser

I have created a Web reference with .Net 2008 to the wsdl document. Which gives me all of the wsdl information such as parameters and results. However, when I launch the web service in my .Net code all I receive is 'Operation Timed out'. I have taken the extra steps of not requiring log in information and supplying the logon informaiton in the code and as default information. My basis person has turned tracing on and does not see where the web service is being launched.

I have a 3rd party developer that has called a web service from .Net without the Java Stack. So it will work.

THE QUESTION IS: what am I missing? Or How do I figure out what I am missing?

FYI, I can also

>go to SICF

> right click on default host/sap/bc/srt/wsdl

> click test service

> the follow xml is displayed


- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
- <soap:Body>
- <soap:Fault>
  <faultcode>soap:Server</faultcode> 
  <faultstring>No service definition, interface name, or binding specified</faultstring> 
- <detail xmlns:slibfault="http://xml.sap.com/2005/11/esi/slib/fault/">
  <slibfault:timestamp>Tue, 29 Mar 2011 15:21:02 GMT</slibfault:timestamp> 
- <slibfault:exception>
  <slibfault:text>No service definition, interface name, or binding specified</slibfault:text> 
  <slibfault:position program="CL_SRT_WSP_WSDL_HANDLER_HTTP==CP" include="CL_SRT_WSP_WSDL_HANDLER_HTTP==CM002" line="346" /> 
  </slibfault:exception>
  </detail>
  </soap:Fault>
  </soap:Body>
  </soap:Envelope>

It appears from the development AND the basis information that everything is set up correctly. I am missing something.

One thing further. I have tried to run a web service with SOAPUI and not getting a result from that either.

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Did you do the runtime configuration in SOAMANAGER, eg, create the service and the endpoint ?

If you look into SICF do you see the URL for your web service under /default_host/sap/bc/srt/rfc/sap ?

Regards,

Olivier

Former Member
0 Kudos

Yes I do see the web service in /default_host/sap/bc/srt/rfc/sap.

I right clicked on it and then clicked on 'Test Service' and the following was the result.


This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

For more information about HTTP errors, see Help.

I think this should work, correct?

Former Member
0 Kudos

Hi,

I guess you missed the steps where you should create service and endpoint (or you forgot to mention)..

> Find the 'Internal Name'

> Apply selection

Missed: --> Create Service under tab "Configuration"

Missed: --> Give any arbitary name to service and endpoint

Missed: --> complete other configuration setting if required (i.e. HTTP-Basic authorization etc.)

Missed: --> Save settings

> Click on the link 'Open WSDL document for selected binding'

From your error message it seems service is not configured correctly.

Regards,

Gourav

Former Member
0 Kudos

<faultstring>No service definition, interface name, or binding specified</faultstring>

This error message gives you an idea of what is wrong & like the previous responses have suggested, you are missing some configuration steps. The other important thing to remember is that you shouldn't be testing your web service from TCode SICF, it wasn't designed for that purpose.

If you have a Java stack (SAP PI, SAP Portal etc...) somewhere else in your landscape, use WS Navigator to test your web service

- OR -

Use other tools like SoapUI, XMLSpy or anything else that you can use to test web services.

There are many resources here on SDN that detail how you can do this test using these tools.

Best Regards, Trevor

Former Member
0 Kudos

Gourav,

I am sure that I have missed something but I am not missing what you indicated. I was able to follow this article exactly all the way to page 8 which starts the testing process. The steps on pages 5-6 talk about creating the service and authentication. I did those steps. Check out the article:

[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b043ef4e-e8d1-2c10-7d88-8077b209ce55?quicklink=index&overridelayout=true]

Trevor,

As indicated in the original post to this thread. JAVA STACK IS NOT INSTALLED.

I do have SoapUI installed and working. I have been able to successfully test an asp.net web service via SoapUI. However, I have not been successful with the ABAP Web Service. It is failing the initial default assertion of 'SOAP Response'. I followed this demonstration(passed the WSDL that I obtained from SOAMANAGER/Web Service Admin/Open WSDL document for selected binding)

[http://www.soapui.org/Getting-Started/your-first-soapui-project.html]

When I do that the assertion fails with this information displayed on the assertions tab:

SOAP Response - FAILED

-> null/empty response

And on the message bar of the window at the very bottom it says:

Error getting response; javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

I am obviously still not sure what the issue is.

SoapUI can see the wsdl definition but can not get a valid SOAP response. I feel confident once we are able to determine how to make that happen then we will have this resolved.

Question: Should I use the url that I obtained from SOAMANAGER/Web Service Admin/Open WSDL document for selected binding? Or should there be a different url to use?

When in SoapUI, I double click on the Test Request and can see this url at the top of the window

https://server:8000/a/sap/bc/srt/rfc/sap/zws_test/100/zws_test/zws_test which I can also see in SAP - SICF.

Originally where the 8000 was there was an "n", which I replaced with 8000 to get around a "host paramert is null" error message.

After replacing with the 8000, I would get this error message in the request log:

Error getting response; javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

Then I edited the url once again and removed the https and replaced it with http and received this message in the request log:

+ response time: 8018ms (1898 bytes) +

In the assertions tab there is

line -1: error: Unexpected character encountered: 'w'

line 6: Unexpected character encountered: 'w'

Edited by: Loren Oldham on Mar 30, 2011 2:20 PM

Edited by: Loren Oldham on Mar 30, 2011 2:33 PM

Former Member
0 Kudos

Hi Loren,

JAVA STACK IS NOT INSTALLED

I did read this in your original post but my crystal ball didn't quite clear up the abiguity, i.e. you're just working off a single stack ECC environment for your test case but by some slim chance you could have a Java stack somewhere in your entire SAP landscape. I'll adjust the ball to cater for some heuristics in the future but in the meanwhile I'll add possible suggestions for all possible scenarios

You might want to follow through the steps detailed on pages 5 to 7 again. Once you're successful with pages 5 & 6 you should see what appears in the screen dump at the top of page 7 'Service: 1 / Endpoints: 1'. Your URL should also look very similar to what is shown towards the middle of page 7.

Also, what did you use as your 'authentication settings' (top of page 6 screen dump)?

Regards, Trevor

Edited by: Trevor Naidoo on Mar 30, 2011 2:55 PM

Former Member
0 Kudos

Sorry, some translation and emotion gets lost or mis-interpreted in email and did not intend to sound so harsh. I appreciate your response and willingness to assist.

I did follow the steps exactly as outlined in the document pages 5 & 6 so my "Authentication Settings" are set the same as his. In the HTTP Authentication block 'Username/Password' is checked.

I did notice that the 'Transport Guarantee Type' is set to HTTPS. Maybe this should be changed.

The url that I am utilizing is extremely similar to the one in the middle of page 7. Here it is

http://servername:8000/sap/bc/srt/wsdl/bndg_E045B27ADC896AF19713001EC9DB1CC3/wsdl11/allinone/ws_poli...

Former Member
0 Kudos

Hi Loren,

These settings will vary on how you want to setup your web service/s & what type of security restrictions you want to enable.

I would suggest, if you just want to do a simple Abap web service test:

- Under 'Transport Guarantee' --> 'Communication Security' - Select the 'None' radio button.

- Under 'Authentication Settings' --> 'Authentication Method' --> 'Transport Channel Authentication', select the User ID/Password checkbox. The 'Authentication Method' block to the right of that should refelct as HTTPBasic. You shouldn't see HTTPS anywhere in the endpoint configuration.

Then from SoapUI, you can use basic auth with a valid user + pass to the Abap back-end to test your web service.

Best Regards, Trevor

Former Member
0 Kudos

Under 'Transport Guarantee' / Transport Guarantee Type, I changed the radio button from HTTPS to 'No Transport Guarantee' and supplied my logon credentials for the SOAPUI request and VOILA!!!! It worked.

i now have to figure out how to call it from asp.net but this at least shows me that the SAP plumbing is working.

THANKS Trevor!!!

Answers (0)