Use tcpmon and send intercepted soap message here :)

On 4/19/07, seego <[EMAIL PROTECTED]> wrote:

Hi, all.

Would you please help me to solve a problem? I have written a webservice and
it worked fine, but now I have to add to my service ability to send files to
clients. This is how I am trying to do it...

public DataHandler getDocument(String guid) {
        logger.debug("getDocument() start");
        FileDataSource fs = new FileDataSource("C:/temp/b5diagn.txt");
        return new DataHandler(fs);
   }


When my client calls myService.getDocument("test") method, I get the error:

Exception in thread "AWT-EventQueue-0"
org.codehaus.xfire.XFireRuntimeException: Exception while calling:
http://192.168.253.174:8080/Oculus5/services/FederatedService arguments:
java.lang.String : sergei |. Nested exception is
org.codehaus.xfire.fault.XFireFault: Fault: java.lang.NullPointerException
org.codehaus.xfire.fault.XFireFault: Fault: java.lang.NullPointerException
        at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
        at org.codehaus.xfire.client.Client.onReceive(Client.java:391)
        at
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
        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.XFireProxy.handleRequest(XFireProxy.java:77)
        at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
        at $Proxy1.getDocument(Unknown Source)
        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
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean$ProxyInterceptor.invoke(XFireClientFactoryBean.java:604)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
        at $Proxy0.getDocument(Unknown Source)
        at
com.roh.oculus.globalization.gui.OFSModSearch.downloadFile(OFSModSearch.java:386)
        at
com.roh.oculus.globalization.gui.OFSModSearch.access$100(OFSModSearch.java:69)
        at
com.roh.oculus.globalization.gui.OFSModSearch$3$1.run(OFSModSearch.java:368)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.lang.NullPointerException
        at
org.codehaus.xfire.attachments.AttachmentUtil.getAttachment(AttachmentUtil.java:33)
        at
org.codehaus.xfire.aegis.type.mtom.AbstractXOPType.readInclude(AbstractXOPType.java:58)
        at
org.codehaus.xfire.aegis.type.mtom.AbstractXOPType.readObject(AbstractXOPType.java:45)
        at
org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:162)
        at
org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.java:206)
        at
org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:50)
        at
org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Client.onReceive(Client.java:387)
        ... 28 more


Am I doing something wrong? My webservice is exposed as a servlet. My
clients are being created via spring remoting. both client and service have
the following properties set during creation

<property name="properties">
             <map>
                 <entry>
                     <key><value>mtom-enabled</value></key>
                     <value>true</value>
                 </entry>
                 <entry>
                        
<key><value>urn:xfire:transport:http:chunking-enabled</value></key>
                        <value>true</value>
                 </entry>
             </map>
         </property>
--
View this message in context: 
http://www.nabble.com/MTOM.-Can-my-webservice-return-DataHandler--tf3607587.html#a10079354
Sent from the XFire - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to