Hi there,

 To monitor SOAP messages, you can use wsmonitor --
https://wsmonitor.dev.java.net/
I've used it and it works OK for me.

BR,
~A

On 11/22/06, ying lcs <[EMAIL PROTECTED]> wrote:

Can you please tell me how can I check the SOAP message? Is there a
SOAP message monitor on the xfire client side?

I am running the server side on linux.
And I put already put absolute path to the file. The file is just a
small ~10K text file.
  public DataSource getLog() {
return new FileDataSource("/home/ying/code.txt");
}

On 11/22/06, Tomek Sztelak <[EMAIL PROTECTED]> wrote:
> Try to check if file data is send in soap message. Maybe its problem
> with loading file.
>
> On 11/22/06, ying lcs <[EMAIL PROTECTED]> wrote:
> > I am using the one comes with xfire-1.2.2.
> > I am using mail-1.4.jar and activation-1.1.jar.
> >
> > In my case, I want my Webservice client to download a file from a
> > WebService server.
> > So I just define this method in myserver.aegis.xml:
> >
> >     <method name="getLog">
> >           <return-type componentType="javax.activation.DataSource" />
> >
> >          </method>
> >
> > And in my interface class on the server sdie, I just have this;
> >  public DataSource getLog()
> >     {
> >
> >         return new FileDataSource("/home/yinglcs/test.txt");
> >
> >     }
> >
> > That should be sufficient, right?
> > If not can you please tell me what am I missing?
> >
> > e.g. Do I need a DataHandler in the interface? If yes, why?
> >
> > Thanks for any more help.
> >
> >
> > On 11/22/06, Tomek Sztelak <[EMAIL PROTECTED]> wrote:
> > > Hmm, as i remember this error can also by caused by wrong version of
> > > java mail.jar. Can you check what version are you using ?
> > >
> > > On 11/22/06, ying lcs <[EMAIL PROTECTED]> wrote:
> > > > Yes, I did.
> > > >
> > > > What I am trying to do is to have the WebService client get the
file
> > > > from the WebService server. I think that is why I am studying the
> > > > 'Picture' test case in the xfire source.
> > > > But I can't get it to work. I get this exception:
> > > >
> > > >  > xception in thread "main"
org.codehaus.xfire.XFireRuntimeException:
> > > > > > Could not invoke service.. Nested exception is
> > > > > > org.codehaus.xfire.fault.XFireFault: Could not find the
attachment
> > > > > > cid:116422501819961235202990@http://www.w3.org/2001/XMLSchema
> > > > > > org.codehaus.xfire.fault.XFireFault: Could not find the
attachment
> > > > > > cid:116422501819961235202990@http://www.w3.org/2001/XMLSchema
> > > > > >         at
org.codehaus.xfire.aegis.type.mtom.AbstractXOPType.readInclude(
AbstractXOPType.java:62)
> > > > > >         at
org.codehaus.xfire.aegis.type.mtom.AbstractXOPType.readObject(
AbstractXOPType.java:45)
> > > > > >         at
org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(
AegisBindingProvider.java:154)
> > > > > >         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:382)
> > > > > >         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 $Proxy0.getLog(Unknown Source)
> > > > > >         at org.codehaus.xfire.demo.BookClient.main(
BookClient.java:78)
> > > > > >
> > > >
> > > > On 11/22/06, Tomek Sztelak <[EMAIL PROTECTED]> wrote:
> > > > > Did you set "mtom-eneble"=true on client side ? Check
examples/mtom sample app.
> > > > >
> > > > > On 11/22/06, ying lcs <[EMAIL PROTECTED]> wrote:
> > > > > > Thanks for the pointer.  I also read the "picture " example in
> > > > > > xfire-aegis to see how POJO works in transferring a file.
> > > > > >
> > > > > > I did:
> > > > > >
> > > > > > 1. add a method in my Service Interface:
> > > > > > public DataSource getFile(String name)
> > > > > >
> > > > > > 2. enable mtom in my service.xml
> > > > > >    <properties>
> > > > > >     <property key="mtom-enabled">true </property>
> > > > > >     </properties>
> > > > > >
> > > > > > 3. implement getFile in the imple of my service:
> > > > > >  public DataSource getLog()
> > > > > >     {
> > > > > >         try {
> > > > > > // did break here when I set a breakpoint
> > > > > >         return new
FileDataSource("/home/yinglcs/deviceCode.txt");
> > > > > >         } catch (Exception e) {
> > > > > >           // no exception thrown
> > > > > >                 e.printStackTrace();
> > > > > >         }
> > > > > >
> > > > > >         return null;
> > > > > >     }
> > > > > >
> > > > > > 4. In my web service client, I call the getLog like this:
> > > > > >             DataSource source = service.getLog();
> > > > > >
> > > > > >             InputStream input = source.getInputStream();
> > > > > >
> > > > > > 5. But I get this exception, Can you please tell me why it
can't find
> > > > > > the attachment id?
> > > > > >
> > > > > > xception in thread "main"
org.codehaus.xfire.XFireRuntimeException:
> > > > > > Could not invoke service.. Nested exception is
> > > > > > org.codehaus.xfire.fault.XFireFault: Could not find the
attachment
> > > > > > cid:116422501819961235202990@http://www.w3.org/2001/XMLSchema
> > > > > > org.codehaus.xfire.fault.XFireFault: Could not find the
attachment
> > > > > > cid:116422501819961235202990@http://www.w3.org/2001/XMLSchema
> > > > > >         at
org.codehaus.xfire.aegis.type.mtom.AbstractXOPType.readInclude(
AbstractXOPType.java:62)
> > > > > >         at
org.codehaus.xfire.aegis.type.mtom.AbstractXOPType.readObject(
AbstractXOPType.java:45)
> > > > > >         at
org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(
AegisBindingProvider.java:154)
> > > > > >         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:382)
> > > > > >         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 $Proxy0.getLog(Unknown Source)
> > > > > >         at org.codehaus.xfire.demo.BookClient.main(
BookClient.java:78)
> > > > > >
> > > > > >
> > > > > > On 11/21/06, Tomek Sztelak <[EMAIL PROTECTED]> wrote:
> > > > > > > Sure, take a look here : http://xfire.codehaus.org/MTOM
> > > > > > >
> > > > > > > On 11/21/06, ying lcs <[EMAIL PROTECTED]> wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > Can I use xfire  to transfer file using SOAP?
> > > > > > > >
> > > > > > > > Thank you.
> > > > > > > >
> > > > > > > >
---------------------------------------------------------------------
> > > > > > > > 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
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
---------------------------------------------------------------------
> > > > > > 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
> > > > >
> > > > >
> > > >
> > > >
---------------------------------------------------------------------
> > > > 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
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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
>
>

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

    http://xircles.codehaus.org/manage_email




--
BR,
Anjan Bacchu
Summit Information Systems

Reply via email to