私のWebサービスのメッセージおよび応答成果物を生成する際に問題が発生しています。私が試してみるとcmdでこのエラーが発生する:Webサービスアーチファクトの生成に問題が発生しました
C:¥Users¥KingMarkMcC¥workspace¥WebServiceJX> wsgen -cp -keep WebServiceImpオプション "-classpath" はここで引数
を必要とする私のWebServiceInterface
です:
package CacheServer;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
@WebService
@SOAPBinding(style= Style.DOCUMENT)
public interface WebServiceInterface {
@WebMethod Object get(Object k);
@WebMethod void put(Object k, Object v);
@WebMethod void remove(Object k);
@WebMethod void flush();
@WebMethod int size();
}
そしてWebService
パッケージがCacheServerの私の実装以下。
import java.util.LinkedHashMap;
import java.util.Map;
import javax.jws.WebService;
@WebService(endpointInterface = "CacheServer.WebServiceInterface")
public class WebServiceImp implements WebServiceInterface{
CacheDataStruct cache;
WebServiceImp(int i){
cache = new CacheDataStruct(i);
}
//Getting from Cache
@Override
public Object get(Object k){
System.out.println("GET REQUESTED");
return getter(k);
}
private Object getter(Object k){
return cache.get(k);
}
//Putting into Cache
@Override
public void put(Object k, Object v){
System.out.println("PUT REQUESTED");
putter(k,v);
}
private void putter(Object k, Object v){
cache.put(k, v);
}
//Removing from Cache
@Override
public void remove(Object k){
System.out.println("REMOVE REQUESTED");
remover(k);
}
private void remover(Object k){
cache.remove(k);
}
//Getting size of Cache
@Override
public int size(){
System.out.println("SIZE REQUESTED");
return sizer();
}
private int sizer(){
return cache.size();
}
//Flushing Cache
@Override
public void flush(){
System.out.println("FLUSH REQUESTED");
flusher();
}
private void flusher(){
cache.flush();
}
class CacheDataStruct extends LinkedHashMap<Object,Object>{
private static final long serialVersionUID = -8892618408950826874L;
public final int CACHESIZE;
private final static float loadFactor =0.75f;
protected boolean removeEldestEntry(Map.Entry<Object, Object> eldest) {
return size() > CACHESIZE;
}
public CacheDataStruct(int cacheSize){
super(cacheSize,loadFactor,true);
this.CACHESIZE=cacheSize;
}
void flush(){
clear();
System.out.println("Cache has been cleared.");
}
}
}
アーティファクトの生成に関する助けがあれば幸いです!