Advertise the package as a web service

Hi all
I used the version of JDeveloper: Studio Edition Version 11.1.1.5.0

I had to publish a package of database as a web service.

so I created a connection to the database in JDeveloper and then sailed to the packages and right clicked on the packaging and you click on publish it as a web service.
then deployed to weblogic server code, created the data source required in the weblogic with a size 15 connection.

It went well for a few days, and then I started to receive an error indicating that the connection pool is exhausted and that he cannot get a new connection of it.
see that the web service is still in test phase and there is not a lot of active users at the same time (less), it was weird that this happens.

After inspecting the code generated by JDeveloper, find that the code closes the connection only if there was no error in the call to the database.
something like
        try{
            __onnScopeMethod=__dataSource.getConnection(); 
            java.lang.String __jRt_3=xparam;
            oracle.xdb.XMLType __jRt_2=null;
            __jRt_2=null;
            if(__jRt_3!=null){
                __jRt_2=oracle.xdb.XMLType.createXML(__onnScopeMethod,__jRt_3);
            }
            __jRt_0=super._callDatabaseMethod(__jRt_2,__onnScopeMethod);

            if(__jRt_0==null){
                __jRt_0_x=null;
            } else {
                long __stringLen=__jRt_0.length();
                if(__stringLen>Integer.MAX_VALUE){
                    throw new java.sql.SQLException("CLOB too large: "+__stringLen);
                } else {
                    __jRt_0_x=__jRt_0.getSubString(1L,(int)__stringLen);
                }
            }
            __onnScopeMethod.close();

        } catch(java.sql.SQLException except){
            except.printStackTrace();
            throw new java.rmi.RemoteException(except.getClass().getName()+": "+
                                               except.getMessage());
        }
which translates the leakage of resources.

I have modified the code and deployed.

what I want to ask is: is this the correct behavior? or is this an error in the earlier version of jdeveloper?

After you deploy the modified code, I wasn't the same problem again, so should I file a bug report or what?

This is the final version of the code after change:

          Connection  __onnScopeMethod=null;
     try{
            __onnScopeMethod=__dataSource.getConnection();
            java.lang.String __jRt_3=xparam;
            oracle.xdb.XMLType __jRt_2=null;
            __jRt_2=null;
            if(__jRt_3!=null){
                __jRt_2=oracle.xdb.XMLType.createXML(__onnScopeMethod,__jRt_3);
            }
            __jRt_0=super._callDatabaseMethod(__jRt_2,__onnScopeMethod);

            if(__jRt_0==null){
                __jRt_0_x=null;
            } else {
                long __stringLen=__jRt_0.length();
                if(__stringLen>Integer.MAX_VALUE){
                    throw new java.sql.SQLException("CLOB too large: "+__stringLen);
                } else {
                    __jRt_0_x=__jRt_0.getSubString(1L,(int)__stringLen);
                }
            }
            __onnScopeMethod.close();

        } catch(java.sql.SQLException except){
            except.printStackTrace();
            throw new java.rmi.RemoteException(except.getClass().getName()+": "+
                                               except.getMessage());
        }finally{
          if(__onnScopeMethod!=null && !__onnScopeMethod.isClosed()){
               __onnScopeMethod.close();
          }
       }

Tags: Java

Similar Questions

  • How to move all of the FORM to a Web service?

    What is the proper way to pass all of the form to a Web service? I can do my work of CFCS with 1 param, who is the FORM, but when I try to use the CFC as a Web service I get a type mismatch error. The must be a way to pass all of the form to a Web service rather than to me, creating a bunch of parameters for each element of the form, I just can't find an example of anywhere. I know I can't be the only person to ask this question.

    ..

  • is it possible to return a figure to the database from a web service

    I have a REST web services configuration that has 4 values

    Is it possible to use a db call to enter these 4 values that can be used in an insert in the database?

    Thank you

    Yes it is available: [url http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/t_dburi.htm#i1007928] 10.2 documentation packages and Types.

    You must copy my blog instead: my answer was typo with a T too much ;-)

    Edit: Fixed the URL

    Published by: Kim Berg Hansen on October 19, 2012 10:00

  • Failure of the Validation of WSDL (Web Services)

    I want to create a Service-Based Web Application in LabVIEW and I'm trying to go through the steps in the tutorial http://zone.ni.com/devzone/cda/tut/p/id/4728.

    I tried the following web services, but I still get the same error.

    http://coeservice.en.KKU.AC.th:8080/TemperatureConvertor/TemperatureConvertorService? WSDL

    http://www.ecubicle.NET/iptocountry.asmx?WSDL

    Error:

    The WSDL Validation failed.

    Validation failed. The URL is not formatted correctly and must be in the following form: http://localhost/test/good.asmx?WSDL

    I set a proxy with authentication. Without that, I have another error:

    Validation failed.

    The possible reasons are:

    1. the URL does not exist or the WSDL file is bad.

    2. authentication is not correct.

    3 proxy information is not correct.

    So, it seems that the proxy information is ok. But the web service I want to access is not located on the localhost - I want to access a Web service. Can someone give me a hint? I tried to change some parameters of the LabVIEW Web server. But it did not help anything.

    David

    Hi David,

    I tried second link you gave and worked perfectly (without authentication). One gives me the error that you mentioned.

    Are you sure that this URL exists?

    Andrea Perin

    Application engineer

    OR Germany

  • OfficeJet Pro 8625 not connected to the network - no active web services

    Just bought this printer and cannot get the active web services! Keeps telling me printer not connected to the network. Printing and scanning very well. It is connected via USB.

    Hello

    You need to connect the printer to a network in order to enable Web Services, those who will not work with a USB connection, such as those that require an internet connection.

    You can follow the steps below to connect the printer to the network and configuration for the ePrint printer:

    http://support.HP.com/us-en/document/c03721293

    Shlomi

  • Delete the MSE 3.0 (Web Services Enhancement?) before the upgrade from Vista to Windows 7

    Eager to upgrade Vista to Windows 7. Windows 7 compatibility report recommends to uninstall 'Microsoft WSE 3.0' of different searches, I think it's Web Services Enhancemment, a Microsoft Developers application.  (But I also get many results Windows secuity Essentials). In any case, I can't find WSE 3.0 in the normal control panel > uninstall program page.  I can't find it under start > all programs of research with Windows Explorer.  The compatibility report is specific says that I have Version3.0.5305.0. But where is it and how do I uninstall it. Thank you

    Hello

    Thank you for your response.

    Glad to know that you have addressed the issue.

    Your efforts to solve this problem is appreciated. Please do not hesitate to answer, in the case where you are facing in the future other problems with Windows.

  • Receiving the EventInfo object for Web Service alerts as null?

    I have set up the web as service:

    Service endpoint interface

    @WebService (targetNamespace = "http://prosight.com/wsdl/7.0/EventSink/")

    @SOAPBinding (style = Style.RPC)

    public interface {OPPMAlertWebService}

    @WebMethod public void itemAddedToPortfolio (PsPortfoliosItemAddedToPortfolioEventInfo eventObj);

    @WebMethod public void categoryConditionMet (PsPortfoliosCategoryConditionMetEventInfo eventObj);

    @WebMethod public void multipleCategoryConditionMet (PsPortfoliosMultipleCategoryConditionsMetEventInfo eventObj);

    @WebMethod public void phaseModified (PsPortfoliosPhaseModifiedEventInfo eventObj);

    @WebMethod public void deliverableModified (PsPortfoliosDeliverableModifiedEventInfo eventObj);

    @WebMethod public void actionItemModified (PsPortfoliosActionItemModifiedEventInfo eventObj);

    }


    Implementation of the service

    @WebService (endpointInterface = "com.ws.OPPMAlertWebService", targetNamespace = "http://prosight.com/wsdl/7.0/EventSink/")

    / public class OPPMAlertWebServiceImpl implements OPPMAlertWebService {}

    Item added to the triggered event portfolio

    @Override

    {} public void itemAddedToPortfolio (PsPortfoliosItemAddedToPortfolioEventInfo eventObj)

    System.out.println ("added \n--Item method called-");

    }

    Category Condtion meeting triggered event

    @Override

    {} public void categoryConditionMet (PsPortfoliosCategoryConditionMetEventInfo eventObj)

    System.out.println ("\n--Category filled Condition method called-");

    }

    Several categories filled Condition triggered event

    @Override

    {} public void multipleCategoryConditionMet (PsPortfoliosMultipleCategoryConditionsMetEventInfo eventObj)

    System.out.println ("\n--Multiple category method called - filled Condition");

    }

    Updated the event triggered the phase

    @Override

    {} public void phaseModified (PsPortfoliosPhaseModifiedEventInfo eventObj)

    System.out.println ("\n--Phase method called - changed");

    }

    Events updated the deliverable triggered

    @Override

    {} public void deliverableModified (PsPortfoliosDeliverableModifiedEventInfo eventObj)

    System.out.println ("\n--Deliverable method called - changed");

    }

    Follow-up activity for change event triggered

    @Override

    {} public void actionItemModified (PsPortfoliosActionItemModifiedEventInfo eventObj)

    System.out.println ("\n--Action element modified method called-");

    }


    Editor of endpoint

    public class OPPMAlertWebServicePublisher {}

    Public Shared Sub main (String [] args) {}

    URL of the Web Service

    " String url = ' http://URL ";

    System.out.println ("\nOPPM Alert Web Service published on" + url);

    Endpoint.Publish (url, new OPPMAlertWebServiceImpl());

    }

    }

    The service works very well all the get methods called on respective alert events here, but whenever I tried to use the EventInfo object he throws NullPointer Exception. I get the EventInfo objects as null in these methods but the audit log shows event information are sent by the Madaboutangling. Y at - it another way to configure this service to receive the EventInfo object or where I have to change to receive the EventInfo object?

    EventInfo object using there is Exception as:

    -Added point method called-

    October 15, 2015 05:30:52 com.sun.xml.internal.ws.server.sei.TieHandler createResp

    onse

    GRAVE: null

    java.lang.NullPointerException

    at com.ws.OPPMAlertWebServiceImpl.itemAddedToPortfolio(OPPMAlertWebServiceImpl.java:25)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at sun.reflect.misc.Trampoline.invoke (unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at sun.reflect.misc.MethodUtil.invoke (unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at com.sun.xml.internal.ws.api.server.MethodUtil.invoke (unknown Source)

    to com.sun.xml.internal.ws.api.server.InstanceResolver$ 1.invoke(Unknown Source)

    to com.sun.xml.internal.ws.server.InvokerTube$ 2.invoke (unknown Source)

    to com.sun.xml.internal.ws.server.sei.SEIInvokerTube.processRequest (Unknown Source)

    at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun (unknown Source)

    at com.sun.xml.internal.ws.api.pipe.Fiber._doRun (unknown Source)

    at com.sun.xml.internal.ws.api.pipe.Fiber.doRun (unknown Source)

    at com.sun.xml.internal.ws.api.pipe.Fiber.runSync (unknown Source)

    to com.sun.xml.internal.ws.server.WSEndpointImpl$ 2. process (unknown sourcee)

    to com.sun.xml.internal.ws.transport.http.HttpAdapter$ HttpToolkit.handle(unknown Source)

    at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle (unknown SouNCE)

    at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(Unknown Source)

    to com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle (acalled Source)

    to com.sun.net.httpserver.Filter$ Chain.doFilter (unknown Source)

    at sun.net.httpserver.AuthFilter.doFilter (unknown Source)

    to com.sun.net.httpserver.Filter$ Chain.doFilter (unknown Source)

    to sun.net.httpserver.ServerImpl$ Exchange$ LinkHandler.handle (unknown SouNCE)

    to com.sun.net.httpserver.Filter$ Chain.doFilter (unknown Source)

    to sun.net.httpserver.ServerImpl$ Exchange.run (unknown Source)

    at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)

    at java.lang.Thread.run (unknown Source)

    I rarely use java for Madaboutangling, but I would check the to see if the psPortfoliosEventInfo object has been generated with the correct namespace.  Here is a c# class generated from a web job alert.

    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.18020")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://prosight.com/type/Portfolios/5.0/psPortfoliosWebServiceAlert")]
    public partial class psPortfoliosItemAddedToPortfolioEventInfo : psPortfoliosEventInfo {
    
    private psADDED_CREATED addedCreatedField;
    
    private psPortfoliosItemInfo addedItemInfoField;
    
    /// 
    public psADDED_CREATED AddedCreated {
    get {
    return this.addedCreatedField;
    }
    set {
    this.addedCreatedField = value;
    }
    }
    
    /// 
    public psPortfoliosItemInfo AddedItemInfo {
    get {
    return this.addedItemInfoField;
    }
    set {
    this.addedItemInfoField = value;
    }
    }
    }
    
    /// 
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosMultipleCategoryConditionsMetEventInfo))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosCategoryConditionMetEventInfo))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosPhaseModifiedEventInfo))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosActionItemModifiedEventInfo))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosDeliverableModifiedEventInfo))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosItemAddedToPortfolioEventInfo))]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.18020")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://prosight.com/type/Portfolios/5.0/psPortfoliosWebServiceAlert")]
    public partial class psPortfoliosEventInfo {
    
    private string alertGuidField;
    
    private string alertNameField;
    
    private psPortfoliosItemInfo scopeInfoField;
    
    private System.DateTime eventDateTimeField;
    
    private int ownerIdField;
    
    private string ownerLoginField;
    
    /// 
    public string AlertGuid {
    get {
    return this.alertGuidField;
    }
    set {
    this.alertGuidField = value;
    }
    }
    
    /// 
    public string AlertName {
    get {
    return this.alertNameField;
    }
    set {
    this.alertNameField = value;
    }
    }
    
    /// 
    public psPortfoliosItemInfo ScopeInfo {
    get {
    return this.scopeInfoField;
    }
    set {
    this.scopeInfoField = value;
    }
    }
    
    /// 
    public System.DateTime EventDateTime {
    get {
    return this.eventDateTimeField;
    }
    set {
    this.eventDateTimeField = value;
    }
    }
    
    /// 
    public int OwnerId {
    get {
    return this.ownerIdField;
    }
    set {
    this.ownerIdField = value;
    }
    }
    
    /// 
    public string OwnerLogin {
    get {
    return this.ownerLoginField;
    }
    set {
    this.ownerLoginField = value;
    }
    }
    }
    

    V/r,

    Gene

  • The unauthorized JAX - RPC web service client?

    I try to call a 3rd web service part using a WSDL I can't control.  I was unable to send requests by using a style JAX - WS client and errors have led me to believe that this was due to the WSDL using the RPC/Document model.  Checks showed there is, in fact, the primitive methods of return base schema.  My understanding is that I have to use a JAX - RPC client in this case.

    JDev generated successfully objects, but I got whitelist errors that I have deployed in the cloud.  Basically, any class that referred to java.rmi failed (as documented) - and that's almost all main objects for the customer.

    Is there a way around this problem?

    • Is there another method to generate JAX - RPC clients?
    • The cloud is possible to accept the java.rmi. * classes?
    • Is there a way to force the web services JAX - WS upset WSDL RPC/Document?

    Thank you

    Alex

    I do not think that RPC is supported, see unsupported features and API which States:

    Feature not supported Alternative

    Web services based on JAX - RPC.

    Convert in JAX - WS web services.

    Remote invocations with a transport protocol other than HTTPS (including the HTTP text).

    Does not apply.

    --

    Jani Rautiainen

    Relationship with the developers of Applications in fusion

    https://blogs.Oracle.com/fadevrel/

  • ADF Mobile Page with the data control of Web Service not showing latest results

    Hello

    I developed a simple mobile application of ADF. It has two functions members and subscriptions. These two pages are part of my Taskflow. On the members page I show all members in a list by using the Web Service method data Find command. In the list item have a listener property Set where I'm storing MemberId in a variable of pageFlowScope for action. On the subscription page, I have a bar graph that gets the data with the help of a Find method in control of data to the Web Service. The find method is based on a view created criteria which has a member ID of input parameter. in the model of ADFBC project. I connected the variable using the AMX page binding. The variable is being levied on the pageFlowScope variable.

    The page displays the chart first to a member. And shows the same graph for the other members. I printed the memberId variable and it shows the value of the respective members. But the cards are not get updated every time I select new Member.

    I use JDeveloper 11.1.2.4.0.

    Any suggestions?

    Thank you

    Mehabub

    Go to the Connections tab, and then click the Green plus sign on the central section - you need to add a 'invokeAction. Give it a name, and then select the iterator that built the table, and that's all you should have to do. The invokeAction fires whenever you visit the page and should update the list.

    Rich,

  • How to create the new record of web service in the ADF?

    Hello, I use JDeveloper 11.1.2.3.0. I created a class and published as a web service. I created a web method like this:

       public void addNewRow(MyObject cob)

    {

    MyAppModule myAppModule = new MyAppModule();

    try {

    ViewObjectImpl vo = myAppModule.getMyVewObject1();

    ================> vo object is now null

    Row r = vo.createRow();

    r.setAttribute("Param1", cob.getParam1());

    r.setAttribute("Param2", cob.getParam2());

    vo.executeQuery(); getTransaction().commit();

    }

    catch (Exception e) { e.printStackTrace(); }

    }

    As I have written in the code, myAppModule.getMyVewObject1 () returns a null object. I do not understand why! AFAIK AppModule must initialize the object itself, when I call "getMyVewObject1()", but maybe I'm wrong, or maybe that's not the way it should be for the web methods. Has anyone ever have this problem? Any help would be much appreciated.

    You must use Configuration.createRootApplicationModule () to create the new instance of AM.

    Example: creating root Application Module Instance & #8211; Oracle ADF | Techiecook & #039; s Nook

    Also, the methods in your AM can be automatically exposed as service web soap:

    Andrejus Baranovskis blog: Web Service Interface for molten Oracle 11 g ADF BC Application Module

    And note that your code has other issues, for example:

    vo.createRow () will not automatically add this line to the View object.

    vo.executeQuery () is not necessary...

    Dario

  • Simple way to check the status of EPM web services

    Hi all

    I need a shell script that would check the status of all EMP web services (HSS, APS and EAS for now)...

    --

    I notice that the content of the below URL provides a way to check the status of the workspace:

    http://Server1:28080 / status/work space

    <? XML version = "1.0" encoding = "UTF-8"? >

    <Status >

    "<Initialization State="LOAN" attemptCount="1"/ > " "

    <Code >0 < /Code >

    <Message >workspace runs normally. < /Message >

    <Products >

    <Product >bpm < /product >

    <Product >workshop < /product >

    <Product >APS < /product >

    < /Products >

    < /status >


    Note that server1 run HSS, APS and EAS.

    The below URL is not very informative...

    http://Server1:28080 / status

    Status: Active

    -> Someone knows of other ways / URL that can provide a summary of the status of the managed servers? I intend to use a shell script to analyze the rest of these URLs in order to assess the health of services... I guess that there is a way of using WLST to check the status of the managed server, as these services are controlled via the Console of Administration WebLogic web app.

    Thank you!

    Have a read of the following Oracle support doc - "Troubleshooting Oracle Hyperion Enterprise Performance Management 11.1.2.0 or 11.1.2.1 11.1.2.2 utilities 11.1.2.3 [Video] (Doc ID 1303200.1).

    He has a list of URLS to check the status of web applications.

    See you soon

    John

    http://John-Goodwin.blogspot.com/

  • Problems with recursive path of the inventory (c# and web services)

    For starters, let me say that my goal was to write a piece of code that would take the ManagedObjectReference (MOR) of HostSystem when given the MOR in the folder root ESXi system.

    However I can't get this to work with recursion at all. I could just manually each way (no recursion), but because I need to work with the web services SDK much, I really want to get this working.

    I usually get exceptions like "traversal spec labeled" or "invalid type. Invalid type is caused by an error in the capitalization of the letters in the TraversalSpec.type property. But why it tells me I have a "labeled traversal spec' when I took care to specify the names in each TraversalSpec.

    Can anyone provide an example on how to set up a PropertyFilterSpec to browse from the folder root to HostSystem using recursive calls via SelectionSpec?

    Below is some of my code relating to the crossing of the inventory. It's a mess right now and not exactly set up for recursive as calls I kept trying different things to make it work.

    Help is greatly appreciated.

                   ObjectSpec objSpec = new ObjectSpec();
                PropertySpec pSpec = new PropertySpec();
                PropertyFilterSpec pFilterSpec = new PropertyFilterSpec();
    
                SelectionSpec sSpec = new SelectionSpec();
                sSpec.name = "travelFolder";
    
                SelectionSpec sSpec2 = new SelectionSpec();
                sSpec.name = "travelDCtoFolder";
    
                TraversalSpec travelDCtoFolder = new TraversalSpec();
                travelDCtoFolder.name = "travelDCtoFolder";
                travelDCtoFolder.skip = false;
                travelDCtoFolder.type = "Datacenter";
                travelDCtoFolder.path = "hostFolder";
                travelDCtoFolder.selectSet = new SelectionSpec[] { new SelectionSpec() };
                travelDCtoFolder.selectSet[0].name = "travelFolder";
    
                TraversalSpec travelCRtoHF = new TraversalSpec();
                travelDCtoFolder.name = "travelCRtoHF";
                travelDCtoFolder.skip = false;
                travelDCtoFolder.type = "ComputeResource";
                travelDCtoFolder.path = "host";
    
                TraversalSpec travelFolder = new TraversalSpec();
                travelFolder.name = "travelFolder";
                travelFolder.type = "Folder";
                travelFolder.path = "childEntity";
                travelFolder.skip = false;
                travelFolder.selectSet = new SelectionSpec[] { };
    
    
    
                objSpec.obj = hostMOR;
                objSpec.skip = false;
                objSpec.selectSet = new SelectionSpec[] { travelFolder, travelDCtoFolder, travelFolder, travelCRtoHF };
    
                pSpec.type = "ManagedEntity";
                pSpec.pathSet = new string[] { "name" };
    
                pFilterSpec.objectSet = new ObjectSpec[] { objSpec };
                pFilterSpec.propSet = new PropertySpec[] { pSpec };
    

    Here is an example in Java in VI it is must show the way:

            TraversalSpec findHosts = new TraversalSpec();
            findHosts.setType("ComputeResource");
            findHosts.setPath("host");
    
            SelectionSpec recurseFolders = new SelectionSpec();
            recurseFolders.setName("FolderParent");
    
            TraversalSpec findClusters = new TraversalSpec();
            findClusters.setType("Datacenter");
            findClusters.setPath("hostFolder");
            findClusters.setSelectSet(new SelectionSpec[] {recurseFolders} );
    
            TraversalSpec findFolders = new TraversalSpec();
            findFolders.setName("FolderParent");
            findFolders.setType("Folder");
            findFolders.setPath("childEntity");
            findFolders.setSkip(Boolean.FALSE);
            findFolders.setSelectSet(new SelectionSpec[] { recurseFolders, findClusters, findHosts });
    
            ObjectSpec searchFromRoot = new ObjectSpec();
            searchFromRoot.setObj(si.getRootFolder().getMOR());
            searchFromRoot.setSelectSet(new SelectionSpec[] { findFolders });
    
            PropertySpec reportHostName = new PropertySpec();
            reportHostName.setType("HostSystem");
            reportHostName.setPathSet(new String[] { "name" });
    
            PropertyFilterSpec pfSpec = new PropertyFilterSpec();
            pfSpec.setObjectSet(new ObjectSpec[] { searchFromRoot });
            pfSpec.setPropSet(new PropertySpec[] { reportHostName });
    
            PropertyCollector pc = si.getPropertyCollector();
            ObjectContent[] ocs = pc.retrieveProperties(new PropertyFilterSpec[] { pfSpec });
    
            if (ocs != null) {
                for (ObjectContent oc : ocs) {
                    ManagedObjectReference dc = oc.getObj();
                    DynamicProperty[] props = oc.getPropSet();
                    if (props != null && props.length == 1) {
                        String name = (String) props[0].getVal();
                        System.out.println("Found " + dc.getType() + " name is '" + name + "'");
                    }
                }
            }
    

    It's a bit old, so I don't know I can explain it all, but here goes.

    First of all, the ObjectSpec specifies the root folder as starting point, with the 'findFolders' TraversalSpec tell what to look for from there.

    Second place, findFolders, which specifies a found file, select the objects in its list of childEntity.

    If the selected child object of a folder is another folder, the SelectionSpec 'recurseFolders' will point to "findFolders" looking for the child.

    If the selected child object of a record is a data center, "findClusters" will choose its object 'hostFolder' and again use "recurseFolders" looking for this folder.

    If the selected child object of a record is a ComputeResource, he will choose the objects in his list of 'host' and look no further.

  • Set the Proxy Server for Web services

    Hello

    I am trying to create a web service via the WSDL Wizard (Apex 4.0.2). We are behind a firewall and connect to the internet through a proxy server. The proxy server requires authentication with a user name and password. Does anyone know how to include the user name and password to set the Proxy Server in the Application definition page or possibly in another location on the page of the Web Service Wizard of manual? I guess the basic definition of the proxy server's [http://]host[:port]]

    Thanks in advance,
    The

    You can add your user name and password to the definition of the proxy server. Then it will look like
    http://:@:

  • Can't access to the following endpoint: (external Web service)

    Hi all

    I'm trying to connect to a web service using WSDL, which is given by the osm, using Oracle SOA.
    I created the emconsole key file and created the user in adminconsole and applied the wss_http_token_client_policy to this webservice. When I try to connect to the Oracle SOA web service, I get exception below:

    < env:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:env >
    < env:Header / >
    < env:Body >
    < env:Fault >
    env:Server < faultcode > < / faultcode >
    oracle.fabric.common.FabricInvocationException < faultstring >: can't access to the following endpoint: http://hostname/osm/wsapi < /faultstring >
    < faultactor / >
    < detail >
    < exception > unable to access to the following endpoint: http://hostname/osm/wsapi < /exception >
    < / details >
    < / env:Fault >
    < / env:Body >
    < / env:Envelope >

    Can someone help me in problem solving.

    Thanks in advance,
    Ajay

    Published by: Ajay8706 on October 18, 2012 23:36

    Try the wss_username_token_client_policy

    Check here: BPEL to invoke the secure with HTTP Basic authentication Web service

  • Change the password using API web services?

    I can create and update users using Adobe Connect API web services, but how do I change the password of a user?

    I use the API "principal-update" that has a setting of password, but according to the documentation, it is only used for new users... not the users.

    So exactly how to change user password using the web services?

    Hello

    There is an API that can be used to change the password: user-update - pwd

    Format of the API :

     

    http://server_name/API/XML?action=user-update-pwd&user-ID=integer&password-old=string&pass = word string - string verify password = & session = BreezeSeesionCookieValue.


    Hope this helps!

    Thank you

    Nikhil

Maybe you are looking for

  • Firefox is breaking Web site

    Hey there! I'm working on a site and it looks good in other browsers, but Firefox is breaking. The site is http://thefabme.com/. Let me enumerate all the items that are in violation: 1. the text in the blog circle moves upward. 2. the search magnifyi

  • AirPlay does not have El Capitan 10.11.2 (15 c 50)

    After the upgrade to El Capitan 10.11.2 (15 c 50) iTunes crashes when you try to connect to the airplay, n D7050 device. Computer's MacBook Pro (retina, 13-tòmmers, first half of 2015)

  • Time protection Boot Norton

    My computer: Windows Vista SP2 32-bit (Home Premium) network, Internet explore 8 No. I use Norton Antivirus through Comcast.  I made NO changes in the field of Automatic Protection . When looking through the settings I noticed that all of the setting

  • E520 - huge problems :(

    Hello guys,. I registered here with the hope that you will help me. I have a lot of problems with my E520 and... PLEASE HELP ME 1. After installing win7 windows cannot find a suitable driver for: Standart VGA graphics card, PCI Simple Communications

  • As a result of two orders of product Media Center keys validation problems

    10/26-11/16, I installed Windows 8 on four 4 machines.  For two of them, I ordered Media Center product keys.  The first installation (purchase 10/26) went well.  However, the installation of the second (the last purchase) using the second key to MC