OSB 11g - List business services with WLST

Hi,
We're using OSB 11.1.1.3 and 11.1.1.6 in several environments.
We just need to use wlst scripting to keep track of all business services and their endpoint uri's automatically.
We tried using some old scripts but found out that they don't work on 11g installations:
We tried the following code:
connect('weblogic','oracle10','t3://soavm2:7001')
domainRuntime()
sessionName = "FindServicesSession" + str(System.currentTimeMillis())
sessionMBean = findService(SessionManagementMBean.NAME, SessionManagementMBean.TYPE)
sessionMBean.createSession(sessionName)
servConfMBean = findService(ServiceConfigurationMBean.NAME + "." + sessionName, ServiceConfigurationMBean.TYPE)
alsbCore = findService(ALSBConfigurationMBean.NAME, ALSBConfigurationMBean.TYPE)
allRefs=alsbCore.getRefs(Ref.DOMAIN)
for ref in allRefs:
typeId = ref.getTypeId()
if typeId == "BusinessService":
serviceDefinition = servConfMBean.getServiceDefinition(ref)
endpointConfigration = serviceDefinition.getEndpointConfig()
print endpointConfigration
We get a "AttributeError: 'NoneType' object has no attribute 'getServiceDefinition'" error. It seems that it is related to metalink note "How To Modify Service Configurations By OSB JMX API [ID 1431254.1]". However the code provided there is for java through jmx, does anybody has a working example of how to do that on wlst?
Thanks!
p.d: already posted this question on wlst forum but got no answer...

You may like to refer metalink note 1380705.1 and OSB java API (section "Using MBeans in a script")-
http://docs.tpu.ru/docs/oracle/en/fmw/11.1.1.6.0/apirefs.1111/e15033/com/bea/wli/sb/management/configuration/SessionManagementMBean.html
Regards,
Anuj

Similar Messages

  • OSB 11g - list Proxy services with enabled tracing

    Hello.
    I went through OSB API and haven't found out a way, how to by script (Java or WLST):
    - list Proxy service with enabled 'Execution Tracing'
    - enabled and disable 'Execution Tracing'
    Is there a way, how to do this by script somehow? I know, how to do it in SB console (e.g. on Smart Search page), but that's not what I want.
    Thank you for your help

    You may like to refer metalink note 1380705.1 and OSB java API (section "Using MBeans in a script")-
    http://docs.tpu.ru/docs/oracle/en/fmw/11.1.1.6.0/apirefs.1111/e15033/com/bea/wli/sb/management/configuration/SessionManagementMBean.html
    Regards,
    Anuj

  • OSB:Publish to business service with for each in osb proxy message flow

    Hi,
    I have an external application that will make a call to my web-service and post a message to my queue "A" and i need to model my osb component such that it picks the message from that queue " A"and posts it to another queue "B". All this is done without any BPEL involved.
    for publishing the message i have created a business service that publishes a msg to the queue A and my proxy service is modelled such that it subscribes to this same queue A and publishes the msg to another business service (that posts it to a queue B).
    Everything is working fine but i have an issue in modelling my proxy message flow. If an external application sends a bulk msg i need to post the message one by one to my queue B. I have used for-each and Publish to BS but the msg doesn't get posted one by one. i know i am missing something please help me out.
    SOA Suite Version - 11.1.1.3

    Are you sure that your for-each definition is correct? Does the flow within the for-each get executed multiple times?
    You can check this by logging the variable to which you assign the message in the for-each. Don't forget to put the log level to Error, so you're sure that it's logged.
    Let's say you get a list of persons like the following xml in a variable personList
    <Persons>
    <Person>Glenn</Person>
    <Person>Prasanth</Person>
    </Persons>
    Your for-each definition should be the following.
    For each variable: person
    XPath: +./Person+
    In Variable: personList
    You don't mention the Persons element in the XPath expression since it is the root element of the XML. The root element is represented by . (dot).
    In the for-each, the variable person can be used like any other variable.

  • OSB 11g - testing Business service throws Premature end of file.

    Hi,
    I am testing a business service which invokes a webservice. I have a load balancer.
    When testing business service from test console, I get the error "SoapService.doPost: unparseable XML in client Soap request, exception: org.xml.sax.SAXParseException: Premature end of file."
    I tried the following options:
    1. Changed <http:Connection> to close
    2. Added -DHTTPClient.disableKeepAlives=true in console - Servers-osbserver - Server Start
    Any pointers will be helpful.
    Thanks
    Ganesh
    Error:
    The invocation resulted in an error: Internal Server Error.
         <SOAP-ENV:Envelope      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema">
         <SOAP-ENV:Body      xmlns:m="urn:www.my-url.com">
         <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Client.XMLFormatError</faultcode>
         <faultstring>Client XML Format Error</faultstring>
         <detail>
         <XML_PARSING_EXCEPTION>
         35: SoapService.doPost: unparseable XML in client Soap request, exception: org.xml.sax.SAXParseException: Premature end of file.
         </XML_PARSING_EXCEPTION>
         </detail>
         </SOAP-ENV:Fault>
         </SOAP-ENV:Body>
         </SOAP-ENV:Envelope>
    Response Metadata      
         <con:metadata      xmlns:con="http://www.bea.com/wli/sb/test/config">
         <tran:headers      xsi:type="http:HttpResponseHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <tran:user-header      name="Expires" value="Mon, 10 Jan 2011 17:49:17 CST"/>
         <tran:user-header      name="Last-Modified" value="Mon, 10 Jan 2011 17:49:17 CST"/>
         <http:Cache-Control>no-cache, no-store</http:Cache-Control>
         <http:Connection>Keep-Alive</http:Connection>
         <http:Content-Length>657</http:Content-Length>
         <http:Content-Type>text/xml</http:Content-Type>
         <http:Date>Mon, 10 Jan 2011 17:49:17 CST</http:Date>
         <http:Server>j2se/1.5x</http:Server>
         </tran:headers>
         <tran:response-code      xmlns:tran="http://www.bea.com/wli/sb/transports">2</tran:response-code>
         <tran:response-message      xmlns:tran="http://www.bea.com/wli/sb/transports">Internal Server Error</tran:response-message>
         <tran:encoding      xmlns:tran="http://www.bea.com/wli/sb/transports">iso-8859-1</tran:encoding>
         <http:http-response-code      xmlns:http="http://www.bea.com/wli/sb/transports/http">500</http:http-response-code>
         </con:metadata>

    35: SoapService.doPost: unparseable XML in client Soap request, exception: org.xml.sax.SAXParseException: Premature end of file.I am not sure but may be that the XML which you are passing as input, has got corrupted. Cross check the input XML and if possible use different input.
    Regards,
    Anuj

  • Specify filename in OSB File Trasport Business Service

    Hi All,
    Is it possible to specify the complete filename in OSB File Transport Business Service?
    the default behavior allows me to specify the prefix and suffix only, is it possible to override and specify the complete filename?
    Thanks,
    Tal

    Specifying the filename for outbound FTP transport in OSB the thread discusses with FTP BS and same would apply for File BS
    Manoj

  • Dynamic timeout for OSB proxy or business services

    The scenario we got here is that we will have multiple synchronous webservices implemented as OSB proxy services. These proxies will then invoke a common "routing" proxy that will determine which other OSB proxy or business services (JMS Request/Response) to call and does the dynamic routing.
    I understand that you can set a timeout at the business service level how long to wait for a response (at least when using the JMS transport). The problem is we got the requirement that the timeout value would be dependent on the role of the caller invoking the frontend webservice (this is done via some kind of lookup to determine the appropriate timeout setting for the invocation).
    Is this possible? I can't seem to find anything exposed in the transport header that allows me to set a timeout value during runtime. This means that the frontend proxy will be waiting for a response depending on the business service timeout setting. Can we implement a timeout in this frontend proxy somehow?
    Stumped right now over this. Thanks in advance for helping out.

    >
    Are there other reasons why you say it's not the most ideal way of development ?
    >
    Versioning binary files is always a pain. You can't compare them, you can't merge them ... Another point, if you put your jar archive with OSB artifacts under version control, you will most probably face issue related to end of line styles (mac, unix, windows).
    However, the most important point is usability. I want to version .proxy and .biz services to see right in IDE that I changed something and I should check that in for the others. I don't want to risk that I forget something. And I also want to see what other users committed, what sources they work on ... You loose all of that by versioning jar file. I would never go this way.

  • Need Java API's to create OSB proxy and Business Services

    Hi All,
    I need to create OSB proxy and business services using Java API's. Does any one have reference to the OSB APIs??

    AFAIK it is proprietary.
    What I do in a similar situation is to form XML for the services, package them into JAR the same way as an import JAR is packaged (creating ExportInfo resource, ...) and deploy with standard WSLT script. Works for simplest services only (direct proxies mostly) but I can also form security, alerts, throttling etc etc etc -- all in one shot.
    Out of sheer interest, may I ask you a question? Why do you need to create OSB services from Java?
    Vlad
    http://vladimirdyuzhev.com

  • Developing Business Services with ADF BC

    Hello all,
    I was following the tutorial at http://www.oracle.com/technology/obe/obe1013jdev/10131/bslayer/bslayer.htm#t2s5, which is Developing Business Services with ADF Business Components
    AND i was wondering if i could add a custom validation that would: prevent the user from entering a Gender IF the credit limit is greater than 400? Is this possible? If so, could some point me in the right direction
    Cheers

    Hi,
    you have two options:
    1. add the validation on the ADF BC model using a method validator. This would compare the two attributes and throw an exception if the business rule is violated
    2. Use a ValueChange Listener on the credit limit field (in association with a autosubmit=true setting on the field) to enable the gender field through a Partial Page Refresh. To programmatically refresh a field using PPR, you create a binding of the component to refresh o a managed bean using its binding property. Then you call
    AdfFacesContext.getCurrentInstance().addPartialTarget(<component reference here>)
    Frank

  • 10.1.3.1 : Developing Business Services with ADF BC tuto issues

    Hi,
    I was doing a learning session at my office based on the 'Developing Business Services with ADF Business Components' tutorial : http://www.oracle.com/technology/obe/obe1013jdev/10131/bslayer/bslayer.htm. The topic Creating ADF Business Components > 9 shows how to create EOs, VOs, AM and the corresponding UML diagram.
    When using JDev 10.1.3.1 :
    * the diagram is not generated as expected,
    * the java domains are not created from DB domains.
    Under JDev 10.1.3.2 :
    * the java domains are created from DB domains,
    * the diagram has been generated on 1 out of 3 computers.
    Any clues on what's going on or any known bugs ?
    Thanks,
    Seb.

    Hi,
    Today in 10.1.3.1 the diagram generation just works. It seems the keepResident extension was causing troubles as the exception stack trace mentioned its name... I just removed it.
    But still, the domains are not generated as expected. I've made several tests even in a fresh installation of JDeveloper 10.1.3.1.
    Seb.

  • Dynamic routing for a Business Service with multiple operations

    I have two business services with multiple operations. Business service A (bsA) has operations OpA1 and OpA2. Business service B (bsB) has operations OpB1 and OpB2.
    Depending on incoming Proxy message and operation, I have to do one of the following
    1. If someValue = A and operation= Op1 then invoke operation opA1 of bsA
    2. If someValue = B and operation= Op1 then invoke operation opB1 of bsB
    3. If someValue = C and operation= Op1 then invoke operation opA1 of bsA AND* operation opB1 of bsB and return aggregate data of both invocations
    1. If someValue = A and operation= Op2 then invoke operation opA2 of bsA
    2. If someValue = B and operation= Op2 then invoke operation opB2 of bsB
    3. If someValue = C and operation= Op2 then invoke operation opA2 of bsA AND* operation opB2 of bsB and return aggregate data of both invocations
    Using a dynamic route node or dynamic routing options, I am able to achieve cases 1, 2, 4, and 5.
    But for cases 3 & 6, I can not use a route node. When I use a Service call out instead, then I am forced to create a Operational branch but that does not seem like the best design since for every new operation added to the business services, I have to add a new branch to the Operational branch and redo all the functionality for that branch.
    Basically, I am looking to achieve the functionality of the Route node ( no need to specify the operation ).
    Any thoughts/ideas on what the best design would be?
    thanks

    For cases 3 & 6, why don't you route to another proxy service where you can simple do two service callouts, merge output data somehow and return them to the first proxy?
    If you look for "special route feature", that could possibly call two services for a single message, I'm afraid you won't succeed.

  • Sending Idocs to R/3 Error when Business Service with a party is configured

    Hi All,
    I'm facing some issue when posting idocs (FINSTA) back to R/3 when Business Service with a party is configured in my Integration Directory. However, I do not have this problem, if the
    Business System without Party is configured. It seems that 'adapter specific' setting doesn't
    seem to work when you have a party.
    I have read the same problem faced by other SDN members as well, some suggested to have the latest patch to solve the problem. FYI, I'm using latest patch SP 15, but the problem still exist. The error that I have in the sxmb_moni is "Unable to convert sender XI party http://sap.com/xi/XI / XIParty / GABXI100 to an IDoc partner".
    Please assist. Thanks.

    Hi Arun,
    Thanks for reply.
    What do you mean by XI Party must map to a party in the R3 in the partner profile?
    For example, If my Party Name in Integration Directory is ABC01, I should create a partner profile of ABC01 in my R3? How if I have business service under the Party ABC001, what should I configure in my R3?
    Currently My Partner Profile in R3 is type 'B' - Bank.
    Thanks for helps.

  • List Business Services Endpoints with WLST

    Hi,
    We're using OSB 11.1.1.3 and 11.1.1.6 in several environments.
    We just need to use wlst scripting to keep track of all business services and their endpoint uri's automatically.
    We tried using some old scripts but found out that they don't work on 11g installations:
    We tried the following code:
    connect('weblogic','oracle10','t3://soavm2:7001')
    domainRuntime()
    sessionName = "FindServicesSession" + str(System.currentTimeMillis())
    sessionMBean = findService(SessionManagementMBean.NAME, SessionManagementMBean.TYPE)
    sessionMBean.createSession(sessionName)
    servConfMBean = findService(ServiceConfigurationMBean.NAME + "." + sessionName, ServiceConfigurationMBean.TYPE)
    alsbCore = findService(ALSBConfigurationMBean.NAME, ALSBConfigurationMBean.TYPE)
    allRefs=alsbCore.getRefs(Ref.DOMAIN)
    for ref in allRefs:
    typeId = ref.getTypeId()
    if typeId == "BusinessService":
    serviceDefinition = servConfMBean.getServiceDefinition(ref)
    endpointConfigration = serviceDefinition.getEndpointConfig()
    print endpointConfigration
    We get a "AttributeError: 'NoneType' object has no attribute 'getServiceDefinition'" error. It seems that it is related to metalink note "How To Modify Service Configurations By OSB JMX API [ID 1431254.1]". However the code provided there is for java through jmx, does anybody has a working example of how to do that on wlst?
    Thanks!

    Hi Marc,
    What i found is that we can get list of business services URIs by consulting SERVICE_URI_TABLE...
    Here's a script that reads a parameter file (which can have multiple domains information) with connection info and then gets all services and prints a list of the service name and URI on a file for each domain...
    # params.txt format:
    # user,passwd,admin-url
    # Ej:
    # weblogic,weblogic1,t3://adminsoa:7001
    # weblogic,weblogic100,t3//adminsoa2:7001
    import wlstModule
    from com.bea.wli.sb.management.configuration import SessionManagementMBean
    from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
    from com.bea.wli.sb.management.configuration import BusinessServiceConfigurationMBean
    from com.bea.wli.sb.util import EnvValueTypes
    from com.bea.wli.config import Ref
    from com.bea.wli.sb.util import Refs
    from xml.dom.minidom import parseString
    f1 = open('/tmp/params.txt','r')
    for line in f1:
    spline=line.split(',')
    usr=spline[0]
    pwd=spline[1]
    url=spline[2].replace("\n","")
    try:
    connect(usr,pwd,url)
    domName=cmo.getName()
    domainRuntime()
    sessionMBean = findService(SessionManagementMBean.NAME,SessionManagementMBean.TYPE)
    sessionName="WLSTSession"+ str(System.currentTimeMillis())
    sessionMBean.createSession(sessionName)
    alsbSession = findService(ALSBConfigurationMBean.NAME + "." + sessionName, ALSBConfigurationMBean.TYPE)
    alsbCore = findService(ALSBConfigurationMBean.NAME, ALSBConfigurationMBean.TYPE)
    allRefs=alsbCore.getRefs(Ref.DOMAIN)
    fileName='/tmp/'+domName+'_'+url.replace('t3://','').replace(':','')+'_BServicesLista.csv'
    f2 = open(fileName, 'w')
    f2.write('Name'+','+'URL'+'\n')
    for ref in allRefs:
    typeId = ref.getTypeId()
    if typeId == "BusinessService":
    name=ref.getFullName()
    uris=alsbSession.getEnvValue(ref, EnvValueTypes.SERVICE_URI_TABLE, None)
    xml=parseString(uris.toString())
    xmlTag = xml.getElementsByTagName('tran:URI')[0].toxml()
    xmlData=xmlTag.replace('<tran:URI>','').replace('</tran:URI>','')
    f2.write('\"'+name+'\"'+','+'\"'+xmlData+'\"'+'\n')
    f2.close()
    except Exception,e:
    print "Error trying to connect to " + url + 'Error: ' + str(e)
    f1.close()
    disconnect()
    It's been working for us so far...

  • OSB call multiple Business Services and combine the responses into one

    Dear All,
    I am new to OSB and I have a use case that I need to solve. I have 3 web services and I imported their WSDLs into OSB and created 3 Business Services that goes with each WSDL. The scenario is like this.
    Business Service 1: takes an input value as [Region] and returns a list of employee names.
    Business Service 2: takes the list of employee names and returns the list of employee names with their job profile
    Business Service 3: takes the list of employee names with their job profile and returns their contact information.
    I need to return the result of Business Service 3 to the consumer. The consumer basically need to call the Proxy service with [Region] as the input value and the result should be the output of above Business service 3.
    As I mentioned, I have WSDL for all the 3 Business Services, but, I do not have the WSDL for the Proxy Service. The Business Service WSDLs are all different and they do not match.
    My question is it possible to achieve the above result without having a concrete WSDL for Proxy Service? Also, how can I go about solving this use case. I have gone through some articles that talk about Split-Join, and am really lost.
    I really appreciate your kind reply on this.
    Thanks in advance.
    Regards,
    Syama

    You have multiple options:
    1. Create a WSDL which has input similar to input of WS1 (only Region as input) and an output similar to output of WS3.
    Create Proxy Service based on this WSDL. Then call all the thee business services one after the other and doing transformations/assigns as needed after each call. Finally map the result of BS3 to the similar output of your new WSDL on which the Proxy service is based.
    2. Create an Any XML type of web service. Create a schema which has two elements, one for input and one for output. Input containing only Region and output containing all the details. All consumers need to send request according to input defined in schema and expect output defined in schema. Its similar to creating the WSDL but can be used in case your consumer do not want to call a Web Service but want to call an XML API over HTTP. Rest will be same as option 1.
    Split join is needed to make calls in parallel, it wont be usable in your use case unless you expect a list og regions in the same request for each of which you need to gather same information by calling three services.

  • USe of Business services with BPEL or ESB

    Hi,
    Has anyone come across any example on how to use Busiess services with BPEL or ESB.
    Oracle App Server , JDE 812 , Tools 8.98 , SOA suite 10g

    Samir,
    I don't see any answer for your post.
    Did you find a solution. I would be interested to know as how to integrate business services in JDE with BPEL/SOA 10g or 11G.
    I would appreciate if you could share the approach/solution you followed.Also, please let me know if there are any docs which I can for jde-fusion integration.
    Thanks
    Edited by: user13374451 on Jul 26, 2010 9:15 AM

  • Can OSB proxy and business service act as a stub ?

    Hi all,
    would like to enquire whether I can achieve the following. I have a web service consumer. Can the consumer call a OSB proxy service and within the proxy service, I use XQuery and extract the body and perform some transformation. And the proxy service return variables to the consumer? Without calling any business proxy in the process
    Can the proxy service act as a stub? Would I need a dummy business service for it?
    Or my objective cannot be achieved in OSB?
    Appreciate any thoughts.

    Hi,
    Assuming the incoming body contains "name: Peter, age: 13". Can the return information contain "name:Peter, age:13, Status: N"Yes, it's possible too, in your Response XQuery Transformation u can add n number of additional fields, and send back to requester.
    You can do both Translations and Transformations.
    Can I also configure the proxy service not to call any business service?Have you made/generated your proxy service from existing Business Service?
    If yes,: then your message flow would have only Route Node ( routing to Business Service).
    1. To do transformations on request add a Pipeline Pair in message flow and inside it add stage for doing XQuery transformations.
    2. Use Reply Action in stage as last Actions and do reply with Success.( The message flow won't go to Route actions after this ).
    IF No : Then either remove the OSB Action which is being used to call Business Service.
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Regards,
    Abhinav Gupta
    Edited by: Abhinav on Mar 8, 2013 3:27 PM

Maybe you are looking for

  • Print Job Stopped on HP1300 using APEX

    Hello, I noticed several user have problems with their printer connected via Airport. Mine used to work fine, until I changed my internet provider two weeks ago and had to input the new details, and re started the APEX. Internet is working very well,

  • Outlook duplicate sections after scrolling

    Hi! Our customer using Outlook 2013 from full Office 365 ProPlus suite installation (Click-to-Run from Office 365 portal). He has latest version and update installed. When he scroll down and up by mouse in Inbox Folder it sometimes makes virtualĀ "cop

  • HT5624 think i accidently signed in to facetime which has changed all my icons/settings how to i get back the way it was

    think i accidently singed in to face time which has changed my icons/settings ect how to i return to original

  • Cant install Tiger

    Help! I bought an eMac from my company when they sold them off, however i didn't get any disks with it, and the software wasn't working properly. So i decided to do a clean install like i do many times with windows XP. I bought a 4 CD version of Tige

  • Oracle Portal Test Enviroment

    Hi, I'd like to ask if there is a way to have a small Oralce portal test enviroment to test and to debug developed portlets locally using Oracle JDeveloper 10g on each developer machine instead of connecting to a standalone portal server . i cecheked