GWT 和一个 jaxb 对象 [英] GWT and a jaxb objects

查看:32
本文介绍了GWT 和一个 jaxb 对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 GWT 在客户端构建对象,这些对象将被发送到其他地方的 Web 服务.这些对象是通过 JAX-WS 生成的,我很确定使用 jaxb 从 wsdl 中的 xsds 构建对象.

I am trying to use GWT to build objects on the client side that would be sent to a web service elsewhere. These objects are generate through JAX-WS which I am pretty sure uses jaxb to build objects from the xsds that are in the wsdl.

无论如何,GWT 应该能够通过忽略注释或其他方式来支持这一点,但它对我不起作用.这是我遇到的错误之一:

Anyhow, GWT was supposed to be able to support this by ignoring annotations or whatever, but it isn't working for me. Here is one of the errors that I am getting:

Line 4: The import javax.xml.bind cannot be resolve

我正在使用 GWT 2 和用于 Eclipse 的 Google 插件.

I am using GWT 2 and the Google plugin for Eclipse.

推荐答案

如果您在 GWT 编译路径中包含 javax.xml.bin.annotation 包中的源文件,您可以在客户端上使用生成的 JAXB 对象.您可能还需要包含来自 javax.xml.bind 和 javax.xml.bind.annotation.adapters 的一些源文件才能编译.

You can use your generated JAXB objects on the client if you include the source files from the javax.xml.bin.annotation package in your GWT compile path. You may need to include a few source files from javax.xml.bind and javax.xml.bind.annotation.adapters as well to get it to compile.

这篇关于GWT 和一个 jaxb 对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆