cancel
Showing results for 
Search instead for 
Did you mean: 

Call SAP Web Service via HTML Page

Former Member
0 Kudos

<html>

Dear All,

i try to call a SAP Web Service via a html-page with a form an method POST, action="http://server:8000/sap/bc/srt/rfc/sap/z_text/100/z_text/z_text" and to input-fields.

But i get this anwser:

- <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">

<soap-env:Header />

- <soap-env:Body>

- <soap-env:Fault>

<faultcode>soap-env:Server</faultcode>

<faultstring xml:lang="en">SRT: Unsupported xstream found: ("HTTP Code 200 : OK")</faultstring>

- <detail>

- <ns:SystemFault xmlns:ns="http://www.sap.com/webas/710/soap/runtime/abap/fault/system/">

<Host>undefined</Host>

<Component>COREMSG</Component>

- <ChainedException>

<Exception_Name>CX_SOAP_CORE</Exception_Name>

<Exception_Text>SRT: Unsupported xstream found: ("HTTP Code 200 : OK")</Exception_Text>

</ChainedException>

</ns:SystemFault>

</detail>

</soap-env:Fault>

</soap-env:Body>

</soap-env:Envelope>

Have anyone an idea?

Thanks

Daniel

Edited by: Daniel Meyer on Sep 22, 2009 6:29 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

If you are calling from a WebPage, you can use HTTP post instead of WebService.

You will have adapterless communication which is better.

Regards,

Vikas

Former Member
0 Kudos

Hi Vikas,

thank you for answer.

I have htmk-page where i send with http post, but i get "Unsupported xstream found: ("HTTP Code 200 : OK")".

Regards,

Daniel

Former Member
0 Kudos

Hi Daniel,

You can see the sample HTTP post HTML code here.

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/66dadc6e-0a01-0010-9ea9-bb6d8ca48cc8

Please note that you need to pass valid XML payload else you will get error.

Regards,

Vikas

Former Member
0 Kudos

Hi Oliver,

we don`t have an J2EE Stack. So we could not use the Service Navigator for testing.

I reed it on some google sites, that you can call Web Services with a form i an html side. So have look at this idea, because of missing J2EE Stack.

Regards

Daniel

Former Member
0 Kudos

Hi,

Ofcourse you can call webservice from browser.

See this example: http://www.w3schools.com/webservices/ws_use.asp

You need to take care of xml handling (may be conversion from plain text to xml and vice versa). You can see http call in WSNavigator (from any system) in "http call" tab.

Regards,

Gourav

Former Member
0 Kudos

Hi,

>Ofcourse you can call webservice from browser.

Sorry, you don't call a webservice from a browser : you can use a browser as the human interface to the SOAP client you are using. A web brower does not talk SOAP natively !

Regards,

Olivier

Former Member
0 Kudos

When I said you can call webservice from browser it always means to use either by "form" or any other type of user interface.

There are several examples designed in ASP.Net or Java script which tell you how to do http-post to webservice. Even in WSNavigator you can see http-post call.

Regards,

Gourav

Former Member
0 Kudos

Thanks for answer,

i send plain text, because i don`t know how to send soap format via html form...

Daniel

Former Member
0 Kudos

Hi,

You need a SOAP client to call a web service. A web browser alone is not able to call web services....

The interface of a SOAP client may be on a web page displayed in a web browser (like the SAP Web service Navigator which runs on a SAP J2EE stack).

With a web browser you can only display the web service WSDL.

Regards,

Olivier

Former Member
0 Kudos

What did you send? is it in soap format or plain text?