IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Setting the output variable for a web service to return a byte array

  • 1.  Setting the output variable for a web service to return a byte array

    Posted Fri September 23, 2005 10:58 PM

    When i create the output variable as an object and set its content type to byte through the webMethods developer 6.0.1, it does generate a WSDL with the output variable as follows:

    <xsd:element>

    So the type is set in the WSDL as “xsd:anyType” instead of byte array. This forces the consumers of my web service to explicitly cast the output object they receive, to a binary array.

    Any ideas as to how to generate the output variable as a byte array instead of an object? Thanks much.


    #soa
    #API-Management
    #webMethods


  • 2.  RE: Setting the output variable for a web service to return a byte array

    Posted Mon September 26, 2005 10:59 PM

    We got this to work. Convert the byte array to string. Using the pub.string:base64Encode service, encode the string. Define the output variable as a string and set the content type to be rendered as base64binary. This will do. Also we are using the SOAP RPC processor.


    #webMethods
    #API-Management
    #soa