cancel
Showing results for 
Search instead for 
Did you mean: 

Web Serice -error message-Unaccepted content type ????

04-06-2006 8:55 PM
656 views 9 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi all,

I created a webservice for Function module and when i am passing values in the Web Service i am getting error message ...

An error has occurred. Maybe the request is not accepted by the server:

<b>Unaccepted content type</b> (text/html;charset=utf-8) !

<b>Request:</b>POST /sap/bc/srt/rfc/sap/ZBAMS_WS_EMPLOYEE_UPDATE?sap-client=200 HTTP/1.1

Host: tybl102028.tyb.kpmgbsc.net:8002

Content-Type: text/xml; charset="UTF-8"

Connection: close

Content-Length: 657

SOAPAction: ""

<?xml version="1.0" encoding="UTF-8" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Header><sapsess:Session xmlns:sapsess="http://www.sap.com/webas/630/soap

/features/session/"><enableSession>true</

enableSession></sapsess:Session></SOAP-ENV:Header><SOAP-ENV:Body><ns1:ZbamsEmployeeUpdate xmlns:ns1='urn:sap-com:document:sap:soap:functions:mc-style'><BigDate>2006-04-01</BigDate><EmpId>00000012</EmpId><EndDate>2006-04-24</EndDate><WbsElement></WbsElement></ns1:ZbamsEmployeeUpdate></SOAP-ENV:Body></SOAP-ENV:Envelope>

<b>Response:</b>

HTTP/1.1 500 Internal Server Error

content-type: text/html;charset=utf-8

content-length: 3130

can any one help me whats wrong?

Thanks for ur time.

Murali.

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Likes

how are you testing this? using wsnavigator of j2ee or some external tool

the error says that the system expects the response to be text/xml whereas its text/html

Regards

Raja

Former Member
0 Likes

Hi I am testing this using j2ee.

let me explain more information..

I created BAPI and for that bapi I crated Web Service and, and when I test from BAPI it works fine.. so now I am testing this from web service, after passing values in web service I am checking in debug mode, I have a call transaction statement in my BAPI code... once cursor comes into the call transaction statement it skips executing further statement and coming out from the debugging mode(it happens only when I go to debug from passing values in web service, and I tested call transaction giving values A and N modes), if passing values directly in BAPI then it works fine no issues.

please let me know if any ideas.

Thanks for u r time

Murali.

athavanraja
Active Contributor
0 Likes

you cannot have screen dependant processing in your case.

Regards

Raja

Former Member
0 Likes

Hi Raja,

I didn't get u? can u give more info..

let me give me some more info about my research...

for testing purpose I deleted all the input parameters for my BAPI and declared inside the code .. so that my web service doesn't have any inputs. So even my Web Service don’t have any input fields when I test from the web service it is not working and in debug mode its happening same thing.

thanks

Murali..

athavanraja
Active Contributor
0 Likes

generally http 500 internal server error would create a ABAP dump , check it in txn ST22 to anyalyze the error.

what are you doing with call transaction, are you using call transaction to post a document or are you using call transaction to show a transaction.

in the first case, if for some reason, any gui element is triggered then your webservice will not work. and for the second case, you cannot do this in this scenario.

generally its a good idea to not to use call transaction in RFCs, if possible use a BAPI

Regards

Raja

Former Member
0 Likes

Hi Raja,

Thanks for ur response, I am using call transaction for posting new record if its not exists with that pernr number and if exists i am updatinig with new dates for infotype 27(pa0027) .

I checked in st22 its not creating any dump for this case.

what is the best way to debug web service?

thanks

Murali.

Former Member
0 Likes

Murali,

have you solved this?

Thanks

Former Member
0 Likes

Hi,

No problem not yet solved, I received message that Web Service dont support for call transaction procedure indide BAPI.

I am still working on this issue.

Thanks

Murali

Answers (1)

Answers (1)

Former Member
0 Likes

Hi,

Have look at these demo Program May be Helpfull.

saphtml_demo1

saphtml_events_demo

rsdemo_html_viewer