Skip to Content

@WebService: serviceName not with endpointInterface?

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

0
Add a comment
10|10000 characters needed characters exceeded

author's profile photo Former Member
Former Member Apr 02, 2007 at 12:09 PM

0

257

Actions

3 Answers

Best Answer
Vladimir Pavlov
Apr 02, 2007 at 12:46 PM
1

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

Add a comment
10|10000 characters needed characters exceeded

author's profile photo Former Member
Former Member Apr 05, 2007 at 06:48 PM
1

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?

Add a comment
10|10000 characters needed characters exceeded

Dimitrina Stoyanova
Apr 19, 2007 at 12:24 PM
0

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

Add a comment
10|10000 characters needed characters exceeded