我自己发布的axis2,访问wsdl看到如下,参数被自动命名为args0...:
<xs:element name="args0" type="xs:string" nillable="true" minOccurs="0"/> 
<xs:element name="args1" type="xs:string" nillable="true" minOccurs="0"/> 
<xs:element name="args2" type="xs:string" nillable="true" minOccurs="0"/>
别人的机器发布的看到的正常:
<xs:element name="towerX" type="xs:string" nillable="true" minOccurs="0"/> 
<xs:element name="towerY" type="xs:string" nillable="true" minOccurs="0"/> 
<xs:element name="towerID" type="xs:string" nillable="true" minOccurs="0"/>这是为什么,请赐教?环境:myeclipse 9,tomcat 6(*64),windows 7(*64),axis2

解决方案 »

  1.   

    刚接触java,中途搞的这个,接口定义如下:
    /**
     * 接口说明
     * 
     * @param imei
     * @return
     */
    public short pdaExit(String imei);发布用的是Axis2 Service Archiver。axis2的war包是1.61版本
      

  2.   

    发现加上@WebParam(name="bustab030Strings")参数名就能不自动命名,但别人机器上为什么不用加这个,求解?
      

  3.   

    AXIS2默认生成的wsdl文件中所有的方法参数是args0,args1...等等;
    要使wsdl文件中的方法参数显示为webservice接口中的实际的参数名称,
    需要对webservice接口中的方法参数用@WebPara(name="参数名称")进行注解;
    (提示: 是对接口定义的方法参数进行注解, 而不是对实现类的方法参数进行注解);
    例如:webservice的认证接口定义:
    public interface AuthService
    {
        public UserToken auth(@WebParam(name="userName") String userName, @WebParam(name="password") String password) throws ServiceException;
    }