org.apache.axiom.om.util.AXIOMUtil无法解析 [英] org.apache.axiom.om.util.AXIOMUtil cannot be resolved

查看:264
本文介绍了org.apache.axiom.om.util.AXIOMUtil无法解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为WSDL生成一些存根(使用xmlbeans),并不断遇到一些问题.我正在使用以下页面:

I'm trying to generate some stubs for a WSDL (using xmlbeans) and keep running into some issues. I'm using the following page:

http://axis.apache.org/axis2/java/core/docs/userguide-creatingclients-xmlbeans.html

我跳过的这些步骤中仅有的一部分是"client.java"部分,因为我已经准备好另一个项目,我想将生成的jar插入其中.快速浏览以下步骤:

The only part of these steps that I'm skipping is the "client.java" part because I already have another project ready I want to plug the resulting jars into. A quick run down of my steps are as follows:

  • 我的WSDL是一个crmonline实例,所以我运行类似这样的内容:

C:\ Work \ aaa2> WSDL2Java -uri https://mycrmorgname.crm.dynamics.com/XRMServices/2011/Organization .svc?wsdl -p crmsdk -d xmlbeans -s -o c:\ mystubfolder

C:\Work\aaa2>WSDL2Java -uri https://mycrmorgname.crm.dynamics.com/XRMServices/2011/Organization.svc?wsdl -p crmsdk -d xmlbeans -s -o c:\mystubfolder

  • 我使用"ant"构建项目

    • I build the project using "ant"

      在我的客户端"项目中,我引用了在.\ build \ lib

      In my "client" project I reference the 2 jars created in .\build\lib

      一旦我添加了所有axis2/apache引用等,我的项目就可以正常构建,但是当我通过playframework启动它时,当我点击首页时会出错.第一个错误似乎是:

      My project builds fine once I add all my axis2 / apache references etc, but when I launch it through playframework I get errors when I hit the first page. The first error seems to be:

      17:48:45,289 ERROR ~ Error in ControllersEnhancer. 
      controllers.ProfileController.editProfile has not been properly enhanced 
      (fieldAccess javassist.expr.FieldAccess@212ca458).
      

      或类似的东西.向下滚动浏览错误,可以看到我得到了这个信息:

      or something similar to that. Scrolling down through the error I can see that I'm getting this:

      The file /app/models/MyDynamicsClient.java could not be compiled. 
      Error raised is : org.apache.axiom.om.util.AXIOMUtil cannot be resolved
      

      现在,我什至还没有点击任何Web服务,甚至还没有实例化任何我的课程……我不知道为什么会这样.或者更准确地说,我到底搞砸了!我是否缺少对某事的参考?在AXIOMUtil上进行搜索会告诉我这应该在Axiom-api中(我的版本是Axiom-api-1.2.10.jar).我引用了这个,似乎没有帮助.或者也许我在某处做错了其他事情?

      Now, I haven't even hit any of my web services yet, or even instantiated any of my classes ... I'm at a loss as to why this is happening. Or to be more accurate, what exactly am I messing up! Am I missing a reference to something? Doing a search on AXIOMUtil tells me this should be in Axiom-api (version I have is Axiom-api-1.2.10.jar). I have this referenced and doesn't seem to help. Or maybe I'm doing something else wrong someplace?

      有关版本的一些详细信息:

      Some details on versions:

      • Axis2 1.5.4
      • Apache-ant 1.8.3

      任何帮助将不胜感激!

      推荐答案

      好吧,在尝试了许多不同的事情并重新阅读了站点/说明之后,我意识到自己做错了.或者至少我想出了一些我可以做的不同的事情来解决问题.

      Ok, after trying a lot of different things and rereading the sites/instructions I realised what I was doing wrong. Or at least I figured out a couple of things that I started to do differently that fixed the problem.

      首先,我将另一个示例项目中的jar文件用于apache http组件.我不知道这是否会产生影响,但是无论如何我还是下载了一个新版本并引用了那些JARS.

      Firstly, I was using jar files from another sample project for the apache http components. I don't know if this had an impact, but I downloaded a fresh version of this anyway and referenced those JARS instead.

      此外,我没有在我的存根"项目中创建jar,而是引用了这些jar,而是将所有生成的存根/类直接复制到现有的客户端项目中.我觉得这可能是解决我的问题的原因.或将其与我上一步所做的混合!

      Also, instead of creating jars in my "stub" project and referencing those I copied all the generated stubs/classes directly into the existing client project. I have a feeling this might have been what fixed my problem. Or maybe a mix of this and the previous step I did!

      所以我的新步骤如下:

      1. 确保已为所需组件下载了所有正确的版本.就我而言,我有以下内容:

      1. Ensure you have all the correct versions downloaded for required components. In my case I have the following:

      • Apache Axis 2 v 1.5.4
      • Apache HTTP组件客户端4.1.3
      • Apache-ant 1.8.3

      将Axis2和HTTP Components库中的所有JARS复制到您的客户端项目中,并引用它们.

      Copy all the JARS from the Axis2 and HTTP Components libs into your client project and reference them.

      使用WSDL2Java在自己的项目中创建存根和类.

      Use WSDL2Java to create your stubs and classes within it's own project.

      确保使用Ant构建项目

      Ensure the project builds using Ant

      将src文件夹中所有生成的类文件复制到客户端的源文件夹中.

      Copy all the generated class files within the src folder into the source folder of your client.

      修复其他参考问题并构建

      Fix any other reference isssues and Build

      非常感谢,这让我走了.

      Thankfully this got me going.

      这篇关于org.apache.axiom.om.util.AXIOMUtil无法解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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