jscode2session调用时返回 40029 invalid code错误

展开阅读全文

客户端调用时header错误

11-21

搜索了一下: rn有说法是服务端 客户端时间不对 但是我都是本机 应该不存在这个问题rn还有说法是jar冲突 因为我工程用的jar包比较多 也不清楚是哪个jar包导致的?rnrn错误代码如下:rn[code=Java]rn2011-11-21 16:45:07 org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor handleMessagern警告: Request does not contain required Security header, but it's a fault.rnException in thread "main" javax.xml.ws.soap.SOAPFaultException: An error was discovered processing the headerrn at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)rn at $Proxy33.proxyMethod(Unknown Source)rn at client.SpringClient.main(SpringClient.java:32)rnCaused by: org.apache.cxf.binding.soap.SoapFault: An error was discovered processing the headerrn at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)rn at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)rn at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)rn at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)rn at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:99)rn at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)rn at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)rn at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)rn at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)rn at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)rn at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)rn at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)rn at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)rn at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)rn at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)rn at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)rn at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)rn at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)rn ... 2 morern[/code] 论坛

重载“+”调用时总是返回0

09-18

运算符重载代码rn[code=c]rnCPolynomial& CPolynomial::operator+(CPolynomial &right)rnrn CPolynomial cp; //临时变量存储运算结果rn cp.m_Polynomial = m_Polynomial; //放入原来的list数据rn list::iterator i;rnrn for (i = right.m_Polynomial.begin(); i != right.m_Polynomial.end(); i++)rn rn cp.AddOneTerm(*i);rn rn cout << "打印cp:";rn cp.Print();rn return cp;rnrn//重载“-”rnCPolynomial& CPolynomial::operator-(CPolynomial &right)rnrn CPolynomial cp; //临时变量存储运算结果rn cp.m_Polynomial = m_Polynomial;rn list::iterator i;rn for (i = right.m_Polynomial.begin(); i != right.m_Polynomial.end(); i++)rn rn i->cof *= -1;rn cp.AddOneTerm(*i);rn rn return cp;rnrn//重载“*”rnCPolynomial& CPolynomial::operator*(CPolynomial &right)rnrn CPolynomial cp; //临时变量存储运算结果rn list::iterator l; //迭代运算符左边的listrn list::iterator r; //迭代运算符右边的listrn for (r = right.m_Polynomial.begin(); r != right.m_Polynomial.end(); r++)rn rn for (l = m_Polynomial.begin(); l != m_Polynomial.end(); l++)rn rn Node temp;rn temp.cof = l->cof * r->cof;rn temp.deg = l->deg + r->deg;rn cout << "cof:" << temp.cof << "deg:" << temp.deg << endl;rn cp.AddOneTerm(temp);rn rn rn return cp;rnrn//重载“=”rnCPolynomial& CPolynomial::operator=(CPolynomial &right)rnrn m_Polynomial = right.m_Polynomial;rn return *this;rnrn[/code]rnp3 = p1 + p2;调用之后返回0rn[img=https://img-bbs.csdn.net/upload/201509/18/1442591324_538048.png][/img] 论坛

JavaBean调用时不执行

10-19

//bbsreg.javarnpackage twm;rnimport java.sql.*;rnrnpublic class bbsreg rn String sDBDriver;rn String sConncStr;rn Connection conn;rn ResultSet rs;rnpublic bbsreg()rn String url="jdbc:mysql://localhost:3306/bbs";rn sDBDriver="com.mysql.jdbc.Driver";rn conn=null;rn rs=null;rn String user="root"; rn String password="6949453";rn tryrn Class.forName(sDBDriver);//加载数据库rn conn=DriverManager.getConnection(url,user,password);//连接数据库rn [color=#0000FF]System.out.println("数据库连接成功!");[/color]可以打印输出 catch(ClassNotFoundException e)rn System.out.println(e.getMessage());rn catch(SQLException e) rn System.out.println("cannot connect the sql"); rnrnpublic ResultSet executeQuery(String sql) //创建查询结果集rn rs=null;rn tryrn Statement statement=conn.createStatement();rn rs=statement.executeQuery(sql);rn [color=#0000FF]System.out.println("正在查询!");[/color]不执行!! catch(SQLException e)rn System.out.println(e.getMessage()); rn rn return rs;rn rnpublic void executeUpdate(String sql)rn tryrn Statement statement=conn.createStatement();rn statement.executeUpdate(sql);rn catch(SQLException e)rn System.out.println(e.getMessage()); rn rnrnrn--------------------------------------------------------------------------------------------------------rn注册页面跳转到此页面。rn<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>rn<%@ page import="java.sql.*" %>rnrn<% %>rn<%rnString path = request.getContextPath();rnString basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";rn%>rnrnrnrn rn rn rn My JSP 'chklogin.jsp' starting pagern rn rn rn rn rn rn rnrn rn rn rn <%request.setCharacterEncoding("gb2312");rn String sql="";rn ResultSet rs;rn String username=request.getParameter("username");rn String password=request.getParameter("password");rn //out.println(username+password);rn if(username!=null&&username.equals(" ")) rn tryrn rn sql="select * from user where username='"+username+"'and userpassword='"+password+"'";rn rs=conn.executeQuery(sql);rn [color=#0000FF] System.out.println("调用JavaBean!");调用JavaBean!打印不出来[/[/color]rn if(rs.next())rn // session.setAttribute("login","ok");rn //session.setAttribute("username",username);rn %>rn rn 若无法跳转,请点击这里rn <%elsern out.println("错误的用户名或密码!");rn out.println("返回"); rn catch(Exception e)rn e.printStackTrace(); %>rn rnrn 论坛

EJB调用时的问题

04-26

EJB发布到服务器后我用简单的java测试通过,就是Jbuuilder自动生成的那个,填上相关的数据测试的。 对方用jsp测试,数据发送过来也可以正确的写入到这边的数据库里面。rn可是问题是当对方用他的系统真的发送数据的时候出现如下错误:rnjava.sql.SQLException: java.sql.SQLException: javax.naming.NameNotFoundException: Unable to resolve 'NFJF_TEST' Resolved [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'NFJF_TEST' Resolved ]; remaining name 'NFJF_TEST'rnat weblogic.jdbc.jts.Driver.createRemoteConnection(Driver.java:403)rnat weblogic.jdbc.jts.Driver.connect(Driver.java:161)rnat weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:344)rnat com.dreamtel.db.conn.dbConnect.getConnection_ex(dbConnect.java:65)rnat com.dreamtel.db.conn.dbConnect.transBegin_ex(dbConnect.java:110)rnat com.dreamtel.interfaces.InterfacesBean.insert(InterfacesBean.java:78)rnat com.dreamtel.interfaces.Interfaces_kuhd1g_EOImpl.insert(Interfaces_kuhd1g_EOImpl.java:149)rnat com.dreamtel.interfaces.Interfaces_kuhd1g_EOImpl_WLSkel.invoke(Unknown Source)rnat weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:491)rnat weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:120)rnat weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:434)rnat weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)rnat weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)rnat weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:429)rnat weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)rnat weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)rnNFJF_TEST数据源在服务器是存在而且可用的阿rn还望大家多多帮忙rn谢谢rnat weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)rn 论坛

XFire+hibernate+Spring 调用时报错!!

06-22

这是错误信息:rnJava code[DEBUG] [org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:115)] erPipeline - Invoking phase servicern[DEBUG] [org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:129)] erPipeline - Invoking handler org.codehaus.xfire.client.ClientReceiveHandler in phase servicernException in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Faultrnorg.codehaus.xfire.fault.XFireFault: Faultrn at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)rn at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)rn at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)rn at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)rn at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)rn at org.codehaus.xfire.client.Client.onReceive(Client.java:406)rn at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)rn at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.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.GetJLSet(Unknown Source)rn at jia.tf.Test.testSHXFire(Test.java:67)rn at jia.tf.Test.main(Test.java:51)rnrnrn调用:rnJava codeService service = new ObjectServiceFactory().create(ICheckLogin.class);rn XFireProxyFactory proxyFactory = new XFireProxyFactory(XFireFactory.newInstance().getXFire());rn String url = "http://localhost:8080/computation/services.ws";rn ICheckLogin login = (ICheckLogin) proxyFactory.create(service, url);rn// System.out.println(login.test("123"));rn List listf = login.GetJLSet();rn for(FlSysSet fss : listf)rn rn System.out.println(fss.getCmemo());rn rnrnrn配置文件:rnXML codern rn rn rn rnrn 论坛

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