delphi - How can i read/set atribut for object soap -


if use vb .net follow code work good. how can realize on delphi 2010. problem find analog r.messagedata.appdata.any.

i try use

rootnode := otv.messagedata.appdata.objecttosoap(rootnode,rootnode,httprio.converter,'orderinfo','otv',[],s);   or p := otv.messagedata.appdata.datacontext.getdatapointer(0); 

but cann't find atribut of object of appdata - (orderid example).

i must read , set atribut appdata - how can on delphi 2010

thank you.

    **part of unit wsdl importer(commonappdatatype class empty)** unit aismfcservice;  interface  uses invokeregistry, soaphttpclient, types, xsbuiltins;  const   is_optn = $0001;   is_unbd = $0002;   is_nlbl = $0004;   is_attr = $0010;   is_ref  = $0080;   type    // ************************************************************************ //   // following types, referred in wsdl document not being represented   // in file. either aliases[@] of other types represented or referred   // never[!] declared in document. types latter category   // typically map predefined/known xml or embarcadero types; however,    // indicate incorrect wsdl documents failed declare or import schema type.   // ************************************************************************ //   // !:string          - "http://www.w3.org/2001/xmlschema"[gbl]   // !:anyuri          - "http://www.w3.org/2001/xmlschema"[gbl]   // !:datetime        - "http://www.w3.org/2001/xmlschema"[gbl]   // !:base64binary    - "http://www.w3.org/2001/xmlschema"[gbl]    include              = class;                 { "http://www.w3.org/2004/08/xop/include"[gblcplx] }   include2             = class;                 { "http://www.w3.org/2004/08/xop/include"[gblelm] }   orgexternaltype      = class;                 { "http://eos.ru/doc/service"[gblcplx] }   messagetype          = class;                 { "http://eos.ru/doc/service"[gblcplx] }   submessagetype       = class;                 { "http://eos.ru/doc/service"[gblcplx] }   messagedatatypeofcommonappdatatype = class;   { "http://eos.ru/doc/service"[gblcplx] }   commonappdatatype    = class;                 { "http://eos.ru/doc/service"[gblcplx] }   appdocumenttype      = class;                 { "http://eos.ru/doc/service"[gblcplx] }   referencetype        = class;                 { "http://eos.ru/doc/service"[gblcplx] }   message_             = class;                 { "http://eos.ru/doc/service"[gblelm] }   messagedata          = class;                 { "http://eos.ru/doc/service"[gblelm] }   orgexternaltype2     = class;                 { "http://smev.gosuslugi.ru/rev120315"[gblcplx] }   messagetype2         = class;                 { "http://smev.gosuslugi.ru/rev120315"[gblcplx] }   submessagetype2      = class;                 { "http://smev.gosuslugi.ru/rev120315"[gblcplx] }   messagedatatypeofcommonappdatatype2 = class;   { "http://smev.gosuslugi.ru/rev120315"[gblcplx] }   commonappdatatype2   = class;                 { "http://smev.gosuslugi.ru/rev120315"[gblcplx] }   appdocumenttype2     = class;                 { "http://smev.gosuslugi.ru/rev120315"[gblcplx] }   referencetype2       = class;                 { "http://smev.gosuslugi.ru/rev120315"[gblcplx] }   message_2            = class;                 { "http://smev.gosuslugi.ru/rev120315"[gblelm] }   messagedata2         = class;                 { "http://smev.gosuslugi.ru/rev120315"[gblelm] }   sendrequestmessage   = class;                 { "http://eos.ru/doc/message"[lit][gblelm] }   responsemessage      = class;                 { "http://eos.ru/doc/message"[lit][gblelm] }   sendgetstatusrequestmessage = class;          { "http://eos.ru/doc/message"[lit][gblelm] }   getstatusresponsemessage = class;             { "http://eos.ru/doc/message"[lit][gblelm] }   submessage           = class;                 { "http://eos.ru/doc/service"[alias] }   submessage2          = class;                 { "http://smev.gosuslugi.ru/rev120315"[alias] } ....    // ************************************************************************ //   // xml       : commonappdatatype, global, <complextype> (appdata)   // namespace : http://eos.ru/doc/service   // ************************************************************************ //   commonappdatatype = class(tremotable)   private   published   end; 

xml text webservice

<s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:body xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"><responsemessage xmlns="http://eos.ru/doc/message"><message xmlns="http://smev.gosuslugi.ru/rev120315"><sender><code>342703391</code><name>Дело</name></sender><recipient><code>123456789</code><name>АИС МФЦ</name></recipient><originator><code>123456789</code><name>АИС МФЦ</name></originator><typecode>gsrv</typecode><status>accept</status><date>2013-08-07t16:19:26.39125+04:00</date><exchangetype>0</exchangetype></message><messagedata xmlns="http://smev.gosuslugi.ru/rev120315"><appdata><orderinfo xmlns=""><orderid>10028894</orderid><statuscode>1</statuscode><comment>Заявление передано в информационную систему "Дело"</comment></orderinfo></appdata></messagedata></responsemessage></s:body></s:envelope> 

vb.net code (its work)

dim new ais.aismfcrequestmessage         dim doc new xml.xmldocument         dim el xml.xmlelement         el = doc.createelement("getstatuesrequest")         el.innerxml = textbox1.text         msgbox(el.innerxml)         dim els() xml.xmlelement         dim s ais.iaismfcservice          s = new ais.aismfcserviceclient         a.message = new ais.messagetype         a.message.sender = new ais.orgexternaltype         a.message.sender.code = "123456789"         a.message.sender.name = "АИС МФЦ"         a.message.recipient = new ais.orgexternaltype         a.message.recipient.code = "1234567890"         a.message.recipient.name = "delo"         a.message.originator = new ais.orgexternaltype         a.message.originator.code = "123456789"         a.message.originator.name = "АИС МФЦ"         a.message.servicename = "sn1"         a.message.typecode = ais.typecodeenum.gsrv         a.message.status = ais.statusenum.request         a.message.date = now.date         a.message.exchangetype = ais.exchangetypeenum.item2         a.message.servicecode = "01"         a.message.casenumber = "1"         a.messagedata = new ais.messagedatatypeofcommonappdatatype         a.messagedata.appdata = new ais.commonappdatatype         redim els(0)         els(0) = el         a.messagedata.appdata.any = els          dim r ais.aismfcresponsemessage = s.createrequest(a)         msgbox(r.message.date.tostring)          dim m = r.messagedata.appdata.any.toarray         each o in m             el = o             textbox1.text = el.innerxml         next 

you haven't set correct options on delphi's wsdl importer, imported class doesn't contain data you're looking for. wsdl importer rather fussy , can take trial , error expected results. in many cases, i've given , done manually.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -