我正在尝试使用C#反序列化以下XML:
<stix:STIX_Package xmlns:stixVocabs="http://stix.mitre.org/default_vocabularies-1"
xmlns:stixCommon="http://stix.mitre.org/common-1"
xmlns:stix="http://stix.mitre.org/stix-1"
xmlns:indicator="http://stix.mitre.org/Indicator-2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
id="repository:03163c66-23ed-4e7f-8814-be1d08406" version="1.0">
<stix:Indicators>
<stix:Indicator id="repository:9df9af32-3b29-4482-81ac-9c090a44db8c"
xsi:type="indicator:IndicatorType" negate="false" version="2.0">
<indicator:Title>admin on 24th September 2014 - (1) FileObjects</indicator:Title>
<indicator:Type xsi:type="stixVocabs:IndicatorTypeVocab- 1.0">Exfiltration</indicator:Type>
<indicator:Description>Some Ex filtration Happened</indicator:Description>
</stix:Indicator>
<stix:Indicator id="repository:9df9af32-3b29-4482-81ac-9c090a44db8d" xsi:type="indicator:IndicatorType" negate="false" version="2.0">
<indicator:Title>admin on 24th September 2014 - (2) FileObjects</indicator:Title>
<indicator:Type xsi:type="stixVocabs:IndicatorTypeVocab-1.0">Exfiltration</indicator:Type>
<indicator:Description>Some Ex filtration Happened Again</indicator:Description>
</stix:Indicator>
</stix:Indicators>
</stix:STIX_Package>
Run Code Online (Sandbox Code Playgroud)
我的班级结构:
[XmlType(AnonymousType = true, Namespace = "http://stix.mitre.org/stix-1")]
[XmlRoot(Namespace = "http://stix.mitre.org/stix-1", IsNullable = false)]
public class STIX_Package
{
[XmlArrayItemAttribute("Indicator", IsNullable = false)]
public IndicatorType[] Indicators { get; …Run Code Online (Sandbox Code Playgroud) 如果我要更改方法名称和参数的大小写,这是否会对使用asmx或WCF Web服务的客户产生负面影响?
public string getSTRING(int INPUT)
{
return INPUT.ToString();
}
Run Code Online (Sandbox Code Playgroud)
至....
public string GetString(int input)
{
return input.ToString();
}
Run Code Online (Sandbox Code Playgroud)
客户是否需要重新生成其代理对象以使用更改的方法?