webMethods

webMethods

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
  • 1.  WS with attachment

    Posted Thu July 07, 2016 05:47 AM

    My requirement is ,will receive the attachment through WS and send to target system.

    I created a flow service to receive the attachment data .

          1. pub.string:base64Decode              
    2. pub.string:bytesToString
    

    I created provider of that service with attachment enabled ‘true’. below are the flow service steps

    tested the WSDL in SOAP UI with enable MTOM property ‘true’ and received the encoded data in my flow service.

    Below was the request structure used in SOAP UI.

    soap:Header/
    soap:Body
    bip:receiveAttachment
    cid:TN_xml.xml
    </bip:receiveAttachment>
    </soap:Body>
    </soap:Envelope>

    But If I create connector of that WSDL , Please let me know how I can send a file as attachment from webMethod.
    And also suggest whether above approach is correct or not to receive the attachment.


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: WS with attachment

    Posted Thu July 07, 2016 12:29 PM

    Biplab – There are a couple of threads in techCommunity, can you search and get the answer. If you come across any issues please share.

    Thanks,


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: WS with attachment

    Posted Thu August 04, 2016 11:27 AM

    There can be multiple scenario’s here for your request.

    I will Explain one of them.

    Lets consider your pass an input string ‘x’ from Soap Ui and you want to receive an XOP object as output.

    output field type should be set as XOPObject.
    GetFile from filesystem/Db as per your requirement. (random example)
    Create a XOPObject using inbuild service. (pub.soap.utils:createXOPObject)
    Create a Soap1.2 Provider.
    Set “Attachment enabled” property as true in Soap provider.
    Consume in Soap UI and enable attachment in Soap UI Properties.

    Done.

    Regards,
    Syed Faraz Ahmed


    #webMethods
    #Integration-Server-and-ESB