Hello,
i want to create a webservice with jsr181 annotation:
I gain no problems using the annotation with a class. but using the @webservice annotation with an interface and @webservice(endpointInterface="..", name="..") in class as described in JSR-181 spec causes an error:
02.04.2007 13:53:21 /userOut/daView_category (eclipse.UserOutLocation) [Thread[Deploy Thread,5,main]] ERROR: Deploy Exception.An error occurred while deploying the deployment item 'sap.com_WSTestEAR'.; nested exception is:
java.rmi.RemoteException: class com.sap.engine.services.dc.gd.DeliveryException: An error occurred during deployment of sdu id: sap.com_WSTestEAR
sdu file path: C:\usr\SAP\DevStudio\eclipse\workspace\WSTestEAR\WSTestEAR.ear
version status: HIGHER
deployment status: Admitted
description:
1. Error:
Error occurred while updating ear file C:\usr\SAP\DevStudio\eclipse\workspace\WSTestEAR\WSTestEAR.ear.
Reason: ; nested exception is: java.rmi.RemoteException: class com.sap.engine.services.deploy.server.utils.DSRemoteException: Error occurred while updating ear file C:\usr\SAP\DevStudio\eclipse\workspace\WSTestEAR\WSTestEAR.ear. Reason: ; nested exception is:
java.rmi.RemoteException: com.sap.engine.services.deploy.container.rtgen.GenerationException: [/code]
Unfortunatelly the error message isn't to descriptive...
anyone for help?
thanks
hm
Message was edited by:
Hans Mler
Help to improve this question by adding a comment
If you have an answer for this question, then please use the Your Answer form at the bottom of the page instead.
You already have an active moderator alert for this content.
Hi,
More information on this error should be available in the server trace file:
C:\usr\sap\JP1\JC00\j2ee\cluster\server0\log\defaultTrace.trc.
HTH!
-Vladimir
Help to improve this answer by adding a comment
If you have a different answer for this question, then please use the Your Answer form at the bottom of the page instead.
You already have an active moderator alert for this content.
hi,
well the @webservice annotation in the interface works now. I deleted all properties, except the endpointInterface in the implementation class.
But I still have a problem: How can I define the WebService-Name (serviceName="") now? Both in the interface and in the implementation class an error occurs.
Here is the code:
package ws; import javax.jws.WebMethod; import javax.jws.WebService; @WebService public interface MyWebService { @WebMethod(operationName="ComeOnSayHello") public String sayHello (); }
and the implementation class
package ws; import javax.ejb.Stateless; import javax.jws.WebService; @WebService(endpointInterface="ws.MyWebService") //cannot use serviceName="MyService" @Stateless public class MyWebServiceBean { public MyWebServiceBean() { super(); } public String sayHello(){ return "Hello"; } }
any ideas?
Help to improve this answer by adding a comment
If you have a different answer for this question, then please use the Your Answer form at the bottom of the page instead.
You already have an active moderator alert for this content.
OK, I already forwarded your questions to the Web services development team, let's see what they say... Until then - Happy Easter 😉
-Vladimir
Hello Hans,
the web services annotation reader has the sdn limitation to expect all of the
annotation attributes.
So try to set values of the attributes:
Example:
@WebService(serviceName="HelloBeanService", name="HelloBeanPort", targetNamespace="http://sap.com/tests/webservices/jee5/basetests/webservice/service/", portName="HelloBeanPort", endpointInterface="com.sap.tests.webservices.jee5.basetests.webservice.service.HelloLocal")
P.S. It is expected that you use the web service wizard and the annotations are generated automatically with their default values. Then if you want you could change their values.
Regards,
Dimitrina
Help to improve this answer by adding a comment
If you have a different answer for this question, then please use the Your Answer form at the bottom of the page instead.
You already have an active moderator alert for this content.