1

私は apache axis 1.2 を使用しており、Java Web サービスでメソッドのオーバーロードを実装しようとしましたが、これはサンプル コードです。

//Here i took method1 with two parameters     
public String method1(String s1,String s2)
{
    SampleLogger.error("In method1(1)");
    return "method1(1)";
}    
//Here i took method1 with three parameters     
public String method1(String s1,String s2,String s3) throws RemoteException
{
    SampleLogger.error("In method1(2)");
    return "method1(2)";
}    
//Here i took method1 with four parameters  
public String method1(String s1,String s2,String s3,String s4) throws RemoteException
{
    SampleLogger.error("In method1(3)");
    return "method1(3)";
}    

これらのメソッドを Web サービス メソッドとして作成しようとすると、エラー IWAB0398E Error in generated WSDL from Java: Attempted to write duplicate が発生します。

schema element : {http://service.codon.com}method1
    AxisFault
    faultCode: {http://xml.apache.org/axis/}Server.generalException
    faultSubcode:
    faultString: Attempted to write duplicate schema element : 
4

1 に答える 1