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”
After digging a little deeper (SRT_UTIL) and checking the logs in the “Web Service Utilities: Error Log”, I found the following information:
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:
Inspecting the “SubmissionTime” and “CompletionTime” Technical Type, I noticed that they has been set to the following: XSDDATETIME_Z
From the dictionary, you can see the type corresponds to:
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
So for each of the external view fields in the proxy defined as XSDDATETIME_Z, I switched them to:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |