« Return to Thread: Question regarding MTOM client

Question regarding MTOM client

by Okke Tijhuis-3 :: Rate this Message:

Reply to Author | View in Thread

Bericht
Hi,
 
I'm trying to test the XFire MTOM support.
 
I have the following defined as a service:
 
@EnableMTOM
@WebService(name="EiService",targetNamespace="http://intern.salland.nl/webservice/EiService")
public interface EiService {
 
    @WebMethod(operationName="BepaalSoort")
    @WebResult(name="Soort")
    public Soort bepaalSoort(@WebParam(name="Bestand")DataHandler bestand);
}
 
A few implementation classes and such I made as well. They are deployed on tomcat 5.5.
The service deploys correctly and the WSDL page works fine.
 
I'm having trouble with the client however. The client contains the following code:
 
public class EiServiceTest {
    public static void main(String[] args) throws Exception {
        Client client = new Client(new URL("http://localhost:8080/xfire/services/EiService?wsdl"));
        client.setProperty("mtom-enabled","true");
        client.setProperty(HttpTransport.CHUNKING_ENABLED, "true");
        DataSource fds = new FileDataSource("d:/test/somefile");
        DataHandler dh = new DataHandler(fds);
        Object result = client.invoke("BepaalSoort", new Object[] {dh});
        Soort soort = (Soort) result;
        System.out.println(soort.getStandaard());
        System.out.println(soort.getVersie());
        System.out.println(soort.getSubversie());
    }
}
 
It seems to connect to fine to the service but when I run it I get the error mentioned below.
I can't seem to find the jar containing SessionUtil. Can anyone tell me why it is needed in the first place
and where to find it or can I write the client class differently?
 
Thanks in advance,
 
Okke Tijhuis

 
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/geronimo/mail/util/SessionUtil
 at javax.mail.internet.ParameterList.getInitialProperties(ParameterList.java:140)
 at javax.mail.internet.ParameterList.<init>(ParameterList.java:55)
 at javax.mail.internet.ContentType.setParameter(ContentType.java:104)
 at javax.mail.internet.MimeMultipart.<init>(MimeMultipart.java:60)
 at org.codehaus.xfire.attachments.JavaMailAttachments.getMimeMultipart(JavaMailAttachments.java:187)
 at org.codehaus.xfire.attachments.JavaMailAttachments.getContentType(JavaMailAttachments.java:195)
 at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.open(CommonsHttpMessageSender.java:160)
 at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:121)
 at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
 at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
 at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
 at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
 at org.codehaus.xfire.client.Client.invoke(Client.java:335)
 at org.codehaus.xfire.client.Client.invoke(Client.java:349)
 at EiServiceTest.main(EiServiceTest.java:26)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
--------------------------------DISCLAIMER--------------------------------------
De informatie in dit e-mail bericht is uitsluitend bestemd voor de geadresseerde.
Gebruik van de inhoud ervan door anderen zonder toestemming van de afzender of
geadresseerde is onrechtmatig. Salland verzekeringen staat door de elektronische
verzending van dit bericht, niet in voor de juiste en volledige overbrenging van de
inhoud van dit e-mail bericht.

 « Return to Thread: Question regarding MTOM client