JonHrs Absent Member.
Absent Member.

Unable to get attachment data value from SM web service SOAP response

I'm developing an app in C# which is consuming the Service Manager (v7) SOAP API (using .Net v3.5). I created a service reference in Visual Studio which has created a proxy client and associated entity classes. All of this works fine, except for when retrieving attachment data.


When I look at the data response from the API using fiddler, I can indeed see the attachment binary data is being returned by the SM API after the SOAP envelope is closed off which is correct, but the proxy entities leave the "value" field (which is a byte array) as NULL. So its ignoring the fact that there is data there and/or not bothering to deserialize it. All of the other fields like contentType, len, name, type etc are populated fine, everything you would expect except for Value.


I'm using basicHttpBinding, MessageEncoding=MTOM and TransferMode=Buffered. I cannot use TransferMode=Streamed as I am passing in credentials and I get an exception thrown.


The SOAP response I captured using fiddler can be see here.


What's going on that would prevent the value field from being populated?

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.