Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Web Services and the fly likes Wbservice Annotations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Wbservice Annotations" Watch "Wbservice Annotations" New topic
Author

Wbservice Annotations

Jayan krishnan
Greenhorn

Joined: Jul 13, 2012
Posts: 1


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();
}


}
}


 
 
subject: Wbservice Annotations