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

pub.file:getFile service

  • 1.  pub.file:getFile service

    Posted Fri June 09, 2006 01:28 AM

    Hi there,
    I am trying to access an xml file on the local file system on the client machine. The IS is present on a remote server. getFile service may not work in this case. Is there another approach to access this file without moving it to the server?

    Regards,
    Pete.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 01:56 AM

    Pete,

    Is you client ie. Developer connecting to that remote IS? or you are using IS server session local on your system? Other option is connect via FTP session to that remote IS and get the file.

    HTH,
    RMG


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 02:02 AM

    Hi Pete,
    In this case, you can do many ways:
    A> First way:
    1> Add node as the input of the service and select the service that you want to test.
    2> From the Test menu, select Send XML File.
    3> In the Select Test Mode dialog box, specify whether you want the service to run in Trace mode or Step mode and click OK.
    4> In the Select File dialog box, select the local XML file that you want to submit to this service and click OK. Developer submits the file to the server, which parses it into a node object and passes it to selected service.

    B> Second way:
    Add a string named say inXML in the input of your service. Open the local XML file and copy the content and run the service and paste the content to the variable inXML. In this case disable the getFile step.

    C> Third way:

    Use the Load from file option while running your service but in this case you have to have your local XML in slightly format.

    HTH,
    Bhawesh.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 06:26 AM

    Hi Pete,
    You have to configure FTP server on your local machine and use webMethods built in ftp service to get the file.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 04:04 PM

    Appreciate ur help.
    I have used the ‘send xml file’ option to get the xml file, that is converted into a node. However, I am unable to view the attributes in the “xml node view” option when I invoke the ‘queryxmlnode’ service. How do I view this node to query attributes?

    Regards,
    Pete


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 04:10 PM

    Hi Pete,
    Call the xmlNodeToDocument service and this will convert the node into the webMethods doc structure where you can view all the files in developer.

    HTH,
    Bhawesh.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 04:12 PM

    Hi Pete,
    There was a typo in my earlier post.
    “where you can view all the files in developer.” should be treated as “where you can view all the fields using Developer.”


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 8.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 05:21 PM

    Pete,

    If the ‘send xml file’ option to get the xml file,this option works for you (debug,testing purpose) which is converted into a node, as a first step for parsing the xml invoke
    xmlNodeToDocument service (inputs set makeArrays=false,set documentTypeName(fully qualified name of the IS document that you are parsing the xml file) this gives output document(IDATA structure) further downstream do source to target mappings etc…or follow with your requirements.

    HTH,
    RMG


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 9.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 09:47 PM

    Thanks again.
    I am able to access the xml file when I copy it into a string variable and call the necessary services. I would also like to try this out by sending the file via http using pub.client:http service. I specified the url of the service to be invoked and the string that stores the xml file. However, I cannot view any variable containing the file in the target service’s pipeline. Am I missing out on something here?

    Thanks and regards,
    Pete.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 10.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 09:55 PM

    Also inputted other parameters like method, loadAs and content-type.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 11.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 10:18 PM

    Hi Pete,
    Using the service pub.client:http you will be able to post the file from the IS server machine to other machine, not from your local machine to the IS server.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 12.  RE: pub.file:getFile service

    Posted Fri June 09, 2006 11:41 PM

    Pete,

    Did you set Header/content-type=“text/xml”?Please make sure have data/arg/string or bytes or stream with loadAs=bytes or stream

    Then you should see in the target IS flow with node object in the pipeline.

    HTH,
    RMG


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 13.  RE: pub.file:getFile service

    Posted Sat June 10, 2006 01:11 AM

    Hi RMG,
    I have set the parameters as u suggested, but I still cannot see the node in the target service pipeline. Am I using the right service? as I am told earlier that I cannot use this service to transfer files from local machine to IS server.

    Pete.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 14.  RE: pub.file:getFile service

    Posted Sat June 10, 2006 01:40 AM

    Is your http post hitting the target service? what is the url format that you have given is it like [URL=“http://localhost:5555/invoke/servicename”]http://localhost:5555/invoke/servicename[/URL]? What variables are you seeing in the pipeline?

    For debugging in the target flow service use pub.flow.getTransportInfo and savepipelineToFile and later restorepipelineToFile and check the pipeline.

    Please let us know your findings.

    HTH,
    RMG


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 15.  RE: pub.file:getFile service

    Posted Sun June 11, 2006 09:50 PM

    Hi Pete,
    In my earlier post I wrote:
    “Using the service pub.client:http you will be able to post the file from the IS server machine to other machine, not from your local machine to the IS server.”

    The above post is based on the assumption that you only have Developer on your local machine and no IS. You have IS on a remote machine and you are trying to transfer a XML file from your local machine to the remote machine (with IS) using http.

    Can you pls. confirm that this is the situation? If not, pls. write in detail what are you trying to do?

    • Bhawesh.

    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods