[jbossws-users] [JBossWS] - XOP testCase

bk8133 do-not-reply at jboss.com
Fri May 11 06:01:53 EDT 2007


Greetings!

I'm trying to produce a webservice according to the XOP testcase in examples. I implemented endpoint interface and implementing bean. 

  | 
  | package si.zejn.agentpro.core.ws;
  | 
  | import javax.jws.WebService;
  | import javax.jws.soap.SOAPBinding;
  | import javax.xml.ws.BindingType;
  | 
  | @WebService(targetNamespace = "http://ws.core.agentpro.zejn.si/")
  | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
  | @BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
  | public interface MTOMEndpoint
  | {
  | 	public DHResponse getSlikaByID();
  | 
  | 
  |    
  | }
  | 
  | 
  | @WebService(name = "MTOMEndpoint", serviceName = "MTOMService", endpointInterface = "si.zejn.agentpro.core.ws.MTOMEndpoint")
  | public class WServiceAP_Pictures {
  | 	
  | 	
  | 	  @Resource
  | 	   WebServiceContext wsCtx;
  | 
  | 
  | 	public DHResponse getSlikaByID() {
  | 		
  | 		
  | 		FileDataSource fds=new FileDataSource("c:/pics/slika.jpg");
  | 		DataHandler dh=new DataHandler(fds);
  | 		return new DHResponse(dh);
  | 	}
  | 	
  | 	
  | 
  | }
  | 

But when invoking the service i get "IllegalAnnotationsException". 

Any ideas? Eternally greatful.. :)

PS. which way is more intuitive and better to use MTOM/XOP or SwA. I'm trying to provide interfaces for a Delphi Client


  | 11:49:56,984 ERROR [AbstractServiceEndpointServlet] Error processing web service request
  | javax.xml.ws.WebServiceException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
  | javax.activation.DataHandler does not have a no-arg default constructor.
  | 	this problem is related to the following location:
  | 		at javax.activation.DataHandler
  | 		at public javax.activation.DataHandler si.zejn.agentpro.core.ws.DHResponse.getDataHandler()
  | 		at si.zejn.agentpro.core.ws.DHResponse
  | 
  | 	at org.jboss.ws.core.jaxws.JAXBSerializer.handleMarshallException(JAXBSerializer.java:109)
  | 	at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:89)
  | 	at org.jboss.ws.core.jaxrpc.binding.SerializerSupport.serialize(SerializerSupport.java:61)
  | 	at 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044926#4044926

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044926



More information about the jbossws-users mailing list