Erstellung von Java-web-service-client

ich versuche, die Studie darüber, wie der Zugriff auf externe web-services.
Habe ich eine Web-Service-Client in eclipse für die folgenden web-service:

http://www.webservicex.net/ws/WSDetails.aspx?WSID=9&CATID=2

Und ich habe versucht, den Zugriff auf diese web-service mit dem folgenden code:

public static void main(String[] args) {
    try{
        StockQuoteLocator locator = new StockQuoteLocator();
        locator.setEndpointAddress("StockQuoteSoap", "http://www.webservicex.net/stockquote.asmx");
        StockQuoteSoapStub stock = new StockQuoteSoapStub(locator);
        System.out.println(stock.getQuote("TEVA"));         
    } catch (Exception e){
        e.printStackTrace();
    }   
}

Aber ich bin immer der Fehler:

06/02/2012 11:29:51 org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.NoEndpoint
 faultSubcode: 
 faultString: No endpoint
 faultActor: 
 faultNode: 
 faultDetail: 
    {http://xml.apache.org/axis/}exceptionName:org.apache.axis.NoEndPointException
    {http://xml.apache.org/axis/}stackTrace:No endpoint
at NET.webserviceX.www.StockQuoteSoapStub.getQuote(StockQuoteSoapStub.java:93)
at Main.main(Main.java:17)

{http://xml.apache.org/axis/}hostname:MICHALEDR-DTW7

No endpoint
    at NET.webserviceX.www.StockQuoteSoapStub.getQuote(StockQuoteSoapStub.java:93)
    at Main.main(Main.java:17)

Können Sie mir bitte helfen es zu beheben?

InformationsquelleAutor Tal Tchernihovski | 2012-02-06

Schreibe einen Kommentar