Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

I am getting this error"CX_ST_DESERIALIZATION_ERROR" in class "CX_SY_CONVERSION_NO_DATE_TIME" while consuming a webservice from an Oracle system

dsubhash567
Explorer
0 Kudos

Hello Experts,

I am consuming  a webservice from an oracle system and the date format I am receiving is not recognized by the SAP system. I am getting this error message

"Value 19-AUG-13 is not a valid date in accord with the XML format for ABAP". I am getting this error when the techn. type attribute is XSDDATE_D. I have changed this format to XSDDATE_ISO and also to DATS, but when I did this change the service is not even running. Is there any way I can change the techn. type attribute and make the system understand the date format I am receiving?

The date format they are sending me is XSD:DATE.

Please help!

Thanks,

Subhash.

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor

When using the xsd:date, the expectation is the date would be in YYYY-MM-DD, all numeric. Since your date has Month with name, it is causing the issues. You should treat that as STRING and convert the value into Date once you receive the results.

See here for more info asXML - Mapping Additional XML Schema Data Types

Regards,

Naimesh Patel

8 REPLIES 8

naimesh_patel
Active Contributor

When using the xsd:date, the expectation is the date would be in YYYY-MM-DD, all numeric. Since your date has Month with name, it is causing the issues. You should treat that as STRING and convert the value into Date once you receive the results.

See here for more info asXML - Mapping Additional XML Schema Data Types

Regards,

Naimesh Patel

0 Kudos

I tried to change the date parameter, in the structure that is generated by the proxy and it is not letting me change anything there.

Should I ask the service provider to make a change on his end and regenerate the WSDL? Is this the only option we can carry on with?

Thank you for the reply Naimesh, I am a great fan of your blog 'ZEVOLVING' and I do follow your way of coding in OOPS concepts!

Regards,

Subhash.

0 Kudos

You should be able to change the Data type from the Proxy Editor.

  1. Open the service definition in the SE80,
  2. navigate to the Internal View.
  3. Find your field in here.
  4. When you double click, you can change the type of the field in the feld Techn. Type in ABAP Attributes frame.

Glad that you like my work at zevolving. Hope you are able to leverage the ABAP Objects!

Regards,
Naimesh Patel

0 Kudos

I am getting these three options shown in the screen shot below. None of them are working. I don't have an option to define it as CHAR8.

Thanks,

Subhash.

0 Kudos

Can you ask the WSDL provider to use xsd:dateTime or xsd:string?

dellagustin
Advisor
Advisor
0 Kudos

Hello,

It seems to me that your service provider is not respecting its own WSDL/XSD, as 19-AUG-13 is not a valid xsd:Date (XML Schema Date/Time Datatypes).

I think you should ask them to fix it.

As a workaroud, can you edit the WSDL/XSD file and change the type xs:string and then post process the value?

Please let us know how you solve it at the end.

Best Regards,
Guilherme.

dsubhash567
Explorer
0 Kudos

Thank you for the assistance Naimesh and Guilherme!

I asked the service provider to change the date format to XSD:DATETIME and the call is successful now.

Regards,

Subhash.

Wandersonwos
Participant
0 Kudos

In my case it was lack of authorization from the user whose is consume the web service. The server return a message in a diferent format and the SAP show this message to show the lack of autorization. After get the authorization everything works fine.