I have a flow service that accepts XML document from FTP port. Our security team will not allow us to open our Business Connector ftp port for external users. I can use an FTP site that is on a different server to receive the external XML file. How do I automate my flow service to run immediately when I receive an XML file to this FTP site that is not within the business connector server?
Hi,
I don’t think there is something like trigger or notification u will have in FTP server which will notify IS that there is a new file.
The best you can do a schedule a service which will login to the FTP box and see if there is any file. Say every 5 min for what ever frequency you are looking. And get the file and process it.
Bibekananda,
Thanks for the reply. I am trying to look at examples to use the ftp service from pub.client.ftp:login, mget etc.,
I cannot find examples anywhere to determine the values/sequence that I should be using login, cd, mget. I would appreciate if you can point me in the right direction.
Is there webMethods installed on your machine where files are placed through FTP? If so, you can configure a file polling port on that IS, to monitor the folder in which the files are being dropped (the poller can be configured to poll the folders recursively - ie poll sub-folders too). The file poller can be configured to pass on the file to a service that will process it.
For information on File Polling port, read up the ISAdministratorGuide
These are the steps and build a ftp processing service,
pub.client.ftp:login(session)
pub.client.ftp:cd
pub.client.ftp:ls(to list the files in that directory)then loop over the list and use
pub.client.ftp:mget or get service
pub.client.ftp:logout (session).
RMG,
Thanks for the reply. I am using the same steps as you have mentioned. But, I am not even able to go beyond the login step. I can login successfully through command prompt. I cannot figure out what I am missing here.
I am assigning IP address to serverhost, username and password to service in parameters of login step. PLEASE help me out here.
I would like to more about where you are going wrong.
when you run the service what is the output you are getting?
You don’t have to invoke “ls” command and loopover if you know the file pattern.
In your case you can give *.XML , if you want to dump all the files into local directory. And the other part is you have to give the localdirectory(where IS is installed) name where you want to place the above files.
May help you if you give us some more details/error messages you are getting.
From the error log, it looks like you’re trying to connect to FTP server through a proxy server. Is this the case? There are gozillion types of FTP proxies – Well, actually five (5) according to IS settings. Are you sure it’s not a problem with your FTP proxy setting? If you can FTP directly to the FTP server, do try turn off the proxy to make sure that proxy’s not the issue.
There are two modes of operation for FTP servers (Active / Passive). Try the other in your service and see if it helps. I’m too lazy to go over the differences…
What version of SAP BC are you using? FTP services have a bit of problems associated with them, and I think it’s not fixed until one of the Fixes for BC 4.6. An alternative to doing FTP would be to use OpenSSH. OpenSSH is a family of protocols, and webMethods have a free (but unsupported) package to do OpenSSH (scp, sftp, and ssh). They might also satisfy your network admins, as the protocol passes data encrypted (only!), and can use PKI to do client authentication. I prefer it to doing FTP. Search “SSH” in wMUsers to find articles discussing OpenSSH.
Hi Groupies,
We are a staffing and placement company in Atlanta, GA…We are in need of a Web Developer for IBM in California…The Client is Looking for Someone who has webMethods (3 years) and Java Experience…
If interested Please Mail Me: michelle@esolutionsoft.com
We appreciate if you discuss it with your friends and send your updated resumes ASAP…
Actually you have posted in a wrong place this section is exclusively for questions/discussions.So please do post this kind of stuff in the Wmusers/Jobs section area.
So that everyone will notice and will reply to you.
Hi,
I want to write a Java service which takes an XML file as input from HTTP request, do some processing, and send back another XML file as output using HTTP response. How can i read xml file from the IData Object? How can i read the field values? and how to send an XML file back with HTTP response?
I am new to webMethods.
Can anybody help me achieving this?
Any reason why you want to write a javaservice?instead you can do this using flowservice in a easier way.what you have to do is set the service input node(object)this will be in the pipeline for Http requests with content-type “text/xml”.So the flow will be XMLNodeToDocument(this will parse the IDATA structure gives output xml record structure then read the field values do mapping what ever your requirement says and finally pub.flow:setResponse for sending HTTP response.
XMLNodeToDocument
Read values
pub.flow:setResponse(in the same http session)
You are in luck. What you want to do can be done very easily the built-in capabilities of Integration Server and Developer.
The Developer has a wizard to generate a Flow service that will receive an XML file and convert it to a document type. Click on the folder where you want the service to exist, hit Ctrl-N, choose “Receive An XML Document” and then follow the prompts to specify what source to use to describe the structure of the XML document to expect to receive (schema, DTD, etc.).
After processing the XML document using Flow, populate a response document type created from the schema (or sample XML) that describes what you want to return to the sender. Convert that doc type into an xml string using pub.xml:documentToXMLString and then map that to the “string” input of the pub.flow:setResponse service. When the service completes the string (xml doc) will be returned to the sender.
Since you are new to Integration Server, be sure to work through the Developer 4.6 tutorial available on Advantage (there’s not one for 6.x, but the 4.6 one is still very useful). Also, be sure to use try-catch sequences in your Flow so that you can handle exceptions properly.
Finally, take advantage of the existing documentation found in the Developer User’s Guide and the IS Built-In Services Guide. The built-in services I mentioned above are described in detail there. You will find these essential documents in the <wm_home>/Developer/doc folder.
Not to get too complicated right off the bat, but if you documents can get large it would be worth looking at WmSamples sample.complexMapping.largeDoc. It will show you how to process a chunk of your XML doc at a time without requiring it all in memory.
<form>
File to upload: <input>
<br><input> to upload the file!</form>
</body>
</html>
Can you tell me what could be wrong here?
2)Once the above problem is resolved, i need to do the processing of input XML by using one of the JAVA services.(now i am just doing a mapping from input xml fields to out xml fields). The Java service will be using the values in the input XML file and generate the values for the output XML files. How can i achieve this?