我正在为 JAX RPC 使用基于存根的客户端方法这是我的客户端
package com;
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import com.client.BookCatalog;
import com.client.BookCatalogService;
import com.client.BookCatalogService_Impl;
public class Client {
public static void main(String args[]) throws RemoteException {
BookCatalogService_Impl service = new BookCatalogService_Impl();
BookCatalog bc = service.getBookCatalogPort();
System.out.println(bc.getBookPrice("Web Services"));
}
}
线程“主”java.rmi.RemoteException 中的异常:HTTP 传输错误:java.net.MalformedURLException:无协议:REPLACE_WITH_ACTUAL_URL;嵌套异常是:HTTP 传输错误:java.net.MalformedURLException:无协议:com.Client.main(Client.java:19) 的 com.client.BookCatalog_Stub.getBookPrice(BookCatalog_Stub.java:87) 的 REPLACE_WITH_ACTUAL_URL 原因:HTTP传输错误:java.net.MalformedURLException:无协议:com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:148) 处的 REPLACE_WITH_ACTUAL_URL com.sun.xml.rpc.client.StreamingSender._send (StreamingSender.java:96) at com.client.BookCatalog_Stub.getBookPrice(BookCatalog_Stub.java:70) ... 还有 1 个