0 Replies Latest reply: Dec 25, 2009 2:57 AM by 743069 RSS

    how to pass byte array / binary data to a webservice as parameter in osb

    743069
      i have a webservice that has a byte array input parameter. i tried to use this WS in a message flow via service-callout. the problem i encountered is the following: since webservice call by using service-callout requires you to use an xml input as part of soap message, i insert both of $body/ctx:binary-content and $body/ctx:binary-content/@ref variables individually into this xml-message to pass binary-data to WS. When i debug the code, i see that it make calls to WS with $body/ctx:binary-content/@ref parameter, but the byte array passed is empty(not NULL)...

      note: i tried java-callut instead of service-called and used $body/ctx:binary-content as input parameter it worked. i think, this is because java-callout doesnt need an xml input and enable to take variables as is...

      can anybody help me to solve the problem with service-callout please?

      here is the input i use to call ws with service-callout method...

      <iso2Xml xmlns="http://www.mycompany.com.tr">
      <request>{$body/ctx:binary-content/@ref}</request>
      </iso2Xml>

      and this is my WS's signature:
      @WebMethod
      public String iso2Xml(byte[] request)