用soapui调用linux上weblogic发布的webservice与weblogic报错解决办法,用什么工具测试cxf服

温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
敬请期待中... ...
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(1354)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
在LOFTER的更多文章
loftPermalink:'',
id:'fks_',
blogTitle:'解决CXF webService 调用报错: “Cannot create a secure XMLInputFactory”',
blogAbstract:'具体修改代码如下:package com.safein.web.import java.util.Pimport javax.servlet.ServletContextEimport javax.servlet.ServletContextLimport org.apache.log4j.L/** * 系统初始化 * @author julong * @date
下午05:27:47 */public class SealManageListener implements ServletContextListener {',
blogTag:'cxf,cxf报错',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:6,
publishTime:0,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'敬请期待中... ...',
hmcon:'1',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}&&&& 公司项目正式环境为weblogic,开发及测试环境都是tomcat。正常启动,在测试调用一个cxf接口时,抛出Caused by: java.lang.ClassCastException: weblogic.xml.stax.XMLStreamInputFactory cannot be cast to javax.xml.stream.XMLInputFactory 异常,而在tomcat下正常。立马判断是jar包冲突。百度后各种方法试了个遍,结果仍旧不行。无论是设置优先加载项目中的jar包还是设置环境。无奈之下只好逐个分析并检查有调用stax解析xml操作的jar包,经过测试后发现geronimo-stax-api_1.0_spec-1.0.jar与weblogic下冲突。删除项目中的这个jar包,调用OK。
以上就介绍了weblogic下调用CXF的webservice接口报错,包括了方面的内容,希望对Java教程有兴趣的朋友有所帮助。
本文网址链接:/article/detail_286516.html
上一篇: 下一篇:& 相关文章 &
Webservice调用服务端 Unmarshalling Error: unexpected element (Xxx). Expected elements are Xxx
使用Axis2调用CXF服务端Webservice方法时: 报错:Unmarshalling Error: unexpected element (uri:"http://ejb.", local:"xmldata"). Expected elements are &{}arg0& 详细信息如下: org.apache.axis2.AxisFault: Unmarshalling Error: unexpected element (uri:"http
Unmarshalling Error: unexpected element 错误的解决
使用ksoap2连接cxf 的webservice时, 如果不带参数可以正常返回,带参数则报如下异常:
org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"/", local:"arg0"). Expected elements are &{}arg1&,&{}arg0& 解决方法
SoapSerializationEnvelope
, unwinding now org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"", local:"_return"). Expected elements are &{}return&
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:872
在使用cxf实现webservice时,经常碰到的问题就是如果在服务端,修改了一个接口的签名实现,如增加一个字段,或者删除一个字段。在这种情况下,在默认的配置中,就会报以下的错误信息: org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element . Expected elements are 这种错误即客户端使用的传输对象与服务端接收的参数的字段不匹配。但如果,每次修改服务端的实现,都需要更新客户端时,就会
报错信息,是项目实施中遇到的问题。解决方案是基于网上各路豪侠的解决方案综合得出的。 1.org.apache.cxf.binding.soap.SoapFault: "http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP version.
解决方法:某些webservice定义的不符合标准规范,调用的时候需要去掉后边的?wsdl,如
利用CXF发布webService的小demo
: unexpected element (uri:"", local:"arg0"). Expected elements are &{链接地址}name& 这个是由于我们在服务端明确指出了参数名name照成的,别担心,改下就行了 @WebService( targetNamespace = "链接地址") public interface SayCXFClient { @WebMethod @WebResult //下面的name="wsdl中暴露出来的接口参数名称" public
在尝试写RMI程序时,如果没有指定RMI的Codebase,程序执行注册的bind或rebind方法时,会报ClassNotFoundException错:
Server exception: java.rmi.ServerException: RemoteException occur nested exception is: java.rmi.UnmarshalException: error unmarshalling
webservice
客户端。 (1)调用cxf中的wsdl2java工具:具体方法为在控制台上cd到客户端程序的src文件夹 然后执行命令wsdl2java “服务端暴露的地址?wsdl”在src中生成客户端文件。 wsdl文档是公开的,web service definition language(webservice的描述文档) 。任何语言实现了webservice都需要提供并暴露wsdl文档。根据wsdl不能推出webservice的 实现语言 (2)找到wsdl2java生成的类中一个集成service的类
org.springframework.remoting.RemoteAccessException: Could not access remote service [rmi:rmi接口地址]; nested exception is java.rmi.UnmarshalException: error unmarshalling nested exception is:
java.io.WriteAbortedException: writing aborted
webservice
之后,点击Arguments,在Program arguments里面输入。点击Run. 如下图 我们在c:/WS/source 下面就可以看到代码了。如果是服务端的话,有对应的wsdd部署文件生成
2. 自己开发的Java 类以webservice形式发布。 流程:Java---&class---&wsdl---&Java----&打包----&发布 Java---&class 就不多说了 class---&wsdl. 找到Java2wsdl类的main方法,输入它的参数,然后生成。 wsdl----&Java .就是上面的了,多个参数-s。 打包Ant。下次继续
webservice
:55:48 PDT)--& &wsdl:types& &schema elementFormDefault="qualified" targetNamespace="http://ws.ci.cml.web." xmlns="http://www.w3.org/2001/XMLSchema"& &element name="accountCheck"& &complexType& &sequence& &element name="caseId" type="xsd
: RemoteException occur nested exception is:
java.rmi.UnmarshalException: error unmarshalling nested exception is:
java.net.MalformedURLException: no protocol:
5.0 / webapps / ra / WEB - INF / classes
in the W3C XML Schema Language. This schema defines a &Collection& as an element that has a complex type. This means that it has child elements, in this case, &book& elements. Each &book& element also has a complex type named bookType . The &book& element
CXF WebService中传递复杂类型对象
+ "#" + this.email + "#" + this.
} 下面的是集合传递Users,CXF直接传递集合对象会出现异常,用一个对象包装下就Ok了,不知道是什么原因。异常信息如下: DefaultValidationEventHandler: [ERROR]: unexpected element(uri:"", local:"item") org.apache.cxf.interceptor.Fault: Unmarshalling Error
syntax error: unexpected end of file
syntax error: unexpected end of file
/cache.c:348: error: expected ‘)’ before ‘*’ token pgasync/cache.c:355: error: array type has incomplete element type pgasync/cache.c:356: error: ‘PyCFunction’ undeclared here (not in a function) pgasync/cache.c:356: error: expected ‘}’ before
constant 整型常量错误 error 8: String constant exceeds line 字符串常量超过一行 error 10: Unexpected end of file 文件非正常结束 error 11: Line too long 行太长 error 12: Type identifier expected 未定义的类型标识符 error 13: Too many open files 打开文件太多 error 14: Invalid file name 无效的文件名 error
soap error 错误对照表
fault (SOAP 1.2 Receiver fault)
SOAP_TAG_MISMATCH
An XML element didn't correspond to anything expected
An XML Schema type mismatch
SOAP_SYNTAX_ERROR
An XML syntax error occurred on the input
SOAP_NO_TAG
= in.readLong();
} catch (Exception readEx) {
throw new UnmarshalException("error unmarshalling call header",
* Since only system classes (with null class loaders
整型常量错误 error
8: String constant exceeds line
字符串常量超过一行 error 10: Unexpected end of file
文件非正常结束 error 11: Line too long
行太长 error 12: Type identifier expected
& 2012 - 2016 &
&All Rights Reserved. &
/*爱悠闲图+*/
var cpro_id = "u1888441";2009年6月 挨踢职涯大版内专家分月排行榜第二2009年5月 挨踢职涯大版内专家分月排行榜第二2009年3月 挨踢职涯大版内专家分月排行榜第二2008年12月 挨踢职涯大版内专家分月排行榜第二
2009年6月 Web 开发大版内专家分月排行榜第三
本帖子已过去太久远了,不再提供回复功能。8099人阅读
一个cxf&webservice项目部署到tomcat能正常运行,客户端也能正常调用。
然后我部署到weblogic,同样能成功访问wsdl,但是客户端请求就报错cannot&create&a&secure&XmlInputFactory。
&后面按照网上说的只要在cxf&webservice项目路径下(WebContent\WEB-INF\weblogic.xml)增加这个XML文件
内容如下:
&?xml version=&1.0& encoding=&UTF-8& ?&
&weblogic-web-app xmlns=&/ns/weblogic/weblogic-web-app& xmlns:xsi=&http://www.w3.org/2001/XMLSchema-instance& xsi:schemaLocation=&/ns/weblogic/weblogic-web-app /ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd&&
&container-descriptor&
&index-directory-enabled&true&/index-directory-enabled&
&prefer-web-inf-classes&true&/prefer-web-inf-classes&
&/container-descriptor&
&/weblogic-web-app&
就可以了。
深究其原因应该是weblogic里面自带的jax-ws包把项目里的cxf包冲掉了。所以,上面的XML配置是为了使项目的jar包优先导入与weblogic的jar包。
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:47316次
排名:千里之外
原创:19篇
(1)(1)(1)(2)(1)(2)(1)(3)(1)(3)(2)(1)

我要回帖

更多关于 soapui模拟webservice 的文章

 

随机推荐