我收到了错误"未说明的错误"当我解析包含base64字符串的XML(file.pdf)时。当我没有发送base64字符串时,XML被接受,我得到了我需要的响应。它不像base64字符串错误,因为我测试了字符串,结果没问题。
我使用的VBScript和XML的一部分。
的VBScript:
Dim xmlDoc
Dim oHTTP
Dim Information
Dim strAuth
Dim PutDeliveryRequest
Dim terug
Dim doc
Dim xmlString
Dim IssuerAssignedID
Dim aParts, aCredentials, strType, strBase64, strPlain, strUser, strPassword, alles, sitenaam, brealmN, ivbId
'strAuth = Request.ServerVariables("HTTP_AUTHORIZATION")
'alles = Request.ServerVariables("ALL_HTTP")
Set oHTTP = Server.CreateObject("DllLib.GetDataFromDB")
sitenaam = Request.ServerVariables("HTTP_HOST")
If sitenaam = "soap.fbt.vgsoftware.nl" Then
brealmN ="Fbt" '----------een ivb
ivbId = 1
IssuerAssignedID = "8719604178115"
End If
If sitenaam = "soap.bwals.vgsoftware.nl" Then
brealmN ="BWals" '----------een ivb
ivbId = 2
IssuerAssignedID = "8719604094330"
End If
If sitenaam = "soap.bvh.vgsoftware.nl" Then
brealmN ="Baltus" '----------een ivb enz enz
ivbId=3
IssuerAssignedID = "3333"
End If
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = "false"
xmlDoc.Load(Request)
If xmldoc.ParseError <> 0 Then '--------------------------------foute xml ,
response.Write "<?xml version=""1.0"" ?><env:Envelope xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/""><env:Body><Error><Message>"& xmldoc.ParseError.Reason & " " & xmldoc.ParseError.ErrorCode & "</Message></Error></env:Body></env:Envelope>"
response.End
Ind If
If (oHTTP.CheckUsers(xmlDoc.Xml) = True) Then
xmlString = oHTTP.StringXml(xmlDoc.Xml, sitenaam, IssuerAssignedID)
Response.Write xmlString
Else
Response.Write "<?xml version=""1.0"" ?><env:Envelope xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/""><env:Body><Error><Message>Gebruiker niet geauthorizeerd.</Message></Error></env:Body></env:Envelope>"
End If
XML:
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<PutOrderRequest xmlns="http://www.edibulb.nl/XML/Order:2" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ebram="urn:ebl:edibulb:xml:data:draft:ReusableAggregateBusinessInformationEntity:2" xsi:schemaLocation="http://www.edibulb.nl/XML/Order:2 http://www.edibulb.nl/XML/Order/Order-2_00.xsd">
<body>
<OrderDocument>
<ebram:NameText>kb_1054595.pdf</ebram:NameText>
<ebram:AttachedBinaryFile>
<ebram:FileName>kb_1054595.pdf</ebram:FileName>
<ebram:IncludedBinaryObject mimeCode="application/pdf" encodingCode="7">JVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovUGFnZXMgMiAwIFIKL1...
</ebram:IncludedBinaryObject>
</ebram:AttachedBinaryFile>
</OrderDocument>
</Body>
</PutOrderRequest>
</env:Body>
</env:Envelope>
更新1
错过的标签在这个问题上是错误的。但错误仍然存在。
错误仅在由pdf形成的几个base64字符串中产生。
在单词2010中创建pdf时,字符串被接受,但是从另一个程序生成的pdf会出现此错误。
更新2
问题是解决问题的一步。
它需要一些测试,但显然它的soap服务器无法处理在xml内部发送的base64文件的大小。