当 websphere 升级时,如何恢复 xsd:sequence 包装器中 xsd:elements 的原始顺序?

发布于 2024-09-30 06:38:09 字数 745 浏览 0 评论 0原文

因此,围绕这些部分有一个相当古老的项目。它使用 Java 1.4 和 XFire 来生成代码优先的 Web 服务(我知道,我知道,最佳实践......)。不管怎样,领导们最近决定每个人现在都需要Websphere 7!

升级到 Websphere 7 显着改变了 WSDL。例如,之前,如果这是顺序(可能不是有效的 XML,但我想您会明白我的意思)

<xsd:sequence>
    <xsd:element type="xsd:date" name="blah" />
    <xsd:element type="xsd:string" name="blah2" />
</xsd:sequence>

新顺序在某些地方是这样的,这会破坏尝试使用(功能)服务的旧设备:

<xsd:sequence>
    <xsd:element type="xsd:string" name="blah2" />
    <xsd:element type="xsd:date" name="blah" />
</xsd:sequence>

现在,我建议他们采用旧的 WSDL 并使用 XFire 来仅使用静态(即不是代码生成的)WSDL 来部署它以进行修复。

但是有没有办法让 Websphere 7自动更改顺序?这甚至是 Websphere 7 的错吗(也许是 XFire?)

So, there's a project around these parts that's pretty old. It's using Java 1.4 and XFire to produce code-first web services (I know, I know, best practices...). Anyways, the heads have recently decided everyone needs Websphere 7 now!

Upgrading to Websphere 7 changed the WSDL significantly. For example, before, if this was the order (probably not valid XML but I think you'll catch my meaning)

<xsd:sequence>
    <xsd:element type="xsd:date" name="blah" />
    <xsd:element type="xsd:string" name="blah2" />
</xsd:sequence>

The new order is this in places, which breaks the older devices which attempt to use the (functional) service:

<xsd:sequence>
    <xsd:element type="xsd:string" name="blah2" />
    <xsd:element type="xsd:date" name="blah" />
</xsd:sequence>

Now, I've suggested that they take their old WSDLs and use XFire to just use the static (i.e. not code-generated) WSDLs to deploy it for a fix.

But is there some way to get Websphere 7 to not automatically change the order? Is it even Websphere 7's fault (maybe XFire?)

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

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

发布评论

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

评论(1

不弃不离 2024-10-07 06:38:09

您无法更改顺序,因为它是由服务器生成的。您可以在 Websphere 中更改您的 java 文件以适合您的原始 wsdl。如果我是你,我会从原始的 wsdl 生成 java 文件。

You can't change the order, as it is generated by the server. You can change your java file in Websphere to fit your original wsdl. If I were you I would generate the java files from the original wsdl.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文