У меня есть следующий класс:
Код: Выделить всё
package test.api.soap.server;
public class TestClassA {
public TestClassA() {
}
public String doA() {
System.out.println("Start doA()");
return "In do A";
}
}
пакет test.api.soap.server;
Код: Выделить всё
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public class MyClientApiV2_5 {
public MyClientApiV2_5() {
}
@WebMethod
public TestClassA getTestClassA() {
return new TestClassA();
}
}
Код: Выделить всё
MyClientApiV25Service.wsdl
Код: Выделить всё
Код: Выделить всё
Код: Выделить всё
Код: Выделить всё
package test.api.soap.client;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import test.api.soap.client.stubs.MyClientApiV25;
import test.api.soap.client.stubs.MyClientApiV25Service;
import test.api.soap.client.stubs.TestClassA;
public class SampleClient {
private MyClientApiV25 api = null;
static MyClientApiV25Service service;
public SampleClient() throws MalformedURLException {
api = service.getMyClientApiV25Port();
TestClassA testClass = api.getTestClassA();
testClass.doA();
}
}
Написание testClass.doA(); возвращает:
Метод doA() не определен для типа TestClassA
Есть предложения?
Подробнее здесь: https://stackoverflow.com/questions/250 ... ing-jax-ws
Мобильная версия