Proxy Service Writing a File

Guys,
I have a Proxy service that recieves a file content in Binary64 field present on the request body type.
I need to write this content present inside the Binary 64 to a file.
My approach was to develop a Web Service with that same interface and do the write logic within the Web Service. But my wish is to make this, if possible, using Proxy Service. There is a particular issue about that.
The OSB Domain is started with a user called osboperator and it has all write privileges on the remote file system in order to make possible write down the file. But it may represent a security issue. My client wants that the Proxy Service runs with a different user, impersonating a different user than the one that started the domain because when doing that it will be more secure.
Let me supply more information.
The Proxy Service is configured to respond only to HTTPS requests and there is a 2-WAY SSL configured. So the requester will present a certificate and based on the certificate there will be a user associated with that. This user associated with the certificate is the one meant to run the part of the orchestration that will tryies to write down the file on the remote file system.
Iss it possible?
How?
Is it the best approach?

>
Ok, but the point is that I do not want the user beaoperator to have the grant to write the file system.
If I create a Service Account and configure the Proxy to run with the service account will not be enought? The hole proxy will be running with an user different from the one that started the domain. Or no?
>
Well, I don't think you can attach Service Account to a proxy service ... But even if you could, the answer would be "No". The proxy would be running with the very same SYSTEM PRIVILEGES (in your operating system) as any other part of OSB or WebLogic. Only privileges within the scope of OSB would be different, but that wouldn't change anything from operating system perspective, so your file would still be written by the user who started WebLogic.
So ... There is no way how you could change system user within JVM. Your code (be it OSB or anything else) is running under privileges of a single system user (beaoperator) and you can't change that from any Java application. Again, there is no way to do that.
You have to think in a different way. Instead of "how to write a file from OSB under different user?" think about "how to process data in OSB and let other system process to store them?" The answer for the first question is "no way!", whereas there are many positive answers for the second question. One of them is FTP or SFTP where you could set your Service Account, the second could be web service running outside of OSB ...

Similar Messages

  • How to control File read Proxy Service when it is polling from folder?

    Hello all,
    In my current requirement we are receiving  xml's through one folder(LOCAL) from source side.we are picking those xml's  by proxy service PS1  as file transport for every 10 sec and configured that folder path.In PS1 message flow we put on routing action to one bussiness service,that business service sending those xml's to one MQ.
    We already created this interface but the issue is source side they plan to change that folder and also they want to stop this service(folder to MQ) sometimes based on synarios.That folder will be delete or if exist proxy wont read messages from that folder.
    But proxy is still looking for that folder in Test ENV on Unix system then it gives error beacuse of unix folder structure is different,proxy unable to create that folder in unix system.it is creating in windows.
    Now we want to control that service when the folder is ready that time only  proxy will activate otherwise not..i.e like if condition "if cndtion is satisfied PS1 starts the polling from that folder else condition should be work.
    How can i control PS1 service?
    Is there any chance to control by using another proxy?
    Experts please guide me..
    regards
    venu

    Hi Terry,
    According to your description, my understanding is that you don’t want the yollow bar notification to display when you open Access documents.
    This issue seems to be about the client application. Please compare the followings with the things that you did:
     1.Open the documents
     2.Click File->Options->Trust Center->Trust Center Settings
     3.Click Protected View, unselect ‘Enable Protected View for originating from the Internet’
     4.Click Message Bar, select ‘Never show information about blocked content’
     5.Click Macro Settings, select ‘Disable all macros without notification’
    In addition, as this issue is about Office, I commend you create a new thread in Office forum, more experts will assist you with this issue.
    Office forum:
    http://social.technet.microsoft.com/Forums/en-US/home?category=officeitpro
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • OSB - how to handle poll file error in FTP Proxy Service

    I configed a proxy service to poll file from a FTP server.
    How can I capture the error when the proxy service cannnot poll? (FTP server is down, folder not found, username invalid, etc )
    I want to make it show in the Operations >Message Reports table.

    It is not possible. Those errors will only be logged to logfile.
    Manoj

  • How to call a text FTP proxy service from a Java client ?

    Greetings,
    I've configured a text FTP proxy service which downloads files from a FTP server. It pols a directory on the FTP server and, as soon as a file respecting a given pattern apears it is downloaded. I tested the service in the test console and by putting some test files onto the FTP server. Now, I need to be able to test it from a Java client. How may I do that ? I need to write a Java client to connect to the OSB and to tell to it to use the FTP proxy in order to download a given file, from a given location and to put it in a given location on the client machine. Many thanks in advance for any help. A sample would be great !
    Kind regards,
    Nicolas

    Ok, I understand. The crucial question here is "what is a caller that you refer to?"
    Don't get me wrong, but the problem here is that you probably don't understand, what OSB is good for. OSB is an event-driven system. The event in your case is a new message in remote FTP server. You have to define what should happen when that event is fired. And that's all. You don't have to involve other client (or caller) for this case.
    You should define your FTP proxy to retrieve all relevant files from FTP server and then you should route them based on their name/content/encoding/whatever to different consumers. You can also have many proxies if you want - one for each name. It's up to you. But you don't have any "callers" in either case.

  • FTP adapter for Oracle Service Bus  - retrieve file by dynamic file name.

    Hi
    I am newbie in OSB. I try to use FTP transport in Workshop, it must fill in "Prefix" and "Suffix" for destination file name.
    But for us, the file name is sent by external systems.
    The workflow is:
    1. External system call our proxy services.
    2. Proxy service get file name from SOAP message.
    3. Proxy Service get the file from FTP server.
    4. The file send to Business services.
    Any suggestions to implement about workflows?

    Let me first put here what I understand about the flow:
    External Sytem -->(filename)--> OSB HTTP PS --> (1) --> OSB FTP BS --> Read file based on filename
    |--> (2) --> send file ontent to another system or return to the original system
    If that is the flow, then I beileve ther is no straight forward way to implement it in OSB.
    OSB FTP BS will only write a file to FTP Location.
    If you create a JCA FTP Adapter for reading the file, then you can use it only to create a Proxy Service, and that proxy will not pick up the file when called from another service but only when a file is put on the source FTP location.
    So, to implement the solution you will need to use Java Callout to a class which has code written to accept the file name as input, read the file from an FTP location and return the file content.
    This is my understanding of how it is, may be there is another way to implement this or in fact may be the latest version of OSB 11.1.1.4 or 11.1.1.5 JCA adapter does support read operation within a flow instead of just at the start of the flow.

  • My proxy service (messaging) with sftp protocol is not picking up the file

    Hi ,
    I have proxy service , which polls for a file in a regular interval , this has stopped working suddenly . The bad part is i am not able to find any log related to the service in either the domain logs or the server logs.
    I tried to disable the service and re-enable it , but it was of no use .
    Please help me in this , what can i look for next ?

    Bala,
    I just extracted the entire B2B setup as a ZIP file and imported the setup in a DEV UT01 enironment. The B2B was able to successfully pick up the B2B messages using the same ftp channel.If from one env B2B is able to pick the message using same settings then it must be a network issue. You may like to change the B2B log level to debug and then try to disable and enable the channel. See if you get anything in the log.
    You may also try to create an outbound agreement and see if you are able to send message to that FTP location from the same environment.
    Regards,
    Anuj

  • How to use a file transport proxy service as trigger for a webservice

    Hi,
    I've implemented a alsb file transport proxy service. This proxy is watching a common directory and detects new files. After detection, the proxy move them in an archive folder.
    After that I want call an external webservice with the filename as input parameter.
    How can I comfigure that with the alsb console.
    best regards
    Oliver
    with the to extract the filename after it was renamed by the proxy service.

    How do you invoke/ instantiate the file based proxy service. Does it just run on activation in sb console? Does it continue to detect files or does it stop after detecting one file?
    Also what is the format of the URL that points to the file folder.
    For Ex: I have a folder named "TestFiles" on the C:\drive of the server.
    Edited by premkumr at 10/31/2007 3:26 PM

  • In OSB file protocol, trying to get the archived file name in proxy service

    Hi,
      I have a requirement that i need to process the archived file of file protocol,  with java callout in proxy service.
    I am able to get the file name which is reading with 'tokenize($inbound/ctx:transport/ctx:request/tp:headers/file:fileName,"\\")[last()]' , but this file is getting archived to archive folder. I want to pass the archive file name as input to the Java callout.
    Please let me know if  this can achieve in OSB proxy or any other options.
    Note : I am reading a xlsx file in the file protocol

    If you're using pass by reference option in the file transport, I guess the archive filename can be obtained from $body/ctx:binary-content/@ref. Try it out.

  • Unable to poll for files in FTP server using Proxy Service (in OSB Project)

    Here are the stepd followed for creating proxy service that should poll ftp server to retrieve files but polling is not happening and unable to see any errors in logs.
    1. Created service account by selecting resource type as static and providing the ftp user and password details.
    2. Created a New Proxy Service in eclipse
         Tab General - service type as Messaging Service
         Tab Messaging - Request Message Type as Text, Response message type as None
         Tab Transport - Protocol selected as "ftp"
              - Endpoint uri entered in the format - ftp://hostname:port/directory
    FTP Transport -Selected "external user" as User Authentication
              - Selected the Service Account thats created in step1/
                   - File mMask - *.*
                   - Polling Interval 60
                   - Read Limit 10
                   - Post Read Action - Delete
                   - Transfer mode - binary
                   - Download Directory - "some local directoy"
                   - Error Directory - "some local error directory"
    Could any one please help here to trouble shoot the polling issue and correct me if this is wrong approach.
    Thanks

    Did you configure the FTP adapter which is present in Weblogic server?I think he's using FTP transport in OSB and not the JCA adapter, if that's the case FtpAdapter configuration wouldn't help...
    unable to see any errors in logsThat's odd, try to mess up the hostname and see if you get a connection refused on the logs...
    It may be a permissions issue, the user you're connecting may not even "see" the files you place there... Try using the same user to create and to poll files...
    Cheers,
    Vlad

  • Unable to process huge files in SFTP BASED PROXY SERVICE

    Hi,
    I credted osb project which will have sftp based proxy and sftp based business service.After completing the development i tested the fie transfer through WINSCP ,but my sftp based proxy was picking the files but i am unable to see the files in the output directory for huge files,for small file it is coming after aquite long time .please assist me .

    If you enable content streaming then you cant access the file/message content within the Proxy service and can not perform actions like Replace or perform transformations on the content. Use streaming for pass through scenarios only. If you want to read a large file and also perform transformations on content I would recommend using JCA Adapter for FTP and try reading records from file in batches, a few records at a time. Just so we know the requirement better, what is the file size and what is the format of the content?

  • File occasionally stuck in staging on File Poller Proxy Service

    Hi All,
    I'm having some problems with a File Poller Proxy Service. The Proxy reads xml files in a polling shared directory and puts the message in a queue. The files are small (<1kbytes).
    The problem is that occasionally the file gets stuck in the staging directory and never gets to the jms queue. If I cut the file and paste it again in the polling directory, it gets processed fine.
    Any ideas?
    Thanks.

    I have one cluster on the web logic server with 4 managed servers in it.
    The proxy runs on ms1, and the staging directory is on a different physical server shared folder.

  • File Proxy Service Problem on errors

    In continuation of this thread...
    File Proxy Service Problem on errors
    We are now facing two problems.
    1.The proxy service is executed twice
    2.File is getting moved to error directory with prefixed file names which we are not able to retrieve and use in the notification email.
    Not sure how to fix :(

    1.The proxy service is executed twice Check if this is due to transaction timeout issue as discussed here. Re: OSB File polling working twice with the same file
    2.File is getting moved to error directory with prefixed file names which we are not able to retrieve and use in the notification email.I am not sure wehther you have any option here. You can check with support. Alternatively can raise notification mail with the timestamp and some file/business identifier from the file. The support person can then open the file from error directory to verify the file/business id in the file or educate the support user that the files will have a prefix

  • Urgent pls : sftp proxy service failing to get the file

    Hi All ,
    I have a proxy service polling for a file . I have setup the service on test environment , where it works fine . When i deploy the same code with only change is the Managed server target for polling , as the production server is clustered .
    I get the following error in the domain log :
    ####<21-03-2013 18:08:59 CET> <Error> <SFTPTransport> <xxxx> <xxxxx> <[ACTIVE] ExecuteThread: '21' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-68CA827ADB4536852D4A> <11d1def534ea1be0:-5e793040:13ccb101998:-8000-00000000007dc42f> <1363885739466> <BEA-381803> <Unable to get file : /HOME/xxxxxx_00359.zip__2412735349618735005--5e793040.13d8cdd6ccb.7a58.stage on attempt number : 0 :
    java.io.FileNotFoundException: /xxxx/xxxx/xxxx/ftp_files/download/xxxxxxx00359.zip (No such file or directory)
         at java.io.FileOutputStream.open(Native Method)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
         at com.bea.wli.sb.transports.sftp.client.SFTPClient.get(SFTPClient.java:389)
         at com.bea.wli.sb.transports.sftp.connector.SFTPResource.get(SFTPResource.java:112)
         at com.bea.wli.sb.transports.sftp.connector.SFTPPublishedTask.processFileDownload(SFTPPublishedTask.java:206)
         at com.bea.wli.sb.transports.sftp.connector.SFTPPublishedTask.process(SFTPPublishedTask.java:169)
         at com.bea.wli.sb.transports.poller.listener.PolledMessageListenerMDB.__onMessage(PolledMessageListenerMDB.java:52)
         at com.bea.wli.sb.transports.poller.listener.PolledMessageListenerMDB.access$000(PolledMessageListenerMDB.java:31)
         at com.bea.wli.sb.transports.poller.listener.PolledMessageListenerMDB$1.run(PolledMessageListenerMDB.java:41)
         at com.bea.wli.sb.transports.poller.listener.PolledMessageListenerMDB$1.run(PolledMessageListenerMDB.java:39)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.security.Security.runAs(Security.java:41)
         at com.bea.wli.sb.transports.poller.listener.PolledMessageListenerMDB.onMessage(PolledMessageListenerMDB.java:39)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:574)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:379)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
         at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
         at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    Note : I am able to manually sftp the file from and to my osb server . I am initiating the sftp session from osb server.
    Any help on this in urgent basis is a lot of help . Thank you in advance.
    Edited by: Harry1234 on 2013-03-22 03:46

    Nop... The poller gets the file, but then publishes in a distributed queue, which means that any managed server can process it. Therefore, they need acesss to a shared file system.
    http://docs.oracle.com/cd/E14571_01/doc.1111/e15022/config.htm#OSBDG176
    Section 4.1:
    "Oracle Service Bus load balances File, Email, and FTP transport processing across the managed servers in a cluster. All managed servers in the cluster should be able to access the Archive, Stage, and Error directories specified in any File, Email, or FTP proxy service configuration. These directories should be configured in a shared file system such as NFS. By using a shared file system, users and programs can access files on remote systems almost as if they were local files."
    Regards,
    Fabio Douek

  • Proxy service reading from XML file..

    Hey all - i am a newbie here.
    my project need is to access a xml file, retrieve its content by a proxy service and send its contents to client back.
    Do i need to use java callout / MFL transformation? If yes, how?
    I do not wish to make use of any corresponding business service for this purpose. Is above possible without using a business service? If yes then how?
    Please help me out..!!
    Thanks and Regards,
    Swapnil K.

    Hi Swapnil K.
    do the following
    1. Create an XML file registered as an XQuery resource like below:
    <mapping>
    <row>
    <key>key1</key>
    <value>value1</value>
    </row>
    <row>
    <key>key2</key>
    <value>value2</value>
    </row>
    </mapping>
    2. create a simple soap proxy based on your wsdl I assume it would have only one operation with in parameter keyParam and one return paramter rerturnValue
    3. add a pipeline pair and create an assing action to the variable rerturnValue assigning the follwing value
    $mapping/row[key/text()=$keyParam]/value/text()
    where $mapping is your eternal xml resource and $keyParam is the input parameter of your wsdl method.
    by doing so you can modify your xml mapping without touching your proxy.
    4. in the response pipe of your pipeline pair populate the $body with the appropriate wsdl reponse message containing the value of the rerturnValue varaible
    regards,
    Tony

  • How to configure proxy services to use the file transport?

    Hi,
    I have configured a proxy service to poll for files in the specified folder. And it is configured to use the file transport.
    At runtime, I'm getting the follwing exception -
    <Apr 27, 2012 4:08:28 PM GMT+05:30> <Error> <WliSbTransports> <BEA-381602> <Error encountered while polling the resource for the service endpoint ProxyService$ServiceTypes_SB$BinaryService: javax.naming.NameNotFoundException: While trying to lookup 'wlsb.internal.transport.task.queue.file' didn't find subcontext 'wlsb'. Resolved ''; remaining name 'wlsb/internal/transport/task/queue/file'
    javax.naming.NameNotFoundException: While trying to lookup 'wlsb.internal.transport.task.queue.file' didn't find subcontext 'wlsb'. Resolved ''; remaining name 'wlsb/internal/transport/task/queue/file'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
         at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247)
         at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         Truncated. see log file for complete stacktrace
    Request help to resolve this.
    Thanks in advance.
    Regards
    Shyam.V

    Only the business service would rely on the JMS queues, which in turn would trigger an MDB. I have tested the business service and it works fine.
    The problem is only with the polling part of the proxy service.
    Regards
    Shyam.V

Maybe you are looking for