Stubbing data in OSB

I have a few proxy services that have multiple operations in OSB. My issue is that the services aren't available after 6PM.
I need assistance on how you stub a business/proxy service that has mock data or sample data that returns after 6PM. I don't need all the data to come back. I just need some sort of data that displays.
Thanks,
Bruce

you could send all the requests to some apache installation and use time in rewrite rules to decide whether you route to the "real" service or to the mock service (you could soapui for this to have a mockservice running on some endpoint)
basically you need some router to decide whether to retrieve the real data or the mock data
this could also be build in osb, for example
you create 1 dispatcher proxy service which could retrieve for example the servicename, operationname, and in this proxy service you could decide to either call the business service with the real endpoint or the mockservice endpoint.
but..when i'm typing this i'm thinking of the next
you could add routing options in the routing to the business service
in there you have the option to overrule the URI.
either you could try to add a xpath expression in the 'expression' field which some something like "if currenttime > 6pm then use this endpoint else use mock endpoint'
but since this logic will be re-used for other business service i would create some dispatcher xquery which receives the servicename and operationname, and in there decide whether to return the real endpoint or the mock endpoint
so if you really want to fix this in the osb itself i think the routing options with some generic dispatcher xquery would be the easiest way
but since this isn't really logic you want to model in your process flow, taking this out of the osb and implement it for example in the apache with some rewrite rules would be a cleaner solution

Similar Messages

  • How to log incoming and outgoing data in OSB?

    Hi
    I need to log incoming and outgoing data in OSB.
    What is the best approach to do it?
    Thanks
    Vibhor

    Have you changed the log level of OSB server? You may do it through weblogic admin console.
    Open weblogic admin console and go through -
    1. Servers --> osb_server1 --> Logging (tab) --> General (sub-tab) --> Advanced
    2. Change 'Minimum severity to log' to 'Debug'
    3. Set Log file : Severity level to debug
    4. Set Standard out : Severity level to debug
    5. Save
    Now run a test.
    Regards,
    Anuj

  • How to remove body from JMS data In OSB?

    Hi
    I am puttting xml type of data in a queue but the data is coming with body tag. My requirement is to place payload only in JSM queue without soap body.
    Steps i followed are;
    1. Created business service with
    Service Type      Messaging Service
    Request Message Type XML      
    2. Created proxy service with
         Replace [ entire node ] of [ . ] in [ body ] with [ $body ]
    How to do that?
    Thanks
    Vibhor

    Are you using the OSB test console to post the message?Have you ensured there is no <body> tag in the input?
    I have checked what I have pasted above and it is working fine!
    Thanks,
    Prabu

  • I am experiencing difficulty attempting to pull up my pay stub data from my employer site.

    When I attempt to pull up data within the site, the screen goes blank and the crossed circle symbol appears. Other coworkers access theirs at home. Not sure why it won't work for me ?

    What is your operating system?  Browser?  Reader version?
    Can you post a screenshot of that "crossed circle symbol"?

  • Publish binary data from OSB JEJB PS to a mq queue

    Hi All,
    I have a JEJB proxy service which has 3 arguments, : 2 strings and one is a byte array.
    I want the third argument: i.e th byte array to be passed on as it is to a mqueue.
    Now in my JEJB proxy service, I am only logging all the 3 parameters and replacing the body node contents with this 3rd parameter.
    The message goes into the queue but as an xml like :
    <soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <con:java-content ref="jcid:-3a54550:12ed83aa9da:-7f5a" xmlns:con="http://www.bea.com/wli/sb/context" xmlns:ns="http://www.openuri.org/"/> </soap:Body>
    But I ideally I want the binary data referred by that content to be passed to the mq queue.
    Can anyone please help in this regard.
    Thanks in advance
    Kshama

    Hi All,
    I have a JEJB proxy service which has 3 arguments, : 2 strings and one is a byte array.
    I want the third argument: i.e th byte array to be passed on as it is to a mqueue.
    Now in my JEJB proxy service, I am only logging all the 3 parameters and replacing the body node contents with this 3rd parameter.
    The message goes into the queue but as an xml like :
    <soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <con:java-content ref="jcid:-3a54550:12ed83aa9da:-7f5a" xmlns:con="http://www.bea.com/wli/sb/context" xmlns:ns="http://www.openuri.org/"/> </soap:Body>
    But I ideally I want the binary data referred by that content to be passed to the mq queue.
    Can anyone please help in this regard.
    Thanks in advance
    Kshama

  • Error when save date in SQL database

    Hi all,
    I try to save a date in to a sql database, but when I run my program I get following error:
    Invalid object 11/21/05 9:32 AM of type java.sql.Date assigned to host variable 3.
    In my database table I have a fields date (type Data)en time type(Time).
    this is the source:
         public void createTitle(int title_id, String description, String user)
              throws SQLException {
              // TODO Auto-generated method stub
              Date date = new Date();
              String dateFormat = "YYYY-MM-DD";
              String timeFormat = "HH:mm:ss";
              SimpleDateFormat ddf = new SimpleDateFormat(dateFormat);
              SimpleDateFormat tdf = new SimpleDateFormat(timeFormat);
              String det = ddf.format(date);
              String creationTime = tdf.format(date);
              PreparedStatement newTitle = conn.prepareStatement("INSERT INTO BE_TITLE (TITLE_ID, DESCRIPTION, DATE_CREATE, TIME_CREATE, USER_CREATE) VALUES (?,?,?,?,?)");     
              try{
                   newTitle.setInt(1,title_id);
                   newTitle.setString(2,description);
                   newTitle.setDate(3, new java.sql.Date(date.getTime()));
                   newTitle.setTime(4, new java.sql.Time(date.getTime()));
                   newTitle.setString(5, user);
                   newTitle.executeUpdate();
              }finally{
                   newTitle.close();
    Can someone give me a solution for this error
    Richard

    Hi Richard,
    in your application, you atempt to insert a java.sql.Date value into a DATE column, which has non-zero time-components. Open SQL rejects such an atempt.
    Please allow me to quote from the OSS message (452727 2004), which Detlev refers to in his quote:
    <i>
    about one year ago, we had a very lengthy discussion on this issue - not only internally at SAP but also with Jonathan Bruce, the specification lead for JBDC at Sun.                                                                               
    We have the following dillema:                                                                               
    The javadoc of the constructor java.sql.Date(long) states:                                                                               
    "If the given milliseconds value contains time information, the driver will set the time components to the time in the default time zone (the time zone of the Java virtual machine running the application) that corresponds to zero GMT."                                                                               
    With Jonathan Bruce, we tried to clarify when this normalization should take place.                                                               
    1) Source code inspection shows that it is not the class java.sql.Date the performs the normalization.                                                                               
    2) The Javadoc states that the JDBC driver should perform the             
    normalization. If it is the driver, more open questions arrise:                                                                               
    a) When shall the normalization be performed?                             
       - if a setDate method is invoked?                                      
       - only for INSERT and update statements or also for all other parameters?                                                               
       - shall the getDate method perform the normalization?                  
       - what about set/getObject?                                            
       - the java Docs of set/getDate don't tell anything about normalization.                                                            
       - according to which time zone shall the value be normalized?          
         - UTC                                                                
         - vm time zone?                                                      
         - database time zone?                                                                               
    3) If an automatic normalization is performed, data will be modified upon insertion (or extraction) from the database. This means that we cannot quarantee if we insert and Date object retrieve it again that the two objects will be equal.
    In the discussion with Jonathan, we couldn't clarify the issue. However, Jonathan promised that the JDK should be modified in such a way that the JDK is responsible for the normalization. (So far such a change has not been done).                                                                               
    In order to be on the safe side, SAP chose that Open SQL should reject any Date values that are not normalized. This is what we have          
    implemented and documented. I agree, that in this repect, Open SQL is stricter than the JDBC standard demands.                                                                               
    To help the application with the task to normalize a Date (and Time) object, we offer the helper class                                      
    com.sap.sql.DateTimeNormalizer which you find in opensql.jar.                                                                               
    To come to a conclusion, the bevavoir you observed is from our side not a bug of Open SQL but a feature. Please use DateTimeNormalizer to normalize Date objects appropriately.                                  
    </i>
    I hope, you can follow our reasoning.
    Best regards,
    Adrian

  • Single Template support multiple formats of data - Best practice

    I have a requirement to create Invoices in a single PDF file.
    The invoices would belong to different categories - DebitNotes, CreditNotes, Invoices with single product,
    invoices with multiple product etc.. each will have a different format.
    I initially thought the right way to create a single pdf is to use a
    single Template, with different formats of invoice seperated by conditional formatting.
    The see from reading the blogs that the other way is to create sub-template
    (one each for credit, invoice, Debits etc) and plug it into the
    main template.
    I would like to know what is the best practice that is followed in the above case.
    If I were to use sub-templates how would I make it possible to view the invoice stub only on the first page.
    Since the data from the sub-template would go to multiple pages.
    Is adding the stub data to the footer the only option. Please can someone share with me an example
    template.
    Thanks
    Shandrila

    Shandrila
    If the various document types are of a single XML format ie the same structure with just document type differences and the layout format is the same just the data different or very minimal changes that can be handled with conditional formatting then I think it would be OK to have a single report for all document types.
    If the data structures are very different and the layout requirements are different then I would create separate reports for each document type. If the data structure is teh same but the document type layouts are different then go for separate layout formats.
    Going down the sub template path can be a little difficult, you might end up with a very complex set of templates that are almost as much of a pain to manage as the original report you are trying to replace.
    Here's the best scenario IMHO ...
    1 data extract, parameterized to pull invoice, CM, etc data based on the user request
    Multiple layout templates, 1 for each document type. If you have common layout sections across the layouts e.g address blocks then break them out as sub template components that all of the layouts can access and share.
    Multiple report definitions, sharing the data extract with a single layout template associated with them
    cheers
    Tim

  • Service Callout Action in OSB

    Hi ,
    Good morning to all
    I have issue on osb service callout.
    1. i developed a synchronous service using bpel after that i invoke that service in osb as business service. my aim by using service callout action to call that service and get response.
    but the problem is how pass the osb input request to bpel input request and also how to transform the bpel response data to osb response data...
    Thanks and regards
    venky

    Venky,
    the problem is how pass the osb input request to bpel input request and also how to transform the bpel response data to osb response data...You can transform the OSB request structure to bpel service request structure using Xquery/Xslt transformations either by using replace action or assign action ( replacing the $body as per Bpel request format ) before sending the request to Bpel in service call out.
    And in similar manner after getting the response from Bpel service use Xquery/Xslt transformation & using replace action to transform bpel response back to OSB response format.
    Regards,
    Abhinav Gupta
    Edited by: Abhinav on Dec 5, 2012 11:49 AM

  • OSB: Performance Testing

    Hi All,
    I would like to test our OSB Service for Performance. I have already done the test in SOAPUI . But my performance testing requirement is something like this below
    Request and Response Flow :
    The consumer sends the requests to
    Consumer Level OSB (This enrichs the message) and routes to Orchestration level OSB
    Orchestration Level OSB (Performs Orchestration ) by communicating with Data Layer OSB
    Data Layer Level OSB (This one actually connects to provider database)
    I would like to send a request from any performance tool that would give me the amount of time taken at each OSB Layer.
    Please help me !!!
    Thanks

    Enable monitoring on each of the OSB services involved in the flow. You can enable monitoring at service level, pipeline level or action level. Then run your performance test from SOAP UI or Load Runner or jMeter.
    After that, you can monitor the statistics of each of the services in sbconsole dashboard's service health section. Depending on the level selected you will be able to see number of requests, average processing time, min and max processing time of each service/operation/pipeline/action etc.

  • More appropriate to validate a dependency filter parameter by mock+stub or by expression compile?

    My lead is enforcing TDD on our project. He says he's following Uncle Bob (Robert Martin) and SOLID principles. One of the rules he's reinforcing is what I call "the single cog rule"--there should be no more than one cog in the implemented chain in
    your unit test.
    We have a component that has a repository (IRepository) dependency. We've mocked the repository. The component that fetches from the repository passes a predicate to filter the list of items to be returned. My implementation had stub data get returned from
    a mock (Moq) repository and executed the predicate passed in from the component's invocation to filter the stub data, and the test validated that the filter accomplished an obvious filtering requirement by stubbing an implementation on the mock repository
    and invoking the mock repository's implementation. My lead clobbered this implementation and replaced it with an invocation of this:
    protected static Expression<Func<T, bool>> RepositoryFilterVerification<T>(T entity)
    return It.Is<Expression<Func<T, bool>>>(y => y.Compile().Invoke(entity));
    His concern is that by executing the expression by stubbing the mock and invoking the mock the test is doing too much.
    I was wondering what others felt about this.

    As you now describe it, I agree with your lead. What you need to test about your method is that it passes the correct predicate to
    the repository. What the repository does with the predicate belongs in a test of the repository unit.

  • Can anyone help me how to work with jms server in osb?

    Hi,
    I am new in osb. I have requirement in osb listeners.
    I want to put some data in to jms server using osb in one project and then consume that data using osb in diffrent projects.
    how to configure jms server to work above scenario?
    how to construct business and proxy sevices?
    jms protocal format?
    My requirement is topic in jms server
    Regards,
    Raju..

    Hi,
    The below link will help you to create simple JMS in weblogic
    https://blogs.oracle.com/soaproactive/entry/how_to_create_a_simple
    How to push message and consume message
    http://rangarb.wordpress.com/2012/04/18/working-with-jms-in-osb-11g/
    Another example of subscription of jms
    http://oraclesoaandoim.blogspot.co.uk/2012/04/oracle-service-11116-consume-jms.html
    Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.
    Thanks,
    Vijay

  • [OSB] File transfer

    Hi,
    I'm analyzing a problem of transferring files (flat text or zipped flat text) from our file brokering server using OSB SFTP transport. Files are 200MB tops.
    My idea was to invoke a proxy service with a remote URI instead of transferring the whole file. However, due to some security issues there is an idea to use the OSB SFTP transport.
    I am aware that parsing of such amount of data using OSB is madness, but how about transferring without touching it?
    As PS is still a WS to me, it feels somewhat strange. Is there any reason (apart from "security issues") why we should use it this?
    What is thought of as acceptable amount of data to be transferred efficiently via OSB?
    Thanks,
    P.

    the process which generates the file should use an extension NOT polled by OSB while writing the file, and once completed it should rename the file to the extension polled by OSB
    otherwise you can use a file trigger pattern, which is supported by the JCA File Adapter
    http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10231/adptr_file.htm#CIAJCBGI

  • OSB can support Real Time Messaging Protocol?

    Hi everyone:
    I have a question, OSB can support Real Time Messaging Protocol (RMTP) to transmit streaming of Audio and Video?
    Thanks in advance

    Knorrar,
    You can pass audio/video streams as binary data to OSB.
    Audio File / Binary / OSB
    Regards,
    Abhinav

  • X86_64 install error libthread.so

    All i have an X86_64 suse 9.1 and i am trying to install oracle 10.2.0 on my server i get this error in the installer log
    INFO: ./x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../libpthread.so when searching for -lpthread
    /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../libpthread.a when searching for -lpthread
    /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lpthread
    INFO: collect2:
    INFO: ld returned 1 exit status
    INFO: make: *** [ctxhx] Error 1
    [pre]
    Info is
    [pre]
    $ uname -a
    Linux test1 2.6.5-7.267-smp #1 SMP Wed Jun 21 10:50:51 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux
    [pre]
    gcc
    [pre]
    $ gcc -v
    Reading specs from /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/specs
    Configured with: ../configure enable-threads=posix prefix=/usr with-local-prefix=/usr/local infodir=/usr/share/info mandir=/usr/share/man enable-languages=c,c++,f77,objc,java,ada disable-checking libdir=/usr/lib64 enable-libgcj with-gxx-include-dir=/usr/include/g++ with-slibdir=/lib64 with-system-zlib enable-shared enable-__cxa_atexit x86_64-suse-linux
    Thread model: posix
    gcc version 3.3.3 (SuSE Linux)
    [pre]
    I see in the make.log that it is uing m32 on the gcc compile should it be doing this ?
    [pre]
    gcc -m32 -o ctxhx -L/data/oracle/product/10.2.0/gfmis/ctx//lib32/ -L/data/oracle/product/10.2.0/gfmis/lib32/ -L/data/oracle/product/10.2.0/gfmis/lib32/stubs/  /data/oracle/product/10.2.0/gfmis/ctx/lib/ctxhx.o -L/data/oracle/product/10.2.0/gfmis/ctx/lib/ -ldl -lm -lctxhx -Wl,-rpath,/data/oracle/product/10.2.0/gfmis/ctx/lib -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10  `cat /data/oracle/product/10.2.0/gfmis/lib/sysliblist`
    /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../libpthread.so when searching for -lpthread
    /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../libpthread.a when searching for -lpthread
    /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lpthread
    collect2: ld returned 1 exit status
    make: *** [ctxhx] Error 1
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    I have installed the Oracle 10g on a RHEL 4 update 4 box, and have the same problem:
    $ gcc -m32 -o ctxhx -L/home/oracle/oracle/product/10.2.0/db_2/ctx//lib32/ -L/home/oracle/oracle/product/10.2.0/db_2/lib32/ -L/home/oracle/oracle/product/10.2.0/db_2/lib32/stubs/ /home/oracle/oracle/product/10.2.0/db_2/ctx/lib/ctxhx.o -L/home/oracle/oracle/product/10.2.0/db_2/ctx/lib/ -ldl -lm -lctxhx -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_2/ctx/lib -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_2/lib/sysliblist`
    /usr/bin/ld: skipping incompatible /usr/lib64/libpthread.so when searching for -lpthread
    /usr/bin/ld: skipping incompatible /usr/lib64/libpthread.a when searching for -lpthread
    /usr/bin/ld: cannot find -lpthread
    collect2: ld returned 1 exit status
    Here are my glibc packages installed that are the sollution of Suse platform, but does not work at my Red Hat Enterprise:
    $ rpm -qa|grep glibc-devel
    glibc-devel-2.3.4-2.25
    $ rpm -qa|grep glibc-32
    glibc-32bit-9.3-7.1
    Does anyone have any idea ?
    Thanks.
    Reu.

  • A kiss is not a kiss without your sigh - I miss debugging

    Probably 15g will have the step-through function. Some of my debugging experience:
    Even if you have a catchall, sometimes BPEL console will still tell you something like "Exception occured" and refuse to display the visual flow:
    - Divide and conquer: deploy half of the code and see if it works. If you have 1000 steps, 10 times later you can identify which step is the trouble maker - if you have no other choice;
    - Drop System.out.println() everywhere in a Java Embedding.
    An IDE without debugging capability is not a good tool.
    I've see many people (includidng myself) trying to do "programming" using BPEL. I don't think BPEL is a tool for programming. If you have less than 3 service calls, 1 while loop and 1 if-else, BPEL can handle it. Well, if you want to argue that BPEL can handle complex logic, I would have to agree - it just takes 10 times longer than using a normal programming tool. I have this BPEL process which has 2000 lines in .BPEL file and every time when I open visual flow I have to say No hiding to display my 3000+ small squares.
    Sorry, I have been babbling here and forgot what I was here for - debugging:
    - Make code change;
    - deploy to server;
    - Run the instance and check stock price meanwhile(wasn't a happy experience either).
    - goto step 1;
    Are we back to 1972?
    - Punctuate holes on card
    - Send it to main frame in data center
    - run the "code" and see results
    - back to your office and make more holes.
    I know SOA and BPEL are fashionate, fancy and buzzing, using 100% XML and web service, etc. Well, don't forget the people working under the deck to make the boat sail. We need debugging capability.
    BTW, you need to have some programming experience before you can really use BPEL. I don't think a pure business analyst can use it well. I am confused: Is BPEL really for developers?
    Edited by: user626166 on Oct 7, 2008 3:28 PM

    Love it 15g, wont that be grand.
    Not sure if you have seen it but what is generally used for debugging is the test suite. This functionality allows you to simulate your process without deploying on the server. You make dummy stub data to either suceed of fail depending on what you want to test. This may save you alot of heart ache.
    cheers
    James

Maybe you are looking for

  • MacBook Won't go into deep sleep by itself

    I recently noticed that although my monitor will go to sleep after the specified idle time the hard drive never goes to sleep on it's own. The indicator light never goes into "pulse mode". The strange thing is I think it worked fine before I did the

  • HR Payslip Internal Table

    Hi ABAPERS, I am working on the HR Payslip in PE51. Does anyone know which internal table stores the Earnings and Deductions that are displayed on the HR Payslip? It seems it is not the RT table that contains these. In fact, RT contains the results s

  • Need Help on IDOC ACK

    Hi,      i Have a doubt on ACK of IDOC.actually the scenario is file to IDOC.in this scenario we are posting PO's to SAP R/3 from a legacy system.after posting into SAP system we want to get an acknowledement back to the legacy system.for that ack wh

  • Replacing in class file

    hi... is there a way to replace a word (variable) in a compiled class file? for example in a java program you wrote you have a variable called "countdown" and you want to search and replace the variable with "countup". well actually i know it's possi

  • EEM and sending syslog trap

    When using EEM applet or even EEM Script I have noticed a behavior, when sending syslog message like this action 30.1 syslog priority notifications msg "Usmerjevalnik $_info_routername: 1G LINK 2 UP (sla id = $sla_id) !!!" message does not appear in