大家可以看一下这人地址
http://218.240.13.80:8090/wms/service/ConsoleService?wsdl1、里面有个方法 callBack,(可以的打一下看看) 里面的有三个参数,第三个参数是什么类型?<xsd:element name="callBack">
- <xsd:complexType>
- <xsd:sequence>
  <xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string" /> 
  <xsd:element maxOccurs="1" minOccurs="1" name="in1" type="xsd:int" /> 
  <xsd:element maxOccurs="1" minOccurs="1" name="in2" nillable="true" type="tns:ArrayOfString" /> 
  </xsd:sequence>
  </xsd:complexType>
  </xsd:element>2、我能不能看到服务器上callBack方法的参数都有哪几个,是什么类型

解决方案 »

  1.   

    1、 String 集合类型
    2、 callBack 应该只是定义的单位元素,属性有3个
      

  2.   


    String endpoint=" http://218.240.13.80:8090/wms/service/ConsoleService";
    Service service=new Service();
    Call call=(Call)service.createCall();
    call.setTargetEndpointAddress(new java.net.URL(endpoint));

    call.setOperationName("callBack");
    call.addParameter("in0",org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
    call.addParameter("in1",org.apache.axis.encoding.XMLType.XSD_INTEGER, javax.xml.rpc.ParameterMode.IN);
    call.addParameter("in2",org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);

    call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
    call.setUseSOAPAction(true);
    String in0="simple";
    String in1="30";
    int in1_=30;
    String[] ary=new String[4];
    ary[0]="15864497511";
    ary[1]="15866291607";
    ary[2]="95562506";
    ary[3]="123456";

    String str=(String)call.invoke(new Object[]{in0,in1_,ary});
    System.out.print("成功"); 执行后报如下错误For input string: ""
    AxisFault
     faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server
     faultSubcode: 
     faultString: For input string: &quot;&quot;
     faultActor: 
     faultNode: 
     faultDetail:  
      

  3.   

    看我的发送和接收包:
    SEND:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:con="http://consolecommand.message.centrex.gohigh.com">
       <soapenv:Header/>
       <soapenv:Body>
          <con:callBack>
             <!--type: string-->
             <con:in0>gero et</con:in0>
             <!--type: int-->
             <con:in1>3</con:in1>
             <con:in2>
                <!--Zero or more repetitions:-->
                <!--type: string-->
                <con:string>sonoras imperio</con:string>
             </con:in2>
          </con:callBack>
       </soapenv:Body>
    </soapenv:Envelope>
    RECIEVE:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soap:Body>
          <callBackResponse xmlns="http://consolecommand.message.centrex.gohigh.com">
             <out><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
    <root name="ss3000e_invoke">
      <command>
        <sequenceid>22</sequenceid>
        <resulttype>gero et</resulttype>
        <name>CallBack</name>
        <param id="0">3</param>
        <param id="1">sonoras imperio</param>
      </command>
      <result>
        <type>failed</type>
        <description>Bad Parameter</description>
        <timecost>1</timecost>
        <value>null</value>
      </result>
    </root>]]></out>
          </callBackResponse>
       </soap:Body>
    </soap:Envelope>
    我是用SOAPUI模仿的.你自动生成的代码发包格式如果不是这样,那可能会有问题.
      

  4.   

    tns:ArrayOfString这是个自定义的数据类型
    从名字看是个字符串的数组,具体是不是你要看它的xsd文件,你要找到定义tns的命名空间,通过它找到相应的xsd文件去看它的ArrayOfString类型定义
      

  5.   

    我发现我发过去的包头是<soapenv:Envelope> 收的是<soap:Envelope>,两个不一样,不知道是否是它的问题。
      

  6.   

    您可以看一下这个地址
    http://218.240.13.80:8090/wms/service/ConsoleService?wsdl 
    您能不能加我的QQ,89009499