D
deepak
Hi All,
MESSAGE:
<SXPTaskUpdateOrAdd Revision= " 7.5.0 " Source="ER_Kista" >
<Task>
<NOCRefID>Deepak_0208_1</NOCRefID>
<Customer>KPN-NL</Customer>
<Title>The work order title</Title>
<Priority>1</Priority>
<Status>Unassigned</Status>
<NewComment>last comment only</NewComment>
<EstimatedDuration>36000</EstimatedDuration>
<EarlyStart>2008-02-12T17:00:00</EarlyStart >
<DesiredDueDate>2008-02-12T17:00:00</DesiredDueDate >
</Task>
</SXPTaskUpdateOrAdd>
ERROR:
<MethodResult
Status="2"><Error><ErrorNumber>-1071651496</ErrorNumber><ErrorDescription>An
XML parse error occured.
File Position: 0
Line: 0
Line Position: 0
Reason: XML document must have a top level element.
Source Text: </ErrorDescription><ErrorSource>modXML.LoadXMLDocumentFromURL \\
W6IntInMsgLib</ErrorSource><ErrorLine>0</ErrorLine></Error></MethodResult>
i gets this error from server side , and from client side this sxpmessage
goes and response from server comes as this error.Code is very big vb.net.i
dont know how much it can be helpful.
but the main thing which i changed and getting error since after that change
is as u can see i m sending below msg from client sid
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
<SXPTaskUpdateOrAdd Revision= " 7.5.0 " Source="ER_Kista" >
<Task>
<NOCRefID>Deepak_0208_1</NOCRefID>
<Customer>KPN-NL</Customer>
<Title>The work order title</Title>
<Priority>1</Priority>
<Status>Unassigned</Status>
<NewComment>last comment only</NewComment>
<EstimatedDuration>36000</EstimatedDuration>
<EarlyStart>2008-02-12T17:00:00</EarlyStart >
<DesiredDueDate>2008-02-12T17:00:00</DesiredDueDate >
</Task>
</SXPTaskUpdateOrAdd
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
there was a code change requirment that this date(s) like earlystart and
desiredduedate should be changed from UTC->local as they will come to server
in UTC time format.
I changed it through code as below
1. I took urs method which u told me yesterday to read the input stream into
a xmldocument.
xmlInDoc.Load(Request.InputStream)
and then pick them so that i can change fromUTC to Local
Dim xmlearlyStart As XmlNode =
xmlInDoc.SelectSingleNode("SXPTaskUpdateOrAdd/Task/EarlyStart")
Dim xmldesiredDueDate As XmlNode =
xmlInDoc.SelectSingleNode("SXPTaskUpdateOrAdd/Task/DesiredDueDate")
2.Finally i changed it from UTC to local by code and then as this incoming
Request (from client) should be proceseed by next page of aspx so before
sending it to next page, i did the following
xmlearlyStart.InnerText = strlocalEarlyStart ' where
strlocalEarlyStart is local date after chaning from UTC
xmlearlyStart.InnerXml = strlocalEarlyStart ' where
strlocalEarlyStart is local date after chaning from UTC
xmldesiredDueDate.InnerText = strlocalDesiredDueDate''
where strlocalDesiredDueDate'' is local date after chaning from UTC
xmldesiredDueDate.InnerXml = strlocalDesiredDueDate'
3. AND FINALLY like usual i tranfered the changed dates to this page
Server.Transfer("w6inboundprocessor.aspx", True)
'Transfer server request in case no attachments are found
4. and the code in this page(w6inboundprocessor.aspx) is small and it gives
me error( in Response.Write(docOUT.xml)).Kinldy help me plz
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Public Class w6inboundprocessor
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
On Error Resume Next
Const W6PIncomingProcessor = "W6IntUtilsGWWrap.W6IntInMsgProcGW.1"
Dim binData
Dim objProcessor
Dim docOUT
Dim blnSuccess
binData = Request.BinaryRead(Request.TotalBytes())
If Err.Number <> 0 Then Call XMLError(Err)
blnSuccess = False
While Not blnSuccess
' Danny 15/5/05 - Bug #23983
' Based on Microsoft's articles there is no need to use the
Server object to create objects.
' If we do use the Server objects it costs in performance
' and can cause some instability as the bug suggests.
objProcessor = CreateObject(W6PIncomingProcessor)
If Err.Number = 0 Then
blnSuccess = True
Else
If Err.Number <> 2147549448 Then
Call XMLError(Err)
blnSuccess = True
End If
End If
End While
' Danny 15/5/05 - Bug #23983
' Based on Microsoft's articles there is no need to use the Server
object to create objects.
' If we do use the Server objects it costs in performance
' and can cause some instability as the bug suggests.
docOUT = CreateObject("Microsoft.XMLDOM")
Call docOUT.loadXML(objProcessor.ProcessMessage(binData))
If Err.Number <> 0 Then Call XMLError(Err)
Response.ContentType = "text/xml"
' Gil (27/2/05): Bug: #23639 - Added unicode support as in the SXP
asp file
' Reviewed with Sasha.
Response.Charset = "utf-8"
'docOUT.save(Response)
Response.Write(docOUT.xml)
Response.End()
End Sub
Sub XMLError(ByVal Err)
Dim strOutput
strOutput = "<MethodResult><Error>" & _
"<ErrorNumber>" & Err.Number & "</ErrorNumber>" & _
"<ErrorDescription>" & Err.Description &
"</ErrorDescription>" & _
"<ErrorSource>" & Err.Source & "</ErrorSource>" & _
"</Error></MethodResult>"
Call Response.Write(strOutput)
Response.End()
End Sub
' Added by Deepak on 2008-01-11
'To Check if conversion is required or not
Sub VerifyConversion()
' GetDictonaryValues()
End Sub
End Class
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
i m waiting for your reply...i believe that you would resolves tis problem
for sure...
-Deepak
+919886735837
(e-mail address removed)
MESSAGE:
<SXPTaskUpdateOrAdd Revision= " 7.5.0 " Source="ER_Kista" >
<Task>
<NOCRefID>Deepak_0208_1</NOCRefID>
<Customer>KPN-NL</Customer>
<Title>The work order title</Title>
<Priority>1</Priority>
<Status>Unassigned</Status>
<NewComment>last comment only</NewComment>
<EstimatedDuration>36000</EstimatedDuration>
<EarlyStart>2008-02-12T17:00:00</EarlyStart >
<DesiredDueDate>2008-02-12T17:00:00</DesiredDueDate >
</Task>
</SXPTaskUpdateOrAdd>
ERROR:
<MethodResult
Status="2"><Error><ErrorNumber>-1071651496</ErrorNumber><ErrorDescription>An
XML parse error occured.
File Position: 0
Line: 0
Line Position: 0
Reason: XML document must have a top level element.
Source Text: </ErrorDescription><ErrorSource>modXML.LoadXMLDocumentFromURL \\
W6IntInMsgLib</ErrorSource><ErrorLine>0</ErrorLine></Error></MethodResult>
i gets this error from server side , and from client side this sxpmessage
goes and response from server comes as this error.Code is very big vb.net.i
dont know how much it can be helpful.
but the main thing which i changed and getting error since after that change
is as u can see i m sending below msg from client sid
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
<SXPTaskUpdateOrAdd Revision= " 7.5.0 " Source="ER_Kista" >
<Task>
<NOCRefID>Deepak_0208_1</NOCRefID>
<Customer>KPN-NL</Customer>
<Title>The work order title</Title>
<Priority>1</Priority>
<Status>Unassigned</Status>
<NewComment>last comment only</NewComment>
<EstimatedDuration>36000</EstimatedDuration>
<EarlyStart>2008-02-12T17:00:00</EarlyStart >
<DesiredDueDate>2008-02-12T17:00:00</DesiredDueDate >
</Task>
</SXPTaskUpdateOrAdd
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
there was a code change requirment that this date(s) like earlystart and
desiredduedate should be changed from UTC->local as they will come to server
in UTC time format.
I changed it through code as below
1. I took urs method which u told me yesterday to read the input stream into
a xmldocument.
xmlInDoc.Load(Request.InputStream)
and then pick them so that i can change fromUTC to Local
Dim xmlearlyStart As XmlNode =
xmlInDoc.SelectSingleNode("SXPTaskUpdateOrAdd/Task/EarlyStart")
Dim xmldesiredDueDate As XmlNode =
xmlInDoc.SelectSingleNode("SXPTaskUpdateOrAdd/Task/DesiredDueDate")
2.Finally i changed it from UTC to local by code and then as this incoming
Request (from client) should be proceseed by next page of aspx so before
sending it to next page, i did the following
xmlearlyStart.InnerText = strlocalEarlyStart ' where
strlocalEarlyStart is local date after chaning from UTC
xmlearlyStart.InnerXml = strlocalEarlyStart ' where
strlocalEarlyStart is local date after chaning from UTC
xmldesiredDueDate.InnerText = strlocalDesiredDueDate''
where strlocalDesiredDueDate'' is local date after chaning from UTC
xmldesiredDueDate.InnerXml = strlocalDesiredDueDate'
3. AND FINALLY like usual i tranfered the changed dates to this page
Server.Transfer("w6inboundprocessor.aspx", True)
'Transfer server request in case no attachments are found
4. and the code in this page(w6inboundprocessor.aspx) is small and it gives
me error( in Response.Write(docOUT.xml)).Kinldy help me plz
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Public Class w6inboundprocessor
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
On Error Resume Next
Const W6PIncomingProcessor = "W6IntUtilsGWWrap.W6IntInMsgProcGW.1"
Dim binData
Dim objProcessor
Dim docOUT
Dim blnSuccess
binData = Request.BinaryRead(Request.TotalBytes())
If Err.Number <> 0 Then Call XMLError(Err)
blnSuccess = False
While Not blnSuccess
' Danny 15/5/05 - Bug #23983
' Based on Microsoft's articles there is no need to use the
Server object to create objects.
' If we do use the Server objects it costs in performance
' and can cause some instability as the bug suggests.
objProcessor = CreateObject(W6PIncomingProcessor)
If Err.Number = 0 Then
blnSuccess = True
Else
If Err.Number <> 2147549448 Then
Call XMLError(Err)
blnSuccess = True
End If
End If
End While
' Danny 15/5/05 - Bug #23983
' Based on Microsoft's articles there is no need to use the Server
object to create objects.
' If we do use the Server objects it costs in performance
' and can cause some instability as the bug suggests.
docOUT = CreateObject("Microsoft.XMLDOM")
Call docOUT.loadXML(objProcessor.ProcessMessage(binData))
If Err.Number <> 0 Then Call XMLError(Err)
Response.ContentType = "text/xml"
' Gil (27/2/05): Bug: #23639 - Added unicode support as in the SXP
asp file
' Reviewed with Sasha.
Response.Charset = "utf-8"
'docOUT.save(Response)
Response.Write(docOUT.xml)
Response.End()
End Sub
Sub XMLError(ByVal Err)
Dim strOutput
strOutput = "<MethodResult><Error>" & _
"<ErrorNumber>" & Err.Number & "</ErrorNumber>" & _
"<ErrorDescription>" & Err.Description &
"</ErrorDescription>" & _
"<ErrorSource>" & Err.Source & "</ErrorSource>" & _
"</Error></MethodResult>"
Call Response.Write(strOutput)
Response.End()
End Sub
' Added by Deepak on 2008-01-11
'To Check if conversion is required or not
Sub VerifyConversion()
' GetDictonaryValues()
End Sub
End Class
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
i m waiting for your reply...i believe that you would resolves tis problem
for sure...
-Deepak
+919886735837
(e-mail address removed)