RPC/编码 Jboss 问题
我正在运行 jboss-4.2.1.GA 来生成 WS 请求。
我在 JWSDP-2.0/JAXRPC 的帮助下创建了 WS 客户端。我已将客户端部署到 Jboss,现在正在尝试发送请求。
当我尝试初始化客户端服务时:javax.xml.rpc.Service service = servicefactory.createService(new URL(wsdlURL), serviceQN)
,Jboss开始抱怨。
Jboss生成的错误是:
错误[JBossXSErrorHandler] JBossWS_targetnamespace1.com7796329154971783225.xsd[域:http://www.w3.org/TR/xml-schema-1]::[key=src-resolve.4.2]::Message=src-resolve.4.2: 错误解决组件 'tns2:SimpleSerialiser'。原来是 检测到“tns2:SimpleSerialiser” 位于命名空间中 'http://targetnamespace2.com',但是 来自该命名空间的组件不是 可从模式文档中引用 '文件:/home/jbossPath/jboss-4.2.1.GA/server/default/tmp/jbossws/JBossWS_targetnamespace1.com7796329154971783225.xsd'。 如果这是不正确的命名空间, 也许是前缀 'tns2:SimpleSerialiser' 需要是 改变了。如果这是正确的 命名空间,然后是适当的 应添加“导入”标签 '文件:/home/jbossPath/mobaq/jboss-4.2.1.GA/server/default/tmp/jbossws/JBossWS_targetnamespace1.com7796329154971783225.xsd'。
随后出现警告:
警告[WSDL11Reader]编码风格 'http://schemas.xmlsoap.org/soap/encoding/' 不支持: {urn:命名空间}doTask
最后显示如下错误:
错误[STDERR] org.jboss.ws.WSException:不能 获取 java 类型映射: {urn:命名空间}ArrayOf_tns2_TagType 错误 [STDERR] 位于 org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildInputParameter(JAXRPCMetaDataBuilder.java:266) ... ...
我知道community.jboss中已发布类似错误 .org 过去但用于不同的任务。我不确定提供的补丁是否能解决我的问题,并且我不知道如何实施提供的补丁。
除此之外,我发现有人有类似的问题: JBoss 4.2.3 中的 JAX-RPC< /a> 但建议的解决方案对我不起作用。
我也知道 JbossWS 不支持 RPC/Encoded,但我使用 jboss 作为我的解决方案。 有没有办法解决这个问题,我不能让 Jboss 创建客户端服务来发送请求吗?我不确定请求 RPC/Literal WSDL 文件是否可行,所以这就是我问的原因。
任何建议将不胜感激。
I'm running jboss-4.2.1.GA to generate WS requests.
I have created the WS client with the help of JWSDP-2.0/JAXRPC. I have deployed the client to Jboss and I am now trying to send requests.
When I try to initialise the client service: javax.xml.rpc.Service service = servicefactory.createService(new URL(wsdlURL), serviceQN)
, Jboss starts to complain.
The error that Jboss generates is:
ERROR [JBossXSErrorHandler]
JBossWS_targetnamespace1.com7796329154971783225.xsd[domain:http://www.w3.org/TR/xml-schema-1]::[key=src-resolve.4.2]::Message=src-resolve.4.2:
Error resolving component
'tns2:SimpleSerialiser'. It was
detected that 'tns2:SimpleSerialiser'
is in namespace
'http://targetnamespace2.com', but
components from this namespace are not
referenceable from schema document
'file:/home/jbossPath/jboss-4.2.1.GA/server/default/tmp/jbossws/JBossWS_targetnamespace1.com7796329154971783225.xsd'.
If this is the incorrect namespace,
perhaps the prefix of
'tns2:SimpleSerialiser' needs to be
changed. If this is the correct
namespace, then an appropriate
'import' tag should be added to
'file:/home/jbossPath/mobaq/jboss-4.2.1.GA/server/default/tmp/jbossws/JBossWS_targetnamespace1.com7796329154971783225.xsd'.
Followed by a warning:
WARN [WSDL11Reader] Encoding style
'http://schemas.xmlsoap.org/soap/encoding/'
not supported for:
{urn:namespace}doTask
Finally, the following error is displayed:
ERROR [STDERR]
org.jboss.ws.WSException: Cannot
obtain java type mapping for:
{urn:namespace}ArrayOf_tns2_TagType
ERROR [STDERR] at
org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildInputParameter(JAXRPCMetaDataBuilder.java:266)
...
...
I know that a similar error has been posted in community.jboss.org in the past but for a different task. I am not sure if the patch provided will solve my issue and I don't know how to implement the patch provided.
In addition to this, I have found someone having similar issues: JAX-RPC in JBoss 4.2.3 but the suggested solution does not work for me.
I also know that JbossWS does not support RPC/Encoded but I use jboss for my solution.
Is there a way for me to get around this issue, can I not get Jboss to create the client service to send requests? I'm not sure requesting a RPC/Literal WSDL file is a possibility so that's why I am asking.
Any suggestions will be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
http://schemas.xmlsoap.org/soap/encoding/ 是使用的旧样式由非常旧的Web服务堆栈(它太糟糕了,甚至微软都建议不要这样做)。它存在严重缺陷,因此被排除在 WS-I 互操作性规范之外,该规范大多数现代 Java Web 服务堆栈都实现了。
据我所知,处理这些旧编码的唯一java堆栈是Axis 1,它本身就是严重的有缺陷,但可能是您唯一的选择。您应该能够从 JBoss 内部将 Axis 作为客户端运行。
http://schemas.xmlsoap.org/soap/encoding/ is a legacy style used by very old web service stacks (it's so bad, even Microsoft recommend against it). It was seriously flawed, and so was excluded from the WS-I interoperability spec, which most modern Java web service stacks implement.
The only java stack that I know of that handles these old encoding is Axis 1, which is itself seriously flawed, but may be your only option. You should be able to run Axis as a client from inside JBoss.
我最终通过实施 JBoss 4.2.3 中的 JAX-RPC 帖子:
我所做的是将上述 jar 与我自己的 WS 客户端 jar 文件放在一起这就是为什么它不起作用。解决方案就在那里,白纸黑字地摆在我面前,但我没有正确实施。当太长时间地密切关注一个问题时,这就是问题所在。
我是个麻木的人。
I finally solved the issue by implementing the solution suggested from JAX-RPC in JBoss 4.2.3 post:
What I was doing was putting the above jars with my own WS Client jar file and that's why it didn't work. The solution was there, in front of me in black and white and I didn't implement it properly. That's the problem when looking too closely to an issue for too long.
I am a numpty.