CA APM SoapUI error while trying to deserialize
search cancel

CA APM SoapUI error while trying to deserialize

book

Article ID: 113545

calendar_today

Updated On:

Products

CA IT Asset Manager CA Software Asset Manager (CA SAM) ASSET PORTFOLIO MGMT- SERVER CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

trying to search location based on location name (with % operator) Xml from SoapUI and experiencing the following error in the XML output:  

<faultstring xml:lang="en-US">

The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://www.ca.com/ITAM/APIService:searchDefinition. The InnerException message was 'Error in line 29 position 43. Element 'http://schemas.datacontract.org/2004/07/CA/ITAM/Service/Core:ITAMObject' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/CA/ITAM/Service/DataModel/BAAAAAA:location'.

The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver if you are using DataContractSerializer or add the type corresponding to 'location' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to the serializer.'.  Please see InnerException for more details.</faultstring>

Example where such code could present an error:
https://docops.ca.com/ca-service-management/14-1/en/release-information/known-issues/ca-it-asset-manager/ca-asset-portfolio-management-web-services-known-issues

Environment

CA Service Management 14.1, 17.1
CA APM 14.1, 17.1

Cause

There is a line in the SoapUI code under the ITAMHeader that reads as:
xmlns:ns3="http://schemas.datacontract.org/2004/07/CA/ITAM/Service/DataModel/BAAAAAA"

However, the endpoint value in the request reads as:
http://UAPM-SERVER:99/APIService/Gen/BAAAAAC/B/Service.svc/basic

The bold portions of the above two entries must match in order to keep the mapping consistent

Resolution

In the given example, one needs to modify the above line to match the URL that was being used to interface with APM, ie:

xmlns:ns3="http://schemas.datacontract.org/2004/07/CA/ITAM/Service/DataModel/BAAAAAC"

Web Service functionality should work correctly