public void HandleSoapMessage(IMessage request, IMessage response) { int parameterIndex = Utility.FindFieldIndex("inputQuery", request.Parameters, true); parameterIndex = Utility.FindFieldIndex("inputQuery", request.Parameters, true); Query query = (Query)request.Parameters.GetObject(parameterIndex, "http://www.mynamespace.com", "Query"); . . . }
<?xml version="1.0" encoding="utf-8" ?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.mynamespace.com" xmlns:esri="http://www.esri.com/schemas/ArcGIS/10.0"><soap:Body><tns:CustomerSearch><ns1:inputQuery xmlns:ns1=""><ns1:Test>Test Text</ns1:Test></ns1:inputQuery></tns:CustomerSearch></soap:Body></soap:Envelope> <?xml version="1.0" encoding="utf-8" ?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.mynamespace.com" xmlns:esri="http://www.esri.com/schemas/ArcGIS/10.0"><soap:Body><tns:CustomerSearch><ns1:inputPoint xmlns:ns1=""><ns1:X>0</ns1:X><ns1:Y>0</ns1:Y></ns1:inputPoint></tns:CustomerSearch></soap:Body></soap:Envelope>
MyCustomTypeCollection myTypeColl = (MyCustomTypeCollection)reqParams.GetObject(idx, c_ns_soe, "MyCustomTypeCollection");
typeof(MyCustomTypeCollection).Name
logger.LogMessage(ServerLogger.msgType.warning, "segment extraction", -1, typeof(MyCustomTypeCollection).Name); object myTypeColl = reqParams.GetObject(idx, c_ns_soe, typeof(MyCustomTypeCollection).Name);
public MyCustomTypeCollection(string namespaceURI) : base(namespaceURI) { }
public MyCustomTypeCollection() : base("http://www.myOrg.com/schemas/1.0") { }
public MyCustomTypeCollection(string namespaceURI) : base(namespaceURI) { SoapSOE1.logger.LogMessage(ServerLogger.msgType.warning, "collection constructor", -1, namespaceURI); }
public MyCustomTypeCollection(string namespaceURI) : base(namespaceURI) { }
...
In the "passed in" case ArcGIS Server is supplying the namespace when instantiating MyCustomTypeCollection. How is the namespace being set when it instantiates the MyCustomType's contained in that collection?
No, I don't have a working debugger; ArcGIS Server is on a different machine than my development workstation. I have been logging for debugging.
public static string Read(this IMessage message) { string xml; XMLStreamClass xmlStream = new XMLStreamClass(); message.WriteXML(xmlStream); xml = xmlStream.SaveToString(); return xml; }
I am having same issue in 10.3, I tried the steps above and they do not fix the problem, does anyone have a fix for this in 10.3?