cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP 500 error testing web service

Former Member
0 Kudos

Hi guys.

I have an ECC 6.0 SP 5 and cannot update to last patch.

I think to have some customizing problem about ws publishing.

I produced & published some standard ws, but one of mine too, by wizard in SE37.

Trying they via generic tools like soapUI they work fine.

Trying to test via SICF I have an error 500 in Internet Explorer.

Testing, conversely, the ping service works fine.

Could someone help me?

Thanks, Monica

Accepted Solutions (1)

Accepted Solutions (1)

nicola_martella2
Participant
0 Kudos

Monica, the problem could be a wrong parameter passed to the WS / BAPI (I had the same issue).

I try to tell you as I discovered it.

Since the WS call worked fine via soapUI but failed via my C# program, I setted in ABAP a remote breakpoint; I ran the call via soapUI and snapshotted all the inboun parameters; then I make the same running my C# program. Matching the snapshot, I discovered a wrong date format in a parameter passed from my C# program.

I Hope this help.

Nicola

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Monica,

Like Olivier also said...

You can't use the Test Service option in SICF to test the webservice because SOAP protocol expects a POST method. The Test Service facility is SICF sends a GET method to the webservice hence the HTTP 500 error message, it's normal.

Use a webservice test tool like WS Navigator or SoapUI to test the webservice.

Regards, Trevor

Former Member
0 Kudos

Hi boys, very thanks for your support.

The problem is that I have an HTTP 500 during the programmatically call too from my C#.

Since the standard function (BAPI_ALM_ORDERHEAD_GET_LIST) has a little complicated structure, could be that I wrong something during the call; probably the way to initialize the class instances or the array or... I don't know.

Could you help me, please

public Collection getItems( string department, DateTime dateFrom ) { 
OrderData cls = new OrderData(); 
PMOrderList.ZBAPI_ALM_ORDERHEAD_GET_LIST orders = new PMOrderList.ZBAPI_ALM_ORDERHEAD_GET_LISTClient(); 

// first filter criteria 
PMOrderList.AlmOrderListheadRanges rngDep = new PMOrderList.AlmOrderListheadRanges(); 
rngDep.FieldName = "OPTIONS_FOR_MAIN_WORKCENTER"; 
rngDep.Sign = "I"; 
rngDep.Option = "EQ"; 
rngDep.LowValue = department; 

// second filter criteria 
PMOrderList.AlmOrderListheadRanges rngFrom = new PMOrderList.AlmOrderListheadRanges(); 
rngFrom.FieldName = "SHOW_DOCS_WITH_FROM_DATE"; 
rngFrom.Sign = "I"; 
rngFrom.Option = "EQ"; 
rngFrom.LowValue = "20100101"; 

PMOrderList.AlmListNavigationIn dparms = new PMOrderList.AlmListNavigationIn(); 
PMOrderList.AlmOrderListheadResult[] etResult = { new PMOrderList.AlmOrderListheadResult() }; 
PMOrderList.AlmOrderListheadRanges[] etTempl = { new PMOrderList.AlmOrderListheadRanges() }; 
PMOrderList.AlmOrderListheadRanges[] itRanges = { rngDep, rngFrom }; // <<<===== passing filters criteria 

PMOrderList.Bapiret2[] ret = { new PMOrderList.Bapiret2() }; 

// setting all request parameters 
PMOrderList.AlmOrderheadGetListRequest req = new PMOrderList.AlmOrderheadGetListRequest( dparms, etResult, etTempl, itRanges, ret );
PMOrderList.AlmOrderheadGetListResponse ordersList = null; try { 
// invoke the ws with its parameters 
ordersList = orders.AlmOrderheadGetList( req ); 
} catch( System.ServiceModel.ProtocolException ex ) { 
string _err = ex.Message; // <<<===== d___d Error <<<<<====== 
return null; 
} 

Collection coll = new Collection(); 
foreach( PMOrderList.AlmOrderListheadResult ord in ordersList.EtResult ) { 
coll.add( getItem( ord.Orderid.ToString() ) ); 
} 
return coll;
}

Thanks in advance. Monica

Edited by: Monica Bellucci on Mar 30, 2010 11:11 AM

Former Member
0 Kudos

Hi Monica,

If it's a deserialization error you're getting back it normally has something to do with the request content (format of data being passed). Also, refer to the thread below for another possibility:

[;

Regards, Trevor

Former Member
0 Kudos

Hi,

What is the problem ? Your tests seem fine to me.

>Trying to test via SICF I have an error 500 in Internet Explorer.

You cannot test a web service with a web browser. The error 500 is perfectly normal.

Regards,

Olivier