axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BLIS Webmaster (Patrick Houbaux)" <webmas...@blis-project.org>
Subject Re: DIME Chunking
Date Fri, 14 Jan 2005 15:55:05 GMT
It seems your message context was null.
Did you correctly initialized your client stub?
Something like the following before calling "MessageContext.getCurrentContext()" should do
the trick:

YourServerServiceLocator server = new YourServerServiceLocator();
YourServer port = server.getYourServerServiceName();

// then call

org.apache.axis.MessageContext msgContext = org.apache.axis.MessageContext.getCurrentContext();
org.apache.axis.Message reqMsg = msgContext.getRequestMessage();

// add the attachements [...]

// call your service
port.YourServerServiceMethod(..);

At the last resort, if it doesn't work, try to init an AxisClient instance and get the message
context from there but I'm not sure if that really work.

Cheers,
Patrick.

Milazzo, Michael A HQISEC wrote:
> Unfortunately, the proposed solution did not work.  I am attempting to 
> submit a file from the client to the server.  I tried using the code you 
> proposed, but executed the getRequestMessage() method instead.  The 
> value returned was null and my application threw a null pointer 
> exception when it tried to add attachments.  Is there something else I 
> must do to retrieve the request message from the client before calling 
> the remote method?
> 
> Here is what I currently have for attachment support. 
> PublishReportSoapBindingStub is the Axis-generated stub.  filArg is a 
> java.io.File object.  prsl refers to the service locator class that was 
> instantiated within my utility class' constructor.  I can't send a 63 MB 
> file.
> 
> 
>                         PublishReportSoapBindingStub prsbs = null;
>                         DataHandler dh = null;
> 
>                        
>                         try {
>                                 prsbs = new 
> PublishReportSoapBindingStub(endPointURL, prsl);
>                                 
> prsbs._setProperty(Call.ATTACHMENT_ENCAPSULATION_FORMAT,                
>                                         
> Call.ATTACHMENT_ENCAPSULATION_FORMAT_DIME);
> 
>                                 dh = new DataHandler(new 
> FileDataSource(fileArg));
>                                 prsbs.addAttachment(dh);
>                                
>                         } catch (AxisFault e1) {
>                                 // TODO Auto-generated catch block
>                                 e1.printStackTrace();
>                         }
>                         ... call remote method here...
> 
> Thanks,
> 
> Mike
> 
> 
> 
> 
> 
> -----Original Message-----
> From: BLIS Webmaster (Patrick Houbaux)
> [mailto:webmaster@blis-project.org]
> Sent: Friday, January 14, 2005 7:50 AM
> To: axis-user@ws.apache.org
> Subject: Re: DIME Chunking
> 
> 
> Try what I proposed in the following thread:
> 
> http://marc.theaimsgroup.com/?t=110511630600002&r=1&w=2 
> <http://marc.theaimsgroup.com/?t=110511630600002&r=1&w=2>
> 
> It works ok for sending files with a big size.
> 
> Cheers,
> Patrick.
> 
> Sims, Scott wrote:
>  > Mike,
>  > 
>  > I don't have an answer for you but noticed the DIME chunking subject.  I
>  > have read some articles that state that earlier versions of Axis DO
>  > support DIME chunking but none of them provided a concrete example.  I
>  > posted a message earlier this (subject: Large Data Transfer) week asking
>  > if Axis 1.1 supports DIME chunking (similar post later by L. Piccoli
>  > 1/11) and if anyone had an example.  So far no responses to either of
>  > the posts.  I'm trying to move large files but have only figured out how
>  > to use the DataHandler to do this (haven't tried anything larger than
>  > 4.5 MB).
>  > 
>  > Scott
>  >
>  > ------------------------------------------------------------------------
>  > *From:* Milazzo, Michael A HQISEC [mailto:Michael.Milazzo@us.army.mil]
>  > *Sent:* Friday, January 14, 2005 8:49 AM
>  > *To:* axis-user@ws.apache.org
>  > *Subject:* DIME Chunking
>  >
>  > Does anyone know whether Apache Axis 1.2RC2 supports DIME chunking?  I
>  > modified my code to send a file as an attachment as opposed to a base64
>  > encoded parameter to my web service (Also Axis-based).  It still chokes
>  > on sending file larger than 6.8 MB.  I have modified the heap size on
>  > the client, but that doesn't seem to help.
>  >
>  > Thanks,
>  >
>  > Mike
>  >
> 

Mime
View raw message