In according to the problem above:
To get nearer to the solution, i had wrote a main-Methode which calls the Webservice....
Here i got another Exception.
First the main-Methode:
File wsdl = new
File("D:/workspace/app-webservice-connector/src/main/resources/META-INF/Cow.wsdl");
| URL wsdlUrl = null;
| try {
| wsdlUrl = new
URL("http://localhost:8080/app-cs-api/services/Cow?wsdl");
| // wsdlUrl = wsdl.toURL();
| } catch (MalformedURLException e1) {
| // TODO Auto-generated catch block
| e1.printStackTrace();
| }
| QName serviceName = new QName("http://cow.service.app.fm.business.de",
"Cow");
|
| Service service = Service.create(wsdlUrl, serviceName);
| /*
| * DEBUG!!!
| */
| System.out.println(service.getServiceName().getLocalPart());
| System.out.println(service.getServiceName().getNamespaceURI());
| System.out.println(service.getWSDLDocumentLocation().getPath());
|
| //Cow_Service service = (Cow_Service) Cow_Service.createCall(serviceName,
wsdlUrl);
|
| Cow_PortType port = (Cow_PortType) service.getPort(Cow_PortType.class);
|
| try {
| boolean response = port.pruefeLogin("user", "x");
| } catch (RemoteException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
|
The exception:
| Exception in thread "main" com.sun.xml.ws.model.RuntimeModelerException: A
WebService annotation is not present on class:
de.business.fm.app.service.cow.Cow_PortType
| at com.sun.xml.ws.model.RuntimeModeler.getPortTypeName(RuntimeModeler.java:1252)
| at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:296)
| at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:306)
| at javax.xml.ws.Service.getPort(Service.java:161)
| at WSLogin.main(WSLogin.java:48)
|
The Interface generated by wstools:
| /*
| * JBossWS WS-Tools Generated Source
| *
| * Generation Date: Tue Apr 17 19:06:34 CEST 2007
| *
| * This generated source code represents a derivative work of the input to
| * the generator that produced it. Consult the input for the copyright and
| * terms of use that apply to this source code.
| */
| package de.business.fm.app.service.cow;
| public interface Cow_PortType extends java.rmi.Remote
| {
|
| public boolean pruefeLogin(java.lang.String anmeldenamen, java.lang.String
kennwort) throws java.rmi.RemoteException;
| }
|
How i have to place some annotation in this interface?
Is it possible that wstools generated not correctly??
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038079#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...