我这收藏的一个文章 你看下有用没http://searchwebservices.techtarget.com.cn/tips/174/2131674.shtml

解决方案 »

  1.   


    我也是在网上查了一些文章,写了一个,结果总是说:(400)Bad Request!我都要晕死了!
      

  2.   

    我是这么写的:                 String userNo=request.getParameter("userNo");
                     String passwd=request.getParameter("passwd");
                     
                     
                     String endpoint ="http://192.168.101.20:8885/service.asmx?WSDL";                 Service  service = new Service();
                     Call     call    = (Call) service.createCall();                 call.setTargetEndpointAddress( new java.net.URL(endpoint) );
                     call.setOperation(new QName("http://tempuri.org/"), "CheckCard");
                     
                     call.setUseSOAPAction(true);
                     call.setSOAPActionURI("http://tempuri.org/CheckCard");
                     call.addParameter("userNo",org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN );
                     
                     call.addParameter("passwd",org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN );
                                      Boolean ret = (Boolean) call.invoke("http://tempuri.org/", result,new Object[] { userNo,passwd });
      

  3.   

    最后那句是:
    Boolean ret = (Boolean) call.invoke("http://tempuri.org/", new Object[] { userNo,passwd });