私はWSDLパーサーの中間実装の小さなプログラムです。しかし、私はptobjectがNULLになってきています。これは、プログラムで言及されているwsdlで起こっています。私はWSDLが間違っているとは思わない。なぜなら、同じWSDLをSOAP UIに渡すと、それは正常に解析されるからだ。wsdlの解析でportTypeがnullになっています
問題の根本原因を理解するのに手伝ってください。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Net;
using System.Reflection;
using System.Web.Services.Description;
namespace ConsoleApplication14
{
class XmlSchemaReadWriteExample
{
static void Main()
{
XmlTextReader myReader = new XmlTextReader("https://domainws.ficora.fi/fiDomain/DomainNameWS_FicoraDomainNameWS.svc?wsdl");
if (ServiceDescription.CanRead(myReader))
{
ServiceDescription myDescription = ServiceDescription.Read(myReader);
Dictionary<string, Service> Services;
foreach (Service srv in myDescription.Services)
{
Services = new Dictionary<string, Service>();
Services.Add(srv.Name, srv);
foreach (Port p in srv.Ports)
{
Binding b = myDescription.Bindings[p.Binding.Name];
foreach (Object e in b.Extensions)
{
if (e is Soap12Binding || e is SoapBinding)
{
PortType ptobject = myDescription.PortTypes[b.Type.Name];
}
}
}
}
}
}
}
}
ありがとうございます。
Bheem。
その行にブレークポイントを追加します。 myDescription.PortTypesには何がありますか? –