Hi Ken
Thanks for your reply
I have attached examples of the code and xml that is
produced.
Any help would be really appreciated.
The XML is produced by a VB6 dll on a remote server using
the following code:
Public Function ReturnData() as String
Dim oCnn As New ADODB.Connectio n
Dim oStream As New ADODB.Stream
Dim oRS As New ADODB.Recordset
oCnn.Connection String = SQL_CONNECTION_ STRING
oCnn.Open
oRS.CursorLocat ion = adUseClient
Set oRS = oCnn.Execute("S ELECT .....")
'Save recordset as XML
oRS.Save oStream, adPersistXML
ReturnData = oStream.ReadTex t
Set oStream = Nothing
Set oRS = Nothing
Set oCnn = Nothing
End Function
The XML string is as follows
<xml xmlns:s='uuid:B DC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid: C2F41010-65B3-11d1-A29F-
00AA00C14882'
xmlns:rs='urn:s chemas-microsoft-com:rowset'
xmlns:z='#Rowse tSchema'>
<s:Schema id='RowsetSchem a'>
<s:ElementTyp e name='row' content='eltOnl y'
rs:CommandTimeo ut='30'>
<s:AttributeTyp e name='SUN_REGIO N'
rs:number='1'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='4 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='SUN_DB'
rs:number='2'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='3 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='AMOUNT'
rs:number='3' rs:nullable='tr ue'
rs:writeunknown ='true'>
<s:datatype dt:type='number '
rs:dbtype='nume ric' dt:maxLength='1 9'
rs:scale='3' rs:precision='3 8'
rs:fixedlength= 'true'/>
</s:AttributeType >
<s:AttributeTyp e name='ACCNT_COD E'
rs:number='4' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A0'
rs:number='5' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A1'
rs:number='6' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A2'
rs:number='7' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A3'
rs:number='8' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A4'
rs:number='9' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A5'
rs:number='10' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A6'
rs:number='11' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A7'
rs:number='12' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A8'
rs:number='13' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A9'
rs:number='14' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_T0'
rs:number='15' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:extends type='rs:rowbas e'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row SUN_REGION='EME A' SUN_DB='ZZZ'
AMOUNT='1155.00 0'
ACCNT_CODE='105 0 '
ANAL_A0=' '
ANAL_A1=' '
ANAL_A2=' ' ANAL_A3='BS140 '
ANAL_A4=' '
ANAL_A5=' ' ANAL_A6=' '
ANAL_A7=' '
ANAL_A8=' ' ANAL_A9=' '
/>
</rs:data>
</xml>
In the ASP.Net app, I have registered the web service and
in the function call it as follows
Dim sXML as String
Dim xmlDoc As XmlDocument
Dim oWeb As New SoapEMEA.SunLin k
sXML = oWeb.ReturnData ()
'Load XML string into XML Doc
xmlDoc.LoadXml( sXML)
Now I could be really stupid (my girlfriend thinks so)
but I have tested to see if the xmlDoc has any data by
looking at xmlDoc.value.
As far as I can tell, it hasn't been loaded.
Help?
Regards
Ross
-----Original Message-----
Hi Mac,
Could you give us a little more detail or code?
It would help to have a sample of the string that you
are getting into sXMLto analyze why the XML document doesn't like it. I
assume that the XML iswell-formed.
How did you test that xmlDoc was empty?
Thanks,
Ken
"Mac" <an*******@disc ussions.microso ft.com> wrote in
messagenews:05******* *************** ******@phx.gbl. .. Hi all
I have a asp.net application which calls a web service
via a wdsl file which retrieves an XML String.
The XML String is from a adodb recordset saved as via a
stream.
Dim oRS as New ADODB.Recordset
Dim oStream as New ADODB.Stream
Set oRS = oCnn.Execute(sS QL)
'Save recordset as XML
oRS.Save oStream, adPersistXML
sXML = oStream.ReadTex t
In the ASP.Net application I retrieve the sXML via the
web service without any problems but when I try and
load to an XML document, nothing is loaded.
Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( sXML)
The xmlDoc remains empty.
I have been scratching my head on this for a couple of
hours and I am sure it's probably simple but would
appreciate any help.
Regards
mac
.