第一个数据全局网关 API - 无效 XML 问题

发布于 2024-10-09 22:51:25 字数 1007 浏览 10 评论 0原文

我正在将 First Data Global Gateway API 实现到 Java 电子商务 Web 应用程序中。我遇到的问题是收到一条错误消息

SGS-020003:无效的 XML

从 staging.linkpt.net 服务器返回无效 XML。通过关闭可选实体,我设法找到了有问题的实体。它是运输实体。我里面有以下数据:

<shipping>  
   <zip>10105</zip>  
   <phone>123456789</phone>  
   <email>[email protected]</email>  
   <name>DJBla</name> <state>NY</state>  
   <address1>some city</address1>  
   <address2>suite 6</address2>
   <city>New York</city> 
   <country>US</country>
</shipping>

根据 First Data Global Gateway 用户手册版本 1.1 我的 XML 一切都是正确的。有人知道错误可能出在哪里吗?

亲切的问候,
格奥尔格

i am implementing the First Data Global Gateway API into a Java E-Commerce Web application. The problem that i have is that I get an error message

SGS-020003: Invalid XML

returned from the staging.linkpt.net server. By switching the optional entities off, I managed to locate the problematic entity. It is the Shipping entity. I have the following data inside it:

<shipping>  
   <zip>10105</zip>  
   <phone>123456789</phone>  
   <email>[email protected]</email>  
   <name>DJBla</name> <state>NY</state>  
   <address1>some city</address1>  
   <address2>suite 6</address2>
   <city>New York</city> 
   <country>US</country>
</shipping>

According to the First Data Global Gateway User Manual Version 1.1 everything is correct with my XML. Would anyone have an idea where the error could be?

Kind Regards,
B.Georg

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

多彩岁月 2024-10-16 22:51:25

我对 First Data Global 不了解,但我会尝试提供一些基本的 XML 建议。阅读规范时,您引用的某些运输方法需要的字段不在您的示例中 - 您确定您没有使用这些方法(即使是默认情况下)?

我会建议其他实验 - 采取他们手册中的示例,看看它们是否有效 - 那么至少你知道你没有违反系统程序。另请查看是否存在 XSD 架构以及您的文件是否根据它进行验证。尝试插入有时需要的元素,看看是否无法引发错误。此外,错误消息通常并不总是那么精确 - 也许不是“运输”的内容是错误的,而是运输本身的位置 - 也许不允许它作为其父级的子级(没有更多信息我认为没有人可以提供帮助)。

I have no idea about First Data Global but I will try to offer some basic XML suggestions. Reading the spec you quote some of the shipping methods require fields that are not in your example - are you sure that you have not used those methods (even by default)?

I would suggest other experiments - take the examples in their manual and see if they work - then at least you know you are not violating the system procedures. Also see if there is an XSD schema and whether your file validates against it. Try inserting the sometimes-required elements and see if that fails to throw errors. Also error messages are often not always as precise as they might be - maybe it is not the contents of the "shipping" that are wrong, but the placement of the shipping itself - maybe it is nt allowed as a child of its parent (without further info I don't think anyone can help).

旧街凉风 2024-10-16 22:51:25

这不是理想的解决方案,但问题似乎与 标签有关。只需删除它即可解决我的问题。

<shipping>  
  <zip>10105</zip> 
  <email>[email protected]</email>  
  <name>DJBla</name> <state>NY</state>  
  <address1>some city</address1>  
  <address2>suite 6</address2>
  <city>New York</city> 
  <country>US</country>
</shipping>

Not the ideal solution, but the problem seem to be related to the <phone> tags. Just removing it solve my issue.

<shipping>  
  <zip>10105</zip> 
  <email>[email protected]</email>  
  <name>DJBla</name> <state>NY</state>  
  <address1>some city</address1>  
  <address2>suite 6</address2>
  <city>New York</city> 
  <country>US</country>
</shipping>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文