[jboss-user] [JBossWS] - Re: Dynamic no. of attachments using MTOM

richard.opalka@jboss.com do-not-reply at jboss.com
Fri Nov 23 04:07:19 EST 2007


"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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107255#4107255

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107255



More information about the jboss-user mailing list