お世話になります。現在、C#(.NET)にて、Garoon APIの「BulletinGetTopics」メソッドを使用し、パラメータに指定したカテゴリに所属する掲示板を配列で取得しようとしています。
⇒開発環境「Visual Studio 2013 C#(.NET)」 ガルーンのバージョン「3.7.3」
しかし、親ノードにあたる「category」の「category_id」属性は問題なく取得できるのですが、子ノード「topic」の「id」属性が取得できません。
SOAP構造
<category category_id=“取得した掲示板のカテゴリID”>
<topic id=“カテゴリに内包される掲示板のid” />
・
・
</topic>
</category>
実行側の処理
var bulletin = new info.cybozu.onlinedemo2.BulletinBinding();
String[] args = new String[1];
args[0] = “3”;
info.cybozu.onlinedemo2.TopicsList[] ret = bulletin.BulletinGetTopics(args);
//「id」の結果は「3」となり、「category_id」属性は問題なく取得できる
String id = ret[0].category_id;
//「topics」の結果はnullとなり、topicの内容が配列で取得できない
info.cybozu.onlinedemo2.TopicsListTopic[] topics = ret[0].topic;
なお、この症状はBulletinGetTopicsのみに関わらず、他の一部のAPIでも同様の問題が発生しています。
⇒CabinetGetFileInfoのfiles配列など
Visual Studioで自動生成された「TopicsList」クラス、「TopicsListTopic」クラスに問題があると考え色々と調べてみたのですが、生成された内容で問題ないように見受けられ、どうしても原因を突き止める事ができませんでした。
どなたか解決法をご存知の方、ご教授頂ければ幸いです。
************************** APIからの取得結果 **************************
<?xml version=“1.0” encoding=“utf-8”?>
<soap:Envelope
xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:bulletin=“http://wsdl.cybozu.co.jp/bulletin/2008”>
soap:Header<vendor>Cybozu</vendor><product>Garoon</product><product_type>1</product_type><version>3.7.5</version><apiversion>1.3.1</apiversion>/soap:Header
soap:Bodybulletin:BulletinGetTopicsResponse
<returns xmlns=“”>
<category category_id=“3”>
<topic id=“19” />
<topic id=“18” />
<topic id=“16” />
</category>
</returns>
/bulletin:BulletinGetTopicsResponse
/soap:Body
/soap:Envelope
//************************** プロキシクラス側の処理 **************************
namespace WindowsFormsApplication1.info.cybozu.onlinedemo2 {
[System.Web.Services.Protocols.SoapHeaderAttribute(“action”, Direction = SoapHeaderDirection.In),
System.Web.Services.Protocols.SoapHeaderAttribute(“security”, Direction = SoapHeaderDirection.In),
System.Web.Services.Protocols.SoapHeaderAttribute(“timeStamp”, Direction = SoapHeaderDirection.In)]
[System.Web.Services.Protocols.SoapRpcMethodAttribute(“BulletinGetTopics”, RequestNamespace=“http://wsdl.cybozu.co.jp/bulletin/2008”, ResponseNamespace=“http://wsdl.cybozu.co.jp/bulletin/2008”, Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[return: System.Xml.Serialization.XmlArrayAttribute(“returns”)]
[return: System.Xml.Serialization.XmlArrayItemAttribute(“category”, Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)]
public TopicsList[] BulletinGetTopics([System.Xml.Serialization.XmlArrayItemAttribute(“category_id”, Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] string[] parameters) {
object[] results = this.Invoke(“BulletinGetTopics”, new object[] {
parameters});
return ((TopicsList[])(results[0]));
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.cybozu.co.jp/bulletin/2008")]
public partial class TopicsList {
private TopicsListTopic[] topicField;
private string category_idField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("topic")]
public TopicsListTopic[] topic {
get {
return this.topicField;
}
set {
this.topicField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string category_id {
get {
return this.category_idField;
}
set {
this.category_idField = value;
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.cybozu.co.jp/bulletin/2008")]
public partial class TopicsListTopic {
private string idField;
/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string id {
get {
return this.idField;
}
set {
this.idField = value;
}
}
}
}