调用web service时,中文无法转换,出现异常CX_SY_CONVERSION_CODEPAGE

在调用SAP外部的web service时,涉及到中文部分,转换在dev,qas可以正常,但在PRD无法使用。

因代码,在服务端,客户端都一致,初步怀疑如下:

1,服务端,测试系统与正式系统,字符集不一致。(需确认)

2,客户端SAP的版本不一致,但验证无区别。

 

临时解决方案:

转换为16进制,有服务端进行解析。

跟因需要进一步的分析。

展开阅读全文

调用web Service 出现异常

08-07

AxisFaultrn faultCode: http://schemas.xmlsoap.org/soap/envelope/Server.userExceptionrn faultSubcode: rn faultString: java.lang.reflect.InvocationTargetExceptionrn faultActor: rn faultNode: rn faultDetail: rn http://xml.apache.org/axis/hostname:serverrnrnjava.lang.reflect.InvocationTargetExceptionrn at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)rn at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)rn at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)rn at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)rn at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)rn at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)rn at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)rn at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)rn at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)rn at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)rn at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)rn at org.apache.axis.client.Call.invokeEngine(Call.java:2765)rn at org.apache.axis.client.Call.invoke(Call.java:2748)rn at org.apache.axis.client.Call.invoke(Call.java:2424)rn at org.apache.axis.client.Call.invoke(Call.java:2347)rn at org.apache.axis.client.Call.invoke(Call.java:1804)rn at TEST.webGetxml(TEST.java:1995)rn at TEST.main(TEST.java:2264)rn 论坛

在struts中调用web service出现异常

04-22

用MyEclipse开发了个WebService,写个类在main方法中可以调用。但是在struts的action中以客户端调用。则出现下面的异常:rnjava.lang.NoClassDefFoundError: org/apache/commons/httpclient/Credentialsrn at java.lang.Class.getDeclaredConstructors0(Native Method)rn at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)rn at java.lang.Class.getConstructor0(Unknown Source)rn at java.lang.Class.getConstructor(Unknown Source)rn at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:108)rn at org.codehaus.xfire.transport.http.XFireServletChannel.send(XFireServletChannel.java:48)rn at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)rn at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)rn at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)rn at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)rn at org.codehaus.xfire.client.Client.invoke(Client.java:336)rn at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)rn at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)rn at $Proxy0.example(Unknown Source)rn at com.liang.struts.action.CalcAction.execute(CalcAction.java:90)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.liang.common.EncodingFilter.doFilter(EncodingFilter.java:44)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Unknown Source)rn附action中的调用代码:rn org.codehaus.xfire.service.Service srvcModel = new ObjectServiceFactory().create(Iadd.class); rn XFireProxyFactory factory = new XFireProxyFactory(XFireFactory.newInstance().getXFire()); rn String wsURL = "http://localhost:8080/test/services/add?wsdl"; rn try rn Iadd srvc = (Iadd)factory.create(srvcModel, wsURL); rn d = srvc.assess(username, project); rn catch (MalformedURLException e) rn e.printStackTrace(); rn rn在网上没有找到相关的解决方法,请各位指教,谢谢了! 论坛

web service 为什么无法调用

01-19

拷贝到本机的D:\Inetpub\wwwroot\test,属性中也创建了应用,但是利用vs2005创建的程序调用时报错,rn“/test”应用程序中的服务器错误。rn--------------------------------------------------------------------------------rnrn访问 IIS 元数据库失败。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Web.Hosting.HostingEnvironmentException: 访问 IIS 元数据库失败。 rnrn用于运行 ASP.NET 的进程帐户必须具有对 IIS 元数据库(如 IIS://servername/W3SVC)的读访问权。有关如何修改元数据库权限的信息,请参见 http://support.microsoft.com/?kbid=267904。rnrn源错误: rnrn执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 rnrn堆栈跟踪: rnrnrn[HostingEnvironmentException: 访问 IIS 元数据库失败。]rn System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +3609834rn System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath2.MapPath(String siteID, VirtualPath vpath) +9rn System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +169rn System.Web.CachedPathData.GetConfigPathData(String configPath) +382rn System.Web.CachedPathData.GetConfigPathData(String configPath) +243rn System.Web.CachedPathData.GetApplicationPathData() +68rn System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +3503459rn System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +189rnrn rnrnrn--------------------------------------------------------------------------------rn版本信息: Microsoft .NET Framework 版本:2.0.50727.832; ASP.NET 版本:2.0.50727.832 论坛

没有更多推荐了,返回首页