Skip to Content
Author's profile photo Philip Johnston

Tracing Serialization / Deserialization Issues in SAP Web Services

I thought this might be worth documenting to maybe save someone’s time getting a resolution to web service Serialization / Deserialization issues.  Recently I was asked to consume a 3rd party WSDL. This meant I had to create a consumer proxy in SAP for the abap to use at runtime.  Everything went well with the proxy generation (at least no errors were reported).  However, once I tried to consume the proxy, an exception was thrown when executing the call to the web service method. 

The exception is seen below:

“SOAP:1,027 SRT: Serialization / Deserialization Failed”

/wp-content/uploads/2013/10/p_299963.jpg

After digging a little deeper (SRT_UTIL) and checking the logs in the “Web Service Utilities: Error Log”, I found the following information:

/wp-content/uploads/2013/10/p_299963.jpg

This led me to take a look at the WSDL and found that the date format of these fields looks as follows:

<SubmissionTime>2001-12-31T12:00:00</SubmissionTime>

<CompletionTime>2001-12-31T12:00:00</CompletionTime>

Obviously SAP was having an issue with the date format.  I then went to the Proxy Service and took at look at the external view:

/wp-content/uploads/2013/10/p_299963.jpg

Inspecting the “SubmissionTime” and “CompletionTime” Technical Type, I noticed that they has been set to the following:   XSDDATETIME_Z

/wp-content/uploads/2013/10/p_299963.jpg

From the dictionary, you can see the type corresponds to:

/wp-content/uploads/2013/10/p_299963.jpg

Since the data being returned from the web service does not conform to a decimal format, a change was needed.  We needed something that could handle this format:

<SubmissionTime>2001-12-31T12:00:00</SubmissionTime>

<CompletionTime>2001-12-31T12:00:00</CompletionTime>

There is another format which is more appropriate:  XSDDATETIME_ISO

/wp-content/uploads/2013/10/p_299963.jpg

So for each of the external view fields in the proxy defined as XSDDATETIME_Z, I switched them to:

/wp-content/uploads/2013/10/p_299963.jpg

After the change, everything worked like a charm..

Bottom line; don’t expect the proxy generator to get everything correct.  It’s pretty good, but it’s not perfect.

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Great Blog! Thanks for writing this. I am having the exact same issue. When you say go to the proxy service and look at the external view, what transaction is this. Are you doing this is PI? You response will be super helpful!

      Author's profile photo Philip Johnston
      Philip Johnston
      Blog Post Author

      You can look at the external view by using transaction SE80 and viewing the enterprise service.

      Author's profile photo Christopher Solomon
      Christopher Solomon

      Wow! Great write up on hunting and solving that one!!! Keep them coming!

      Author's profile photo Former Member
      Former Member

      Hi. I have the next error: System expected a value for the type g

      How can i solve it? i tried the solution of this post, but nothing change.

      Author's profile photo Former Member
      Former Member

      thankyou so much Philip Johnston    for your solution..  really appreciate your effort to share the solution .

      however we have an issue which we are not sure how to go ahead,  we have consumed an opentext webservice , but the structure of the metadata does not have the values field due to which we are unable to get the data.. is there a way to add an extra field to the system created proxy structure

      Author's profile photo Nic Teunckens
      Nic Teunckens

      Excellent BlogPost, even helped me now in 2017 ...

      I feel this could have made it to a "How To ..." SAP-KBA, would be way easier to get this type of useful information to a broader community instead of just 'stumbling upon to it'.

      Thanks anyway

      Nic T.

      Author's profile photo Lokesh Naik
      Lokesh Naik

      Hi, I am looking to read HTTP header data (Cookie information which is sent by external system) and store and send in subsequent request in a consumer WS integration.

       

      Is this possible? how can I achieve it?

      Author's profile photo Kavita Mane
      Kavita Mane

      HI Philip Johnston ,

       

      I am getting the same error where i get the error as

      Error when calling SOAP Runtime functions: SRT: Serialization / Deserialization failed                       Element 'sys_id' missing           

      where SYS_ID field is maintained as string . and i am not able to change the type . can you please explain in detail, I am new to this thing  .

      Thanks in advance,

       

      Author's profile photo Technical Infrastructure Team
      Technical Infrastructure Team

      You're a life saver man! Thank you!