exchangefreaks.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error: Name cannot begin with the '0' character, hexadecimal

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Applications
Author Message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Fri Oct 12, 2007 12:50 am    Post subject: Error: Name cannot begin with the '0' character, hexadecimal Reply with quote

Dear All,

I am working exchange server & fetching task of outlook 2007
through MSXML2.XMLHTTP30 now I am facing the following error
"Name cannot begin with the '0' character, hexadecimal value
0x30. Line 1, position 564" while reading XML. Please help me to
solve this problem. I am also mentioning the code below:

Private Function ReadTask(ByVal stURI As System.String)

Dim sQuery As String
Dim status As Integer

Try
' Open the item.
oXMLHttp.open("PROPFIND", stURI, False, Me.UserNameAlias, Me.Password)
' Set up the query to get subject, from, and to.


sQuery = "" & _
" xmlns:m='urn:schemas:mailheader:' " & _

"xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
"xmlns:g='urn:schemas:httpmail:' " & _
"xmlns:i='http://schemas.microsoft.com/mapi/id/" & _
"{00062008-0000-0000-C000-000000000046}/' " & _
"xmlns:h='http://schemas.microsoft.com/mapi/id/" & _
"{00062003-0000-0000-C000-000000000046}/'> " & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
""

' Set up request headers.
oXMLHttp.setRequestHeader("Content-Type", "text/xml")

' oXMLHttp.setRequestHeader("Brief", "t")
' Send the query.
oXMLHttp.send(sQuery)

status = CheckStatus(oXMLHttp.status)
If status = En.enStatus.Multi_Status Then

Call ParseTaskXML(oXMLHttp.responseText)
End If

Catch ex As Exception
Throw New Exception(ex.Message, ex.InnerException)
Finally
sQuery = Nothing
status = Nothing
End Try
End Function

Private Function ParseTaskXML(ByVal responseText As
System.String)
Dim reader As New XmlNodeReader(xmlDoc)
Try
xmlDoc.LoadXml(responseText)

While reader.Read()
If reader.Name.ToLower() = "d:subject" Then
strSubject = reader.ReadInnerXml()
End If
If reader.Name.ToLower() = "e:textdescription"
Then
Me.strDescription = reader.ReadInnerXml

End If
If reader.Name.ToLower() = "f:0x00008102" Then
Me.dbTasksCompletedPercent reader.ReadInnerXml()
End If
If reader.Name.ToLower() = "g:0x8516" Then
Me.dtTasksStartDate = reader.ReadInnerXml

End If
If reader.Name.ToLower() = "g:0x8517" Then
Me.dtTasksDueDate = reader.ReadInnerXml()
End If
If reader.Name.ToLower() = "f:0x00008101" Then
' reader.ReadInnerXml
End If

End While
Catch ex As Exception
Throw New Exception(ex.Message, ex.InnerException)
Finally
reader = Nothing
End Try

End Function

Archived from group: microsoft>public>exchange>applications
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Fri Oct 12, 2007 11:42 am    Post subject: Re: Error: Name cannot begin with the '0' character, hexadec Reply with quote

Hello,

that error is a standard XML error message - Exchange requires you to sent
invalid xml to the server.

You can work around this by escaping the 0 in the front. See
http://www.infinitec.de/articles/exchange/creatingwebdavrequestswithxmlreaderwriter.aspx.

If I recall it correctly, a:0x must be written must be written
as

Kind regards,
Henning

"Atul Saxena" wrote in message @microsoft.com...
> Dear All,
>
> I am working exchange server & fetching task of outlook 2007
> through MSXML2.XMLHTTP30 now I am facing the following error
> "Name cannot begin with the '0' character, hexadecimal value
> 0x30. Line 1, position 564" while reading XML. Please help me to
> solve this problem. I am also mentioning the code below:
>
> Private Function ReadTask(ByVal stURI As System.String)
>
> Dim sQuery As String
> Dim status As Integer
>
> Try
> ' Open the item.
> oXMLHttp.open("PROPFIND", stURI, False, Me.UserNameAlias, Me.Password)
> ' Set up the query to get subject, from, and to.
>
>
> sQuery = "" & _
> " > xmlns:m='urn:schemas:mailheader:' " & _
>
> "xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
> "xmlns:g='urn:schemas:httpmail:' " & _
> "xmlns:i='http://schemas.microsoft.com/mapi/id/" & _
> "{00062008-0000-0000-C000-000000000046}/' " & _
> "xmlns:h='http://schemas.microsoft.com/mapi/id/" & _
> "{00062003-0000-0000-C000-000000000046}/'> " & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> ""
>
> ' Set up request headers.
> oXMLHttp.setRequestHeader("Content-Type", "text/xml")
>
> ' oXMLHttp.setRequestHeader("Brief", "t")
> ' Send the query.
> oXMLHttp.send(sQuery)
>
> status = CheckStatus(oXMLHttp.status)
> If status = En.enStatus.Multi_Status Then
>
> Call ParseTaskXML(oXMLHttp.responseText)
> End If
>
> Catch ex As Exception
> Throw New Exception(ex.Message, ex.InnerException)
> Finally
> sQuery = Nothing
> status = Nothing
> End Try
> End Function
>
> Private Function ParseTaskXML(ByVal responseText As
> System.String)
> Dim reader As New XmlNodeReader(xmlDoc)
> Try
> xmlDoc.LoadXml(responseText)
>
> While reader.Read()
> If reader.Name.ToLower() = "d:subject" Then
> strSubject = reader.ReadInnerXml()
> End If
> If reader.Name.ToLower() = "e:textdescription"
> Then
> Me.strDescription = reader.ReadInnerXml
>
> End If
> If reader.Name.ToLower() = "f:0x00008102" Then
> Me.dbTasksCompletedPercent reader.ReadInnerXml()
> End If
> If reader.Name.ToLower() = "g:0x8516" Then
> Me.dtTasksStartDate = reader.ReadInnerXml
>
> End If
> If reader.Name.ToLower() = "g:0x8517" Then
> Me.dtTasksDueDate = reader.ReadInnerXml()
> End If
> If reader.Name.ToLower() = "f:0x00008101" Then
> ' reader.ReadInnerXml
> End If
>
> End While
> Catch ex As Exception
> Throw New Exception(ex.Message, ex.InnerException)
> Finally
> reader = Nothing
> End Try
>
> End Function
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Mon Oct 15, 2007 4:24 am    Post subject: Re: Error: Name cannot begin with the '0' character, hexadec Reply with quote

Dear Henning,

After applying the said method it is now not giving me any error but in
response it shows like this :

xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
xmlns:e="urn:schemas:httpmail:" xmlns:d="urn:schemas:mailheader:"
xmlns:f="http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/"
xmlns:c="xml:"
xmlns:g="http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/"
xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/HTTP/1.1
200
OKAQEAAAAAAEZ6AAAAAAAAAAAAAAAA b:dt="dateTime.tz">2007-09-26T11:40:51.484ZHTTP/1.1
404 Resource Not
Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/Already%20Solve%20XML%20Error..EMLHTTP/1.1
200
OKAQEAAAAAAEZ6AgAAAAAoGgQAAAAA b:dt="dateTime.tz">2007-10-10T08:37:15.921ZAlready
Solve XML Error. Solve the error “Name cannot
begin with the ‘0’ character, hexadecimal value 0x30” & If it is not solving
then discuss with Rajeev sir.

Atul Saxena

HTTP/1.1 404
Resource Not
Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/Working%20on%20Exchange%20Server%20Project.EMLHTTP/1.1
200
OKAQEAAAAAAEZ6AgAAAAAoGgMAAAAA b:dt="dateTime.tz">2007-10-05T09:42:29.562ZWorking
on Exchange Server ProjectToday is the last
day of Exchange Server Project. So give all the feedback to your supervisor.
Atul Saxena
HTTP/1.1 404
Resource Not
Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/No%20Subject.EMLHTTP/1.1
200
OKAQEAAAAAAEZ6AgAAAAAoGgEAAAAA b:dt="dateTime.tz">2007-09-24T07:18:10.640ZHTTP/1.1
404 Resource Not
Found

Please tell me how to solve "HTTP/1.1 404 Resource Not Found" error.

Thanks & regards,

Atul Saxena
"Henning Krause [MVP - Exchange]" wrote:

> Hello,
>
> that error is a standard XML error message - Exchange requires you to sent
> invalid xml to the server.
>
> You can work around this by escaping the 0 in the front. See
> http://www.infinitec.de/articles/exchange/creatingwebdavrequestswithxmlreaderwriter.aspx.
>
> If I recall it correctly, a:0x must be written must be written
> as
>
> Kind regards,
> Henning
>
> "Atul Saxena" wrote in message
> @microsoft.com...
> > Dear All,
> >
> > I am working exchange server & fetching task of outlook 2007
> > through MSXML2.XMLHTTP30 now I am facing the following error
> > "Name cannot begin with the '0' character, hexadecimal value
> > 0x30. Line 1, position 564" while reading XML. Please help me to
> > solve this problem. I am also mentioning the code below:
> >
> > Private Function ReadTask(ByVal stURI As System.String)
> >
> > Dim sQuery As String
> > Dim status As Integer
> >
> > Try
> > ' Open the item.
> > oXMLHttp.open("PROPFIND", stURI, False, Me.UserNameAlias, Me.Password)
> > ' Set up the query to get subject, from, and to.
> >
> >
> > sQuery = "" & _
> > " > > xmlns:m='urn:schemas:mailheader:' " & _
> >
> > "xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
> > "xmlns:g='urn:schemas:httpmail:' " & _
> > "xmlns:i='http://schemas.microsoft.com/mapi/id/" & _
> > "{00062008-0000-0000-C000-000000000046}/' " & _
> > "xmlns:h='http://schemas.microsoft.com/mapi/id/" & _
> > "{00062003-0000-0000-C000-000000000046}/'> " & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > "" & _
> > ""
> >
> > ' Set up request headers.
> > oXMLHttp.setRequestHeader("Content-Type", "text/xml")
> >
> > ' oXMLHttp.setRequestHeader("Brief", "t")
> > ' Send the query.
> > oXMLHttp.send(sQuery)
> >
> > status = CheckStatus(oXMLHttp.status)
> > If status = En.enStatus.Multi_Status Then
> >
> > Call ParseTaskXML(oXMLHttp.responseText)
> > End If
> >
> > Catch ex As Exception
> > Throw New Exception(ex.Message, ex.InnerException)
> > Finally
> > sQuery = Nothing
> > status = Nothing
> > End Try
> > End Function
> >
> > Private Function ParseTaskXML(ByVal responseText As
> > System.String)
> > Dim reader As New XmlNodeReader(xmlDoc)
> > Try
> > xmlDoc.LoadXml(responseText)
> >
> > While reader.Read()
> > If reader.Name.ToLower() = "d:subject" Then
> > strSubject = reader.ReadInnerXml()
> > End If
> > If reader.Name.ToLower() = "e:textdescription"
> > Then
> > Me.strDescription = reader.ReadInnerXml
> >
> > End If
> > If reader.Name.ToLower() = "f:0x00008102" Then
> > Me.dbTasksCompletedPercent reader.ReadInnerXml()
> > End If
> > If reader.Name.ToLower() = "g:0x8516" Then
> > Me.dtTasksStartDate = reader.ReadInnerXml
> >
> > End If
> > If reader.Name.ToLower() = "g:0x8517" Then
> > Me.dtTasksDueDate = reader.ReadInnerXml()
> > End If
> > If reader.Name.ToLower() = "f:0x00008101" Then
> > ' reader.ReadInnerXml
> > End If
> >
> > End While
> > Catch ex As Exception
> > Throw New Exception(ex.Message, ex.InnerException)
> > Finally
> > reader = Nothing
> > End Try
> >
> > End Function
>
>
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Mon Oct 15, 2007 9:49 pm    Post subject: Re: Error: Name cannot begin with the '0' character, hexadec Reply with quote

Hello,

a 404 error indicates that those properties are not set on the instance.
There is no way to fix this... other by populating it with some data...

Are you sure those properties are populated in Outlook?

Kind regards,
Henning Krause


"Atul Saxena" wrote in message @microsoft.com...
> Dear Henning,
>
> After applying the said method it is now not giving me any error but in
> response it shows like this :
>
> > xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
> xmlns:e="urn:schemas:httpmail:" xmlns:d="urn:schemas:mailheader:"
> xmlns:f="http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/"
> xmlns:c="xml:"
> xmlns:g="http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/"
> xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/HTTP/1.1
> 200
> OKAQEAAAAAAEZ6AAAAAAAAAAAAAAAA > b:dt="dateTime.tz">2007-09-26T11:40:51.484ZHTTP/1.1
> 404 Resource Not
> Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/Already%20Solve%20XML%20Error..EMLHTTP/1.1
> 200
> OKAQEAAAAAAEZ6AgAAAAAoGgQAAAAA > b:dt="dateTime.tz">2007-10-10T08:37:15.921ZAlready
> Solve XML Error. Solve the error “Name
> cannot
> begin with the ‘0’ character, hexadecimal value 0x30” & If it is not
> solving
> then discuss with Rajeev sir.
>
> Atul Saxena
>
> HTTP/1.1
> 404
> Resource Not
> Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/Working%20on%20Exchange%20Server%20Project.EMLHTTP/1.1
> 200
> OKAQEAAAAAAEZ6AgAAAAAoGgMAAAAA > b:dt="dateTime.tz">2007-10-05T09:42:29.562ZWorking
> on Exchange Server ProjectToday is the last
> day of Exchange Server Project. So give all the feedback to your
> supervisor.
> Atul Saxena
> HTTP/1.1
> 404
> Resource Not
> Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/No%20Subject.EMLHTTP/1.1
> 200
> OKAQEAAAAAAEZ6AgAAAAAoGgEAAAAA > b:dt="dateTime.tz">2007-09-24T07:18:10.640ZHTTP/1.1
> 404 Resource Not
> Found
>
> Please tell me how to solve "HTTP/1.1 404 Resource Not Found" error.
>
> Thanks & regards,
>
> Atul Saxena
> "Henning Krause [MVP - Exchange]" wrote:
>
>> Hello,
>>
>> that error is a standard XML error message - Exchange requires you to
>> sent
>> invalid xml to the server.
>>
>> You can work around this by escaping the 0 in the front. See
>> http://www.infinitec.de/articles/exchange/creatingwebdavrequestswithxmlreaderwriter.aspx.
>>
>> If I recall it correctly, a:0x must be written must be
>> written
>> as
>>
>> Kind regards,
>> Henning
>>
>> "Atul Saxena" wrote in message
>> @microsoft.com...
>> > Dear All,
>> >
>> > I am working exchange server & fetching task of outlook 2007
>> > through MSXML2.XMLHTTP30 now I am facing the following error
>> > "Name cannot begin with the '0' character, hexadecimal value
>> > 0x30. Line 1, position 564" while reading XML. Please help me to
>> > solve this problem. I am also mentioning the code below:
>> >
>> > Private Function ReadTask(ByVal stURI As System.String)
>> >
>> > Dim sQuery As String
>> > Dim status As Integer
>> >
>> > Try
>> > ' Open the item.
>> > oXMLHttp.open("PROPFIND", stURI, False, Me.UserNameAlias, Me.Password)
>> > ' Set up the query to get subject, from, and to.
>> >
>> >
>> > sQuery = "" & _
>> > " >> > xmlns:m='urn:schemas:mailheader:' " & _
>> >
>> > "xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
>> > "xmlns:g='urn:schemas:httpmail:' " & _
>> > "xmlns:i='http://schemas.microsoft.com/mapi/id/" &
>> > _
>> > "{00062008-0000-0000-C000-000000000046}/' " & _
>> > "xmlns:h='http://schemas.microsoft.com/mapi/id/" &
>> > _
>> > "{00062003-0000-0000-C000-000000000046}/'> " & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > "" & _
>> > ""
>> >
>> > ' Set up request headers.
>> > oXMLHttp.setRequestHeader("Content-Type", "text/xml")
>> >
>> > ' oXMLHttp.setRequestHeader("Brief", "t")
>> > ' Send the query.
>> > oXMLHttp.send(sQuery)
>> >
>> > status = CheckStatus(oXMLHttp.status)
>> > If status = En.enStatus.Multi_Status Then
>> >
>> > Call ParseTaskXML(oXMLHttp.responseText)
>> > End If
>> >
>> > Catch ex As Exception
>> > Throw New Exception(ex.Message, ex.InnerException)
>> > Finally
>> > sQuery = Nothing
>> > status = Nothing
>> > End Try
>> > End Function
>> >
>> > Private Function ParseTaskXML(ByVal responseText As
>> > System.String)
>> > Dim reader As New XmlNodeReader(xmlDoc)
>> > Try
>> > xmlDoc.LoadXml(responseText)
>> >
>> > While reader.Read()
>> > If reader.Name.ToLower() = "d:subject" Then
>> > strSubject = reader.ReadInnerXml()
>> > End If
>> > If reader.Name.ToLower() = "e:textdescription"
>> > Then
>> > Me.strDescription = reader.ReadInnerXml
>> >
>> > End If
>> > If reader.Name.ToLower() = "f:0x00008102" Then
>> > Me.dbTasksCompletedPercent reader.ReadInnerXml()
>> > End If
>> > If reader.Name.ToLower() = "g:0x8516" Then
>> > Me.dtTasksStartDate = reader.ReadInnerXml
>> >
>> > End If
>> > If reader.Name.ToLower() = "g:0x8517" Then
>> > Me.dtTasksDueDate = reader.ReadInnerXml()
>> > End If
>> > If reader.Name.ToLower() = "f:0x00008101" Then
>> > ' reader.ReadInnerXml
>> > End If
>> >
>> > End While
>> > Catch ex As Exception
>> > Throw New Exception(ex.Message, ex.InnerException)
>> > Finally
>> > reader = Nothing
>> > End Try
>> >
>> > End Function
>>
>>
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Tue Oct 16, 2007 8:26 am    Post subject: Re: Error: Name cannot begin with the '0' character, hexadec Reply with quote

Dear Henning,

I tried replacing 0x8104 is converted to _x0030_x8104 but fails to do so coz
in response text it is replacing all the local name starting like 0x8104 is
replacing it with multistatus.

Please tell me what am i doing wrong:

Delegate Function GiveAdvice() As String
Dim response1 As String
Private Shared ReadOnly _TagNameRegexFinder As Regex = New
Regex("(?<=\\w+", RegexOptions.Compiled)

Private Function ReadTask(ByVal stURI As System.String)

Dim sQuery As String
Dim status As Integer

Try
' Open the item.
oXMLHttp.open("PROPFIND", stURI, False, Me.UserNameAlias,
Me.Password)
' Set up the query to get subject, from, and to.

sQuery = "" & _
" xmlns:m='urn:schemas:mailheader:' " & _

"xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
"xmlns:g='urn:schemas:httpmail:' " & _
"xmlns:i='http://schemas.microsoft.com/mapi/id/" & _
"{00062008-0000-0000-C000-000000000046}/' " & _
"xmlns:h='http://schemas.microsoft.com/mapi/id/" & _
"{00062003-0000-0000-C000-000000000046}/'> " & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
""
' Set up request headers.
'sQuery = ParsePropfindResponse(sQuery)
oXMLHttp.setRequestHeader("Content-Type", "text/xml")
'oXMLHttp.setRequestHeader("Brief", "t")
' Send the query.
oXMLHttp.send(sQuery)

status = CheckStatus(oXMLHttp.status)
If status = En.enStatus.Multi_Status Then
response1 = oXMLHttp.responseText
sQuery = ParsePropfindResponse(oXMLHttp.responseText)
'Call ParseTaskXML(oXMLHttp.responseText)
Call ParseTaskXML(sQuery)
End If

Catch ex As Exception
Throw New Exception(ex.Message, ex.InnerException)
Finally
sQuery = Nothing
status = Nothing
End Try
End Function

Private Function ParsePropfindResponse(ByVal response As System.String)
As String
Dim TeenAgeGirl As GiveAdvice = New GiveAdvice(AddressOf fnMatch)

If String.IsNullOrEmpty(response) Then
Throw New ArgumentNullException("response")
End If

response = _TagNameRegexFinder.Replace(response,
fnReturn(TeenAgeGirl))
Return response

End Function
Private Function fnReturn(ByVal word As GiveAdvice) As String
Return (word())
End Function
Private Function fnMatch() As String
Dim match As Match = _TagNameRegexFinder.Match(response1)
Return XmlConvert.EncodeLocalName(match.Value)
End Function

Thanks & regards,

Atul Saxena
"Henning Krause [MVP - Exchange]" wrote:

> Hello,
>
> a 404 error indicates that those properties are not set on the instance.
> There is no way to fix this... other by populating it with some data...
>
> Are you sure those properties are populated in Outlook?
>
> Kind regards,
> Henning Krause
>
>
> "Atul Saxena" wrote in message
> @microsoft.com...
> > Dear Henning,
> >
> > After applying the said method it is now not giving me any error but in
> > response it shows like this :
> >
> > > > xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
> > xmlns:e="urn:schemas:httpmail:" xmlns:d="urn:schemas:mailheader:"
> > xmlns:f="http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/"
> > xmlns:c="xml:"
> > xmlns:g="http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/"
> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/HTTP/1.1
> > 200
> > OKAQEAAAAAAEZ6AAAAAAAAAAAAAAAA > > b:dt="dateTime.tz">2007-09-26T11:40:51.484ZHTTP/1.1
> > 404 Resource Not
> > Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/Already%20Solve%20XML%20Error..EMLHTTP/1.1
> > 200
> > OKAQEAAAAAAEZ6AgAAAAAoGgQAAAAA > > b:dt="dateTime.tz">2007-10-10T08:37:15.921ZAlready
> > Solve XML Error. Solve the error “Name
> > cannot
> > begin with the ‘0’ character, hexadecimal value 0x30” & If it is not
> > solving
> > then discuss with Rajeev sir.
> >
> > Atul Saxena
> >
> > HTTP/1.1
> > 404
> > Resource Not
> > Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/Working%20on%20Exchange%20Server%20Project.EMLHTTP/1.1
> > 200
> > OKAQEAAAAAAEZ6AgAAAAAoGgMAAAAA > > b:dt="dateTime.tz">2007-10-05T09:42:29.562ZWorking
> > on Exchange Server ProjectToday is the last
> > day of Exchange Server Project. So give all the feedback to your
> > supervisor.
> > Atul Saxena
> > HTTP/1.1
> > 404
> > Resource Not
> > Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/No%20Subject.EMLHTTP/1.1
> > 200
> > OKAQEAAAAAAEZ6AgAAAAAoGgEAAAAA > > b:dt="dateTime.tz">2007-09-24T07:18:10.640ZHTTP/1.1
> > 404 Resource Not
> > Found
> >
> > Please tell me how to solve "HTTP/1.1 404 Resource Not Found" error.
> >
> > Thanks & regards,
> >
> > Atul Saxena
> > "Henning Krause [MVP - Exchange]" wrote:
> >
> >> Hello,
> >>
> >> that error is a standard XML error message - Exchange requires you to
> >> sent
> >> invalid xml to the server.
> >>
> >> You can work around this by escaping the 0 in the front. See
> >> http://www.infinitec.de/articles/exchange/creatingwebdavrequestswithxmlreaderwriter.aspx.
> >>
> >> If I recall it correctly, a:0x must be written must be
> >> written
> >> as
> >>
> >> Kind regards,
> >> Henning
> >>
> >> "Atul Saxena" wrote in message
> >> @microsoft.com...
> >> > Dear All,
> >> >
> >> > I am working exchange server & fetching task of outlook 2007
> >> > through MSXML2.XMLHTTP30 now I am facing the following error
> >> > "Name cannot begin with the '0' character, hexadecimal value
> >> > 0x30. Line 1, position 564" while reading XML. Please help me to
> >> > solve this problem. I am also mentioning the code below:
> >> >
> >> > Private Function ReadTask(ByVal stURI As System.String)
> >> >
> >> > Dim sQuery As String
> >> > Dim status As Integer
> >> >
> >> > Try
> >> > ' Open the item.
> >> > oXMLHttp.open("PROPFIND", stURI, False, Me.UserNameAlias, Me.Password)
> >> > ' Set up the query to get subject, from, and to.
> >> >
> >> >
> >> > sQuery = "" & _
> >> > " > >> > xmlns:m='urn:schemas:mailheader:' " & _
> >> >
> >> > "xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
> >> > "xmlns:g='urn:schemas:httpmail:' " & _
> >> > "xmlns:i='http://schemas.microsoft.com/mapi/id/" &
> >> > _
> >> > "{00062008-0000-0000-C000-000000000046}/' " & _
> >> > "xmlns:h='http://schemas.microsoft.com/mapi/id/" &
> >> > _
> >> > "{00062003-0000-0000-C000-000000000046}/'> " & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > "" & _
> >> > ""
> >> >
> >> > ' Set up request headers.
> >> > oXMLHttp.setRequestHeader("Content-Type", "text/xml")
> >> >
> >> > ' oXMLHttp.setRequestHeader("Brief", "t")
> >> > ' Send the query.
> >> > oXMLHttp.send(sQuery)
> >> >
> >> > status = CheckStatus(oXMLHttp.status)
> >> > If status = En.enStatus.Multi_Status Then
> >> >
> >> > Call ParseTaskXML(oXMLHttp.responseText)
> >> > End If
> >> >
> >> > Catch ex As Exception
> >> > Throw New Exception(ex.Message, ex.InnerException)
> >> > Finally
> >> > sQuery = Nothing
> >> > status = Nothing
> >> > End Try
> >> > End Function
> >> >
> >> > Private Function ParseTaskXML(ByVal responseText As
> >> > System.String)
> >> > Dim reader As New XmlNodeReader(xmlDoc)
> >> > Try
> >> > xmlDoc.LoadXml(responseText)
> >> >
> >> > While reader.Read()
> >> > If reader.Name.ToLower() = "d:subject" Then
> >> > strSubject = reader.ReadInnerXml()
> >> > End If
> >> > If reader.Name.ToLower() = "e:textdescription"
> >> > Then
> >> > Me.strDescription = reader.ReadInnerXml
> >> >
> >> > End If
> >> > If reader.Name.ToLower() = "f:0x00008102" Then
> >> > Me.dbTasksCompletedPercent reader.ReadInnerXml()
> >> > End If
> >> > If reader.Name.ToLower() = "g:0x8516" Then
> >> > Me.dtTasksStartDate = reader.ReadInnerXml
> >> >
> >> > End If
> >> > If reader.Name.ToLower() = "g:0x8517" Then
> >> > Me.dtTasksDueDate = reader.ReadInnerXml()
> >> > End If
> >> > If reader.Name.ToLower() = "f:0x00008101" Then
> >> > ' reader.ReadInnerXml
> >> > End If
> >> >
> >> > End While
> >> > Catch ex As Exception
> >> > Throw New Exception(ex.Message, ex.InnerException)
> >> > Finally
> >> > reader = Nothing
> >> > End Try
> >> >
> >> > End Function
> >>
> >>
>
>
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Tue Oct 16, 2007 9:44 pm    Post subject: Re: Error: Name cannot begin with the '0' character, hexadec Reply with quote

Hello Atul,

I find your code somehow confusing.

I've just converted the relevant portion of the C# code from my article to
VB:

Private Shared Function ParsePropfindResponse(ByVal response As String) As
XmlReader
If String.IsNullOrEmpty(response) Then
Throw New ArgumentNullException("response")
End If
response = Program._TagNameRegexFinder.Replace(response, Function
(ByVal match As Match)
Return XmlConvert.EncodeLocalName(match.Value)
End Function)
Return XmlReader.Create(New StringReader(response))
End Function


' Fields
Private Shared ReadOnly _TagNameRegexFinder As Regex = New
Regex("(?<=\\w+", RegexOptions.Compiled)

Btw, why are you using the XmlHttpRequest object from .NET? You should
consider using the HttpWebRequest object, since it's far more powerful.

Kind regards,
Henning Krause



"Atul Saxena" wrote in message @microsoft.com...
> Dear Henning,
>
> I tried replacing 0x8104 is converted to _x0030_x8104 but fails to do so
> coz
> in response text it is replacing all the local name starting like 0x8104
> is
> replacing it with multistatus.
>
> Please tell me what am i doing wrong:
>
> Delegate Function GiveAdvice() As String
> Dim response1 As String
> Private Shared ReadOnly _TagNameRegexFinder As Regex = New
> Regex("(?<=\\w+", RegexOptions.Compiled)
>
> Private Function ReadTask(ByVal stURI As System.String)
>
> Dim sQuery As String
> Dim status As Integer
>
> Try
> ' Open the item.
> oXMLHttp.open("PROPFIND", stURI, False, Me.UserNameAlias,
> Me.Password)
> ' Set up the query to get subject, from, and to.
>
> sQuery = "" & _
> " > xmlns:m='urn:schemas:mailheader:' " & _
>
> "xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
> "xmlns:g='urn:schemas:httpmail:' " & _
> "xmlns:i='http://schemas.microsoft.com/mapi/id/" & _
> "{00062008-0000-0000-C000-000000000046}/' " & _
> "xmlns:h='http://schemas.microsoft.com/mapi/id/" & _
> "{00062003-0000-0000-C000-000000000046}/'> " & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> ""
> ' Set up request headers.
> 'sQuery = ParsePropfindResponse(sQuery)
> oXMLHttp.setRequestHeader("Content-Type", "text/xml")
> 'oXMLHttp.setRequestHeader("Brief", "t")
> ' Send the query.
> oXMLHttp.send(sQuery)
>
> status = CheckStatus(oXMLHttp.status)
> If status = En.enStatus.Multi_Status Then
> response1 = oXMLHttp.responseText
> sQuery = ParsePropfindResponse(oXMLHttp.responseText)
> 'Call ParseTaskXML(oXMLHttp.responseText)
> Call ParseTaskXML(sQuery)
> End If
>
> Catch ex As Exception
> Throw New Exception(ex.Message, ex.InnerException)
> Finally
> sQuery = Nothing
> status = Nothing
> End Try
> End Function
>
> Private Function ParsePropfindResponse(ByVal response As System.String)
> As String
> Dim TeenAgeGirl As GiveAdvice = New GiveAdvice(AddressOf fnMatch)
>
> If String.IsNullOrEmpty(response) Then
> Throw New ArgumentNullException("response")
> End If
>
> response = _TagNameRegexFinder.Replace(response,
> fnReturn(TeenAgeGirl))
> Return response
>
> End Function
> Private Function fnReturn(ByVal word As GiveAdvice) As String
> Return (word())
> End Function
> Private Function fnMatch() As String
> Dim match As Match = _TagNameRegexFinder.Match(response1)
> Return XmlConvert.EncodeLocalName(match.Value)
> End Function
>
> Thanks & regards,
>
> Atul Saxena
> "Henning Krause [MVP - Exchange]" wrote:
>
>> Hello,
>>
>> a 404 error indicates that those properties are not set on the instance.
>> There is no way to fix this... other by populating it with some data...
>>
>> Are you sure those properties are populated in Outlook?
>>
>> Kind regards,
>> Henning Krause
>>
>>
>> "Atul Saxena" wrote in message
>> @microsoft.com...
>> > Dear Henning,
>> >
>> > After applying the said method it is now not giving me any error but in
>> > response it shows like this :
>> >
>> > >> > xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
>> > xmlns:e="urn:schemas:httpmail:" xmlns:d="urn:schemas:mailheader:"
>> > xmlns:f="http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/"
>> > xmlns:c="xml:"
>> > xmlns:g="http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/"
>> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/HTTP/1.1
>> > 200
>> > OKAQEAAAAAAEZ6AAAAAAAAAAAAAAAA >> > b:dt="dateTime.tz">2007-09-26T11:40:51.484ZHTTP/1.1
>> > 404 Resource Not
>> > Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/Already%20Solve%20XML%20Error..EMLHTTP/1.1
>> > 200
>> > OKAQEAAAAAAEZ6AgAAAAAoGgQAAAAA >> > b:dt="dateTime.tz">2007-10-10T08:37:15.921ZAlready
>> > Solve XML Error. Solve the error “Name
>> > cannot
>> > begin with the ‘0’ character, hexadecimal value 0x30” & If it is not
>> > solving
>> > then discuss with Rajeev sir.
>> >
>> > Atul Saxena
>> >
>> > HTTP/1.1
>> > 404
>> > Resource Not
>> > Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/Working%20on%20Exchange%20Server%20Project.EMLHTTP/1.1
>> > 200
>> > OKAQEAAAAAAEZ6AgAAAAAoGgMAAAAA >> > b:dt="dateTime.tz">2007-10-05T09:42:29.562ZWorking
>> > on Exchange Server ProjectToday is the
>> > last
>> > day of Exchange Server Project. So give all the feedback to your
>> > supervisor.
>> > Atul Saxena
>> > HTTP/1.1
>> > 404
>> > Resource Not
>> > Foundhttp://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Tasks/No%20Subject.EMLHTTP/1.1
>> > 200
>> > OKAQEAAAAAAEZ6AgAAAAAoGgEAAAAA >> > b:dt="dateTime.tz">2007-09-24T07:18:10.640ZHTTP/1.1
>> > 404 Resource Not
>> > Found
>> >
>> > Please tell me how to solve "HTTP/1.1 404 Resource Not Found" error.
>> >
>> > Thanks & regards,
>> >
>> > Atul Saxena
>> > "Henning Krause [MVP - Exchange]" wrote:
>> >
>> >> Hello,
>> >>
>> >> that error is a standard XML error message - Exchange requires you to
>> >> sent
>> >> invalid xml to the server.
>> >>
>> >> You can work around this by escaping the 0 in the front. See
>> >> http://www.infinitec.de/articles/exchange/creatingwebdavrequestswithxmlreaderwriter.aspx.
>> >>
>> >> If I recall it correctly, a:0x must be written must be
>> >> written
>> >> as
>> >>
>> >> Kind regards,
>> >> Henning
>> >>
>> >> "Atul Saxena" wrote in message
>> >> @microsoft.com...
>> >> > Dear All,
>> >> >
>> >> > I am working exchange server & fetching task of outlook 2007
>> >> > through MSXML2.XMLHTTP30 now I am facing the following error
>> >> > "Name cannot begin with the '0' character, hexadecimal value
>> >> > 0x30. Line 1, position 564" while reading XML. Please help me to
>> >> > solve this problem. I am also mentioning the code below:
>> >> >
>> >> > Private Function ReadTask(ByVal stURI As System.String)
>> >> >
>> >> > Dim sQuery As String
>> >> > Dim status As Integer
>> >> >
>> >> > Try
>> >> > ' Open the item.
>> >> > oXMLHttp.open("PROPFIND", stURI, False, Me.UserNameAlias,
>> >> > Me.Password)
>> >> > ' Set up the query to get subject, from, and to.
>> >> >
>> >> >
>> >> > sQuery = "" & _
>> >> > " >> >> > xmlns:m='urn:schemas:mailheader:' " & _
>> >> >
>> >> > "xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
>> >> > "xmlns:g='urn:schemas:httpmail:' " & _
>> >> > "xmlns:i='http://schemas.microsoft.com/mapi/id/"
>> >> > &
>> >> > _
>> >> > "{00062008-0000-0000-C000-000000000046}/' " & _
>> >> > "xmlns:h='http://schemas.microsoft.com/mapi/id/"
>> >> > &
>> >> > _
>> >> > "{00062003-0000-0000-C000-000000000046}/'> " & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > "" & _
>> >> > ""
>> >> >
>> >> > ' Set up request headers.
>> >> > oXMLHttp.setRequestHeader("Content-Type", "text/xml")
>> >> >
>> >> > ' oXMLHttp.setRequestHeader("Brief", "t")
>> >> > ' Send the query.
>> >> > oXMLHttp.send(sQuery)
>> >> >
>> >> > status = CheckStatus(oXMLHttp.status)
>> >> > If status = En.enStatus.Multi_Status Then
>> >> >
>> >> > Call ParseTaskXML(oXMLHttp.responseText)
>> >> > End If
>> >> >
>> >> > Catch ex As Exception
>> >> > Throw New Exception(ex.Message, ex.InnerException)
>> >> > Finally
>> >> > sQuery = Nothing
>> >> > status = Nothing
>> >> > End Try
>> >> > End Function
>> >> >
>> >> > Private Function ParseTaskXML(ByVal responseText As
>> >> > System.String)
>> >> > Dim reader As New XmlNodeReader(xmlDoc)
>> >> > Try
>> >> > xmlDoc.LoadXml(responseText)
>> >> >
>> >> > While reader.Read()
>> >> > If reader.Name.ToLower() = "d:subject" Then
>> >> > strSubject = reader.ReadInnerXml()
>> >> > End If
>> >> > If reader.Name.ToLower() = "e:textdescription"
>> >> > Then
>> >> > Me.strDescription = reader.ReadInnerXml
>> >> >
>> >> > End If
>> >> > If reader.Name.ToLower() = "f:0x00008102" Then
>> >> > Me.dbTasksCompletedPercent reader.ReadInnerXml()
>> >> > End If
>> >> > If reader.Name.ToLower() = "g:0x8516" Then
>> >> > Me.dtTasksStartDate = reader.ReadInnerXml
>> >> >
>> >> > End If
>> >> > If reader.Name.ToLower() = "g:0x8517" Then
>> >> > Me.dtTasksDueDate = reader.ReadInnerXml()
>> >> > End If
>> >> > If reader.Name.ToLower() = "f:0x00008101" Then
>> >> > ' reader.ReadInnerXml
>> >> > End If
>> >> >
>> >> > End While
>> >> > Catch ex As Exception
>> >> > Throw New Exception(ex.Message, ex.InnerException)
>> >> > Finally
>> >> > reader = Nothing
>> >> > End Try
>> >> >
>> >> > End Function
>> >>
>> >>
>>
>>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
error Task Info. 308 system mail Task 'SETTASK' update error! Return code 0x20 Does anyone know what this error is. Also it came from a SpntLog. Thanks

w3wp.exe error Hi, My IIS caused the exchange services shutted down. Here is analysis details: OS: Windows server 2003 SP1 Process ID: 7372 Process Image: Entry point: w3wp_

Exchange 5.5. Error While pulling properties for one of my mailboxes I get the following error: Microsoft Exchange Access was denied when trying to contact the Windows NT Domain Controller. Microsoft Exchange Administrator ID no: c1031029 I have a PDC and Exch

CDO error within ASP application My ASP application uses Windows integrated and security as its security settings within the IIS server. I'm trying to execute a page that connects to the user's Exchange 5.5 mailbox (on a seperate server). To achieve this, I'm using CDO

error in application log The www service keeps getting hung up and the following is logged in the application log Error: File Unexpected error Can someone provided assistance in resolving this issue?
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Applications All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group