-
1. Re: Dynamic no. of attachments using MTOM
ropalka Nov 22, 2007 4:03 AM (in response to oskar.carlstedt)Hi,
did you try to use List or DataHandler[] data object as your method argument? It should work as well.
Richard -
2. Re: Dynamic no. of attachments using MTOM
oskar.carlstedt Nov 22, 2007 6:57 AM (in response to oskar.carlstedt)Hi! Thanks for a quick reply!
Ok! It might be a good one to do so. When using a DataHandler list , where do I get the rest of my xml document. If using document/literal I will post/receive an xml document that may contain other textual information. In other words, my xml may contain some "normal" xml information and some binary information.
Regards
/Oskar -
3. Re: Dynamic no. of attachments using MTOM
ropalka Nov 22, 2007 8:11 AM (in response to oskar.carlstedt)"oskar.carlstedt" wrote:
When using a DataHandler list , where do I get the rest of my xml document. If using document/literal I will post/receive an xml document that may contain other textual information.
I don't understand this question :-("oskar.carlstedt" wrote:
In other words, my xml may contain some "normal" xml information and some binary information.
This shouldn't be the problem. MTOM should work in such scenarios as well.
Richard -
4. Re: Dynamic no. of attachments using MTOM
oskar.carlstedt Nov 22, 2007 9:17 AM (in response to oskar.carlstedt)Ok!
What I mean is when I have a DataHandler I can get an input stream to the reach the attachment data. But what if I have the following xml. How do I get my xml document:<my-xml> <list-of-something> <something> <normal-xml> <textual-info-1> SOME TEXTUAL INFO 1 </textual-info-1> <textual-info-2> SOME TEXTUAL INFO 2 </textual-info-2> </normal-xml> <binary>this part will go as MTOM attachment</binary> <something> <something> <normal-xml> <textual-info-1> SOME TEXTUAL INFO 1 </textual-info-1> <textual-info-2> SOME TEXTUAL INFO 2 </textual-info-2> </normal-xml> <binary>this part will go as MTOM attachment</binary> <something> </list-of-something> </my-xml>
Are there two methods that are invoked in the implementing code. As I understand the DataHandler will give me the InputStream to the attachment (binary in above xml). But there is no way to get the rest of the xml, or is it?
Regards
/Oskar -
5. Re: Dynamic no. of attachments using MTOM
oskar.carlstedt Nov 23, 2007 4:00 AM (in response to oskar.carlstedt)Hi again!
Is this as simple as just creating JAX-B objects having normal annotations and then let one of the child objects take a DataHandler as argument?
One more question. Where do all the attachments go if I use the Provider< SOAPMessage > implementation?
Regards
/Oskar -
6. Re: Dynamic no. of attachments using MTOM
ropalka Nov 23, 2007 4:07 AM (in response to oskar.carlstedt)"oskar.carlstedt" wrote:
Ok!
What I mean is when I have a DataHandler I can get an input stream to the reach the attachment data. But what if I have the following xml. How do I get my xml document:<my-xml> <list-of-something> <something> <normal-xml> <textual-info-1> SOME TEXTUAL INFO 1 </textual-info-1> <textual-info-2> SOME TEXTUAL INFO 2 </textual-info-2> </normal-xml> <binary>this part will go as MTOM attachment</binary> <something> <something> <normal-xml> <textual-info-1> SOME TEXTUAL INFO 1 </textual-info-1> <textual-info-2> SOME TEXTUAL INFO 2 </textual-info-2> </normal-xml> <binary>this part will go as MTOM attachment</binary> <something> </list-of-something> </my-xml>
Are there two methods that are invoked in the implementing code. As I understand the DataHandler will give me the InputStream to the attachment (binary in above xml). But there is no way to get the rest of the xml, or is it?
Regards
/Oskar
This shouldn't be the problem for you. The jbossws tools should generate something like this from WSDL document for you:public void method(List<Something> data) { ... } public class Something { NormalXml normalXml DataHandler binary }
Richard -
7. Re: Dynamic no. of attachments using MTOM
oskar.carlstedt Nov 28, 2007 7:25 AM (in response to oskar.carlstedt)Hi!
Thanks a lot!
//Oskar