cancel
Showing results for 
Search instead for 
Did you mean: 

Localization failed error in web service

Former Member
0 Kudos

Hi

I have created one CAF app service and converted it to a webservice. When I test the service from wsnavigator with incorrect inputs it sends back following SOAP fault message.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >

<SOAP-ENV:Body>

<SOAP-ENV:Fault>

<faultcode>SOAP-ENV:Client</faultcode>

<faultstring><Localization failed: ResourceBundle='com.sap.caf.rt.resources.CAFExceptionResources', ID='Airport with code JKK unknown; Errors occurred', Arguments: []></faultstring>

<detail>

<ns1:getListOfFlights_R_com.sap.caf.rt.exception.ServiceException xmlns:ns1='urn:GetFlightWSWsd/GetFlightWSVi'></ns1:getListOfFlights_R_com.sap.caf.rt.exception.ServiceException>

</detail>

</SOAP-ENV:Fault>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

I am not sure why it is giving Localization failed inside the faultstring tag. Any clue on this? What is required to be done to get the exact msg from backend.

Thanks in advance

Sudip

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

When I test the service with accurate input values it does give the expected result. The error comes only when it is being tested with wrong input values.

Former Member
0 Kudos

you won't get any exact backend msg at all since this is a client error (SOAP-ENV:Client).

this means you didn't make a connection to your backend at all which you can check by looking at your server logs.

Therefore, to find out what your client app means with 'Localization failed' has to be documented within the realm of your client application.

Most probably it didn't mean anything else but:

<i>com.sap.caf.rt.resources.CAFExceptionResources threw an Exception with ID='Airport with code JKK unknown; Errors occurred'. Since you are not running the app in the original language of that ressource bundle but in any other one, the app tried to translate that error to your language but didn't find a proper translation aka localization for that string. Thus, it put the error in comments <-- ... --> and echoed the error in the original language.</i>

anton

sbhutani1
Contributor
0 Kudos

hi,

try to give the correct data and then execute this and see if the same error occurs again or not. I think this is the data issue which you are providing to your webservice.

also here is the elements of fault message

Fault:

This element indicates an error message. It should appear as a body entry and must not appear more than once within a Body element. Normally, the Fault element will appear in a SOAP response message to indicate that there was something wrong with the SOAP request.

Sub elements of Fault:

faultcode (identification of fault)

faultstring (description of fault)

faultactor (identifies who caused this fault)

detail (detail of the error. It is normally an application specific error, that is, it corresponds to user-defined namespace that was used in the body of a SOAP request)

as per my understanding the fault actor is missing in your above message. try to find out the fault actor and i think then you will be able to identify the problem.

Hope this will help you identifying the problem.

Regards

Sumit Bhutani