Hi, I am geting this annotation exception when running the
java webservice client code. Could you any one help me to came out from this issue?
compile-single:
run-single:
END POINT :
http://127.0.0.1:8088/mockImplWSInterfaceSoapBinding?WSDL
com.sun.xml.internal.ws.model.RuntimeModelerException: A WebService annotation is not present on class: webserviceclient.ImplGetBanSubscribersOutput
BUILD SUCCESSFUL (total time: 8 seconds)
at com.sun.xml.internal.ws.model.RuntimeModeler.getPortTypeName(RuntimeModeler.java:1374)
***********************************************************************************************************************************************
Following is the Webservice client code
package webserviceclient;
import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;
import java.math.BigDecimal;
import java.net.URL;
import java.util.Calendar;
import java.util.List;
import java.util.ListIterator;
import javax.jws.WebService;
import javax.xml.bind.JAXBElement;
import javax.xml.namespace.QName;
import javax.xml.ws.Holder;
import javax.xml.ws.Service;
import javax.xml.rpc.ServiceFactory;
import javax.xml.ws.BindingProvider;
import javax.jws.soap.SOAPBinding;
/**
*
* @author jayakrishan
*/
public class WebserviceClient {
/**
* @param args the command line arguments
*/
public static void main(
String[] args) {
// TODO code application logic here
try {
ObjectFactory fact = new ObjectFactory();
ImplGetBanSubscribersInput banSubInput = new ImplGetBanSubscribersInput();
ImplGetBanSubscribersOutput banSubOutput = new ImplGetBanSubscribersOutput();
XMLGregorianCalendarImpl gregCalendor = new XMLGregorianCalendarImpl();
gregCalendor.setYear(2012);
gregCalendor.setMonth(03);
gregCalendor.setDay(13);
gregCalendor.setTime(12, 42, 12, 00);
// Ban subscribers input data
banSubInput.setBrand(fact.createImplGetBANSubscribersBillInputBan("B"));
banSubInput.setBan(fact.createImplGetBANSubscribersBillInputBan("517977844"));
banSubInput.setLogicalDate(fact.createImplGetBanSubscribersInputLogicalDate(gregCalendor));
URL url = new URL("http://127.0.0.1:8088/mockImplWSInterfaceSoapBinding?WSDL");
//String endpointURL = "http://127.0.0.1:8088/mockImplWSInterfaceSoapBinding?WSDL";
QName qname = new QName("http://ws.ejb.websrv.impl.css.amdocs.com", "ImplWSInterfaceService");
Service service = Service.create(url, qname);
banSubOutput = service.getPort(ImplGetBanSubscribersOutput.class);
System.out.println("second value.... "+banSubOutput.getSearchRes().get(2));
List response = banSubOutput.getSearchRes();
ListIterator listIterator = response.listIterator();
while (listIterator.hasNext()) {
System.out.println(listIterator.next());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}