2 Replies Latest reply on May 9, 2003 10:39 AM by jonlee

    SOAP passing xml file

    sugramoin

      I want my client to pass an xml document to jboss server using SOAP.
      I tried passing primitives and objects its working fine.

      Now i need to pass a xml file ,
      how to do that

      eagerly waiting ....
      TIA
      Moin

        • 1. Re: SOAP passing xml file
          sny23

          > I want my client to pass an xml document to jboss
          > server using SOAP.
          > I tried passing primitives and objects its working
          > fine.
          >
          > Now i need to pass a xml file ,
          > how to do that

          You can pass any file as xsd:base64Binary. On the java/j2ee this will simply be a byte[] which you can easily write into a FileOutputStream instance or the like.

          I successfully use this together with a C program using gSOAP, which has a stub generator that creates a struct xsd__base64Binary which can be used to read/write files over to a SOAP webservice.
          Note that the reverse (returning a file from JBoss-Net) does work the same way, but needs a lot of memory here (see http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= for details).

          hth,
          SNy23

          • 2. Re: SOAP passing xml file
            jonlee

            And then we can eagerly await the implementation of the W3C recommended SOAP 1.2 standard: http://www.zdnet.com.au/itmanager/trends/story/0,2000029592,20274323,00.htm

            They promise that there will be a number of XML-oriented enhancements that will make it easier to manipulate data formatted as XML documents.