Runtime error in workflow using the API Web service with a VC:VirtualMachine parameter

Hello

I took the example for the execution of a workflow using powershell via the site Web of Joerg Lew Web service API and changed to pass an input parameter to the name of the Virtual Machine.

I have no error in powershell, but when I check the events for the workflow in Orchestrator I see it failed with the error "Validation error for the parameter"vm". It's using out of the box "Start virtual machine and wait" stream  Is a problem with a virtual machine name is paid as a string? I tried to use the full name of the virtual machines and the ID.  I have provided the code below.  Can someone help with how to get this working?

$vcoWS = new-WebServiceProxy-VCO, VCO - Namespace - Uri of the class http://192.168.1.65:8280 / vmware-vmo-webcontrol/webservice? WSDL
$workflows = $vcoWS.getWorkflowsWithName ("Start the virtual machine and wait", "vcoadmin", "vcoadmin")
$workflow = $workflows [0]
# print the input parameters
$workflow.inParameters
# generates the table with input parameters (WorkflowTokenAttribute - objects)
$inparams = @)
# fill in the table, an entry for each input parameter
$inparams += new-Object - TypeName VCO. WorkflowTokenAttribute
$inparams [0] .name = "VM".
$inparams [0] .Guy = "VC:VirtualMachine."
$inparams [0] .value = "vm-113.
#... turns on and off (use $null on $inparams if the workflow has no input parameter
#... und implement
$workflowToken = $vcoWS.executeWorkflow ($workflow.id, $inparams, "vcoadmin", "vcoadmin")

Thank you

David

Hi David,

> game $inparams [0] = "VC:VirtualMachine".

This means that the type of entry for this workflow is an object of type 'VC:VirtualMachine '. So, passing the name of the virtual machine would not work. The expected value for such an entry is the string representation of an object which, in the case of the vCO is a unique object identifier. The object id unique vCO looks like this:

dunes://service.dunes.ch/CustomSDKObject?ID= "15.23.34.34/vm-590'&dunesName='VC:VirtualMachine".

but you don't need to know this (technically, if you know the ip address of the vCenter and the id of the virtual machine can be built but is not a recommended practice).

The right way to find the string representation of the object "VC:VirtualMachine" with the name you need to do a few more things. I'll do the example in java and it should be easy to turn into powershell.

QueryResult result = vcoWS.find ("VC:VirtualMachine", "xpath:name = \" vm-113\ "", username, password);

String stringObjectRepresentation = null;

If (result.getTotalCount () > 0) {}

FinderResult = result.getElements () FinderResult [0];

stringObjectRepresentation = finderResult.getDunesUri ();

}

Thus, the stringValue should be attributed to the line:

$inparams [0] .value = stringObjectRepresentation

Hope it will help.

Without doubt, Joerg would be able to illustrate this solution with powershell later ;-)

Tags: VMware

Similar Questions

  • Use the MapPoint Web Service with MX7

    Can anyone offer guidance for the use of Microsoft MapPoint web service? I searched around, but found no usable information. My immediate concern is how to get my CF7 application to perform Digest authentication, but I would also appreciate advice for all the other obstacles that may occur after.

    Thank you
    James

    So here's what I had to do to make this work with CF7:

    1. edit wwwroot/WEB-INF/client-config.wsdd use CommonsHTTPSender by Tom Jordahl's blog ( http://tjordahl.blogspot.com/2007/03/apache-axis-and-commons-httpclient.html).

    2. put the Commons-httpclient - 3.1.jar and Commons-codec - 1.3.jar in CFusionMX7/lib. These pots are available from the Apache Commons project ( http://commons.apache.org/).

    3. Add a web service entry in the CF administrator. For the code example works, use the name of MapPoint. The URL is the wsdl of normal staging area ( http://staging.mappoint.net/standard-30/mappoint.wsdl), and the user name and password are those issued by Microsoft for your account of mappoint.

    The CF application service must be restarted to pick up pots of apache Commons. At this point, the code example must be executable. It displays an input field you can type an address in (for example "1 microsoft way, redmond, wa") and displays a map when submitted. The code is fairly simple and does not take into account things like the possibility of several search results.

    Since this is all in CFML, some used as inputs of the function helper objects must be designed as CF structs, the data members of the java objects in mirror. This is a problem in creating a MapView object because there is no way to indicate which of the derived classes (ViewByHeightWidth, ViewByScale, etc.) you intend. My solution is to use a view object returned by GetBestMapView().

    Hope this is useful to someone.

    James

  • Problem update the payload using the API of Services of Workflow task

    I have problems to update the part of the payload of a task by using the API of Services of Workflow (10.1.3) using the SOAP protocol. Try to use the setPayloadAsElementmethod, it seems, that the element of the payload is deleted rather than being defined.

    The purpose of the payload is constructed as follows:

    DocumentBuilder builder is DocumentBuilderFactory.newInstance () .newDocumentBuilder ();.
    Document document = builder.newDocument ();

    Support useful item = document.createElementNS ("http://xmlns.oracle.com/bpel/workflow/task", "payload");
    Child element = document.createElementNS ("http://xmlns.oracle.com/pcbpel/test/order", "command");
    payload.appendChild (child);

    The following lines are used to retrieve and update the subject of the task:

    IWorkflowContext context = getWorkflowContext (userId);
    Task task = taskQueryService.getTaskDetailsById (context, taskId);

    task.setPayloadAsElement (payload);
    taskService.updateTask (context, task);

    However, for some reason, it seems that the payload is not set correctly and in time updateTask is called on the TaskService object, payload of the task is not available. In turn, this causes an error when the SOAP request must be encoded (since the WorkflowTask schema requires a "payload" element).

    I run the code in a debugger and noticed that the the task object has a field nodeArray, which initially contains an element of payload. After the call to setPayloadAsElement has been run, no element of the payload is present in the field of the nodeArray and the mIsPayloadChanged field has been set to true.

    Code is taken almost directly from one [example in the documentation of the API: http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28985/oracle/bpel/services/workflow/task/model/TaskType.html#setPayloadAsElement_org_w3c_dom_Element _] and I'm completely lost as what to do differently. Could there be a problem with the way the Document object is built?

    Everyone knows about similar problems? Any guidance would be appreciated.

    See you soon,.
    Emil

    P.S. I also tried to spend in an element of payload without child element that does not work either.

    Hi Emil,

    Your code looks ok. However, I use the oracle.bpel.services.common.util.XMLUtil object to generate the document object.

    Document document = XMLUtil.createDocument ();

    was soon Nicolas

  • Do CPO dynamic media transforming workflow using the API or any other means?

    Do CPO dynamic media transforming workflow using the API or any other means?

    Could we create or update workflows when running?

    There is no workflow WSDL. But I'm not sure of the custom here. Can you describe your use case or what you try to do this will have to change a process/workflow during execution?

  • The implementation of RunProgramInGuest of VIX using the vSphere Web Services SDK?

    Hello

    A few months ago I developed a python API for VIX, but as I needed to extend the functionality of this API (performance monitoring, host management, etc.) I moved the vSphere Web Services SDK.

    However, I did find a way to implement some comments VIX as LoginInGuest or RunProgramInGuest functions using only the Web Services SDK.

    Is there a way to do this? I thought that each function VIX has been translated internally to a soap request, but now I think that is not the case for these functions of comments, if so, how VIX inwardly does them?

    Thanks for your help!

    Sebastian Tello

    Currently, if you must implement specific comments operations running a specific script/application or by connecting to a guest, you must use the VIX API. This feature is not currently exposed in the vSphere API, you will need to use a combination of both, until VMware them integrates in the vSphere API core. For more details on the future of VIX, take a look at this blog post - http://www.virtuallyghetto.com/2010/11/what-is-vmware-vix-api-and-its-future.html

  • How to call a Web service with more than 1 parameter value?

    I have a Web service with a query as an array of String parameter.
    In an invoing xml, it should looks like:

    < GetPersonsData_Request >
    < application >
    < PersonIdList >
    < string 111 > < / string >
    < string > 222 < / string >
    < string > 333 < / string >
    ...
    < / PersonIdList >

    A problem I have:
    How can I assign a different value to this list?

    I posted the first element directly and then tried to add a new with append:
    < bpelx: Add >
    < bpelx: a > '12345' < / bpelx: go >
    < bpelx: to > $GetPersonsData_Request.parameters/ns2:request/ns5:PersonIdList < / bpelx: to >
    < / bpelx: Add >

    I get:
    < GetPersonsData_Request >
    < application >
    < PersonIdList >
    < string 111 > < / string >
    "12345".
    < / PersonIdList >
    < / request >

    Added as a single string, not as a structural element.

    What did I miss?

    I think that now your faced with a problem of namespaces because the element added is not the namespace of the element of the 'old' chain
    you don't have an element definition in your xsd that represents the element in your payoad?

    http://download.Oracle.com/docs/CD/E12483_01/integrate.1013/b28981/manipdoc.htm#CIHDGBGA
    http://oraclebpelindepth.blogspot.com/2008/09/arrays-in-bpel_21.html (search for bpelx: Add)

  • Create the user by using the API OIM11g R2 with custom attributes

    Friends,

    I am trying to create a user using API in OIM 11 g 2 with a custom attribute.

    < String, Object > HashMap createUserMap = new HashMap < String, Object > ();
    createUserMap.put (UserManagerConstants.AttributeName.FIRSTNAME.getId (), "Test);
    createUserMap.put (UserManagerConstants.AttributeName.LASTNAME.getId (), "tester);
    createUserMap.put (UserManagerConstants.AttributeName.USER_LOGIN.getId (), "tester1");
    createUserMap.put (UserManagerConstants.AttributeName.USERTYPE.getId (), "End user");
    createUserMap.put (UserManagerConstants.AttributeName.EMPTYPE.getId (), "EMP");
    createUserMap.put (UserManagerConstants.AttributeName.PASSWORD.getId (), "Welcome1);
    createUserMap.put (UserManagerConstants.AttributeName.EMAIL.getId (), "[email protected]");
    createUserMap.put ("act_key", new Long("1"));
    createUserMap.put ("USR_UDF_DEPTNO", "10");

    Try
    {
    UserManager userService = oimClient.getService (UserManager.class);

    User user = new User (userLogin, createUserMap);
    Result = userService.create (user) UserManagerResult;
    System.out.println ("State of creation: '" + result.getStatus ());
    }
    catch (System.Exception e)
    {
    e.printStackTrace ();
    }

    But it fails with the error below.
    Create a user application cannot set or change the USR_UDF_DEPTNO attribute, since it is not defined in the corresponding dataset. : create user: USR_UDF_DEPTNO. *

    But this attribute exists in the IOM and I was able to create the user using the user interface with this custom attribute.

    Please let me know what I am doing wrong.

    You must pass a long time don't value not int. It should be that way.

    Long deptno = 1234;
    createUserMap.put ("deptno", deptno);

  • Geocoding an address using the Google web service

    Hello

    Is it possible to access Google geocoding web service from an Oracle procedure? If Yes, then can you please give an example?
    I want to provide an address that is not formatted as an input parameter and get the coordinates, if the address is valid.

    Thank you
    M.R.

    Hello M.R.,.

    Yes, it is possible.

    Here is an example that I use myself:

     create or replace function getLatLon( p_address varchar2 ) return varchar2 is
        l_http_req  utl_http.req;
        l_http_resp utl_http.resp;
        l_response long;
        l_latlon long;  
    
        l_responsecode number;
        l_accuracy number;
    
        l_google_key varchar2(100 char) := 'Put_your_google_key_here';
    
      begin  
    
        l_http_req := utl_http.begin_request(
          url => 'http://maps.google.com/maps/geo' ||
                 '?q=' || utl_url.escape( url=> p_address, url_charset=> 'utf-8' ) ||  -- address to geocode
                 '&output=csv' ||                         -- simplest return type
                 '&gl=DE' ||                                 -- set this to your own country code
                 '&key=' || l_google_key              -- Google API site key
        );
    
        l_http_resp := utl_http.get_response( l_http_req );
        utl_http.read_text( l_http_resp, l_response );
        utl_http.end_response( l_http_resp );  
    
        l_latlon := substr( l_response, instr( l_response, ',', 1, 2 ) + 1 );  
    
        l_responsecode := substr(l_response,0,3);
        l_accuracy := substr(l_response,5,1);
    
        if l_responsecode = 200 and l_accuracy >= 8 then
          return l_latlon;
        else
          return l_latlon;
        end if;
    
      exception
        when others then return null;
      end getLatLon;
    

    This code uses the older v2 of the google api, so you still need a google api for that key. But it shouldn't be hard to change the code to use the new api v3.

    Hope this helps,
    Dirk

  • Error in the REST Web Service with the text output Format

    Hi all

    I am referencing a REST web service and can successfully connect to it and retrieve the results with the output XML value Format.

    I don't need the node values, I want to just grab the entire XML string and fill a table with her column.

    When I create a new Rest web service reference, including the text output Format value and then create a form/report to run it, I get the following error when I click on "send":

    ORA-06550: line 1, column 63: PLS-00103: encountered the symbol "end-of-file" when expects it one of the following numbers: (- + new case mod not null to other current County avg exists max min prior sql stddev sum variance execute forall time timestamp interval date fusion pipe)
    Error sending request.

    There is control in the XML characters, but surely, this is handled by the Apex, so I'm not sure what the problem is here.

    Any ideas most welcome.

    Thank you
    Rhodri

    Rhodri:

    Request Express waiting for answer text actually be answer text, delimited by other characters that denotes a new value and a new Recordset. You should leave the response as XML. The XML document will be stored in the column xmltype01 in the collection that you specify. You can then convert this column xmltype01 in a clob, if you like using the. toClobVal().

    Kind regards

    Jason

  • 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

  • Issue while deploying code that uses the api of the IOM: OIMClient

    We strive to deploy a war file with some java code that is interfaced with the IOM by using the api OIMClient. Note that we have all necessary spring pots and it works great on Tomcat. Our production env is on weblogic and when deploy us the file. War on weblogic deploys it fine. But when we test some web pages, we get the following error:

    Root cause]] of ServletException.
    java.lang.NoClassDefFoundError: org/springframework/jndi/JndiTemplate
    to oracle.iam.platform.OIMClient. < init > (OIMClient.java:83)
    ......
    Truncated. check the log file full stacktrace
    >


    The class file is available in a container called Spring framework with the same package structure: org.springframework.jndi.jnditemplate. I wonder why he cannot find the definition for this class. I also tried to delete these jars to war file and adding them to the lib dir field. I always find myself with the same exception.

    Appreciate all the help I can get.

    Published by: 958829 on Sep 12, 2012 23:01

    try to add the jar of spring separately to help:->-> deployments weblogic console add jars

  • build error of createUser using the c# code sample

    I get the following build error when you use the c# code for the createUser use method example.

    I use VisualStudio2008 and the Blackberry_Admin_API - 5.0 - US.pdf c# code example.

    Build error States:

    Cannot implicitly convert type 'BESAdmin.BASemailExchangeWebService.EnableBlackBerryUserAttributesType' in 'BESAdmin.BASCoreWebService.EnableBlackBerryUserAttributesType' C:\VS2008\BESAdmin\BESAdmin\Form1.cs 76 488 BESAdmin

    The build error is on this part of the code:

    for (int j = 0; j)< attributes.enableblackberryuserattributes.length;="">

    {

    userEnableBBAttributes.enableBlackBerryUserAttributes [j] = attributes.enableBlackBerryUserAttributes [j];

    }

    Everyone has this same problem and found the solution?  It seems that there is something missing or incorrect in the sample code around type conversion between the EnableBlackberryAttributesType.

    Thank you, Ed

    Hi Ed,

    I tried throwing the code example in a project already created the mine and has not known this error at compile. The two types of objects must be the same, so I don't know why there is no conflict with assignment.

    Please try to use the sample code to create a user from the BAA API reference documents:

    http://www.BlackBerry.com/developers/docs/BAA/5.0.0/

    Or the Knowledge Base of the developer section:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/1608023/How_To_-_Get _...

    It can also be a good idea to recreate your proxy to do this.

    Let us know if the problem is still evident with the examples above.

  • Reset the filters using the API de BAS

    Hello

    is it possible to clear filters for a user by using the BOTTOM API. What I want to do is similar to the option '-see ' using the BESUserAdminClient, it is implemented in LOWER API Web services?

    You can try BWS #setUsersEmailFilterRules () without specifying specific rules. That should fix the rules of the user for what you specify, but there is no particular call delete all mail currently rules.

    http://www.BlackBerry.com/developers/docs/BWS/Enterprise/Admin/5.0.3/

    Kind regards

  • Microsoft Visual C ++ Runtime Error - can not see the path of the file.

    When I get the runtime at startup error, I don't see the destination of the file. It is very annoying that I can not see the program that gives me the problem.

    All it says, this is:

    Runtime error!

    Program: C:\Program F...

    How can I extend the above so I can see the path of the actual file?

    Also going to go for a 2 for 1 here...

    Immediately after the closure of the runtime error box, I get the message that search settings stopped working.  I close who and everything is fine until I reboot (by making the error happen) but I'd rather not have the problem in the first place.  I run Windows 7 Ultimate.

    Error information:

    Signature of the problem:
    Problem event name: APPCRASH
    Application name: SearchSettings.exe
    Application version: 4.5.0.2
    Application timestamp: 4e04ab86
    Fault Module name: MSVCR90.dll
    Fault Module Version: 9.0.30729.4940
    Timestamp of Module error: 4ca2ef57
    Exception code: 40000015
    Exception offset: 0005beae
    OS version: 6.1.7601.2.1.0.256.1
    Locale ID: 1033
    Information additional 1:9956
    More information 2: 995611374799875ff43c42d4b1b84d70
    3 more information: 3d4b
    Additional information 4: 3d4b4db0455ea2295d172b959897673c

    Maybe just download a new MSVCR90.dll but I would like to hear what you have to say.

    Hello

    ·         Did you the latest changes on the computer?

    We must first identify to identify the program that is causing startup problems.

    Step 1:

    Check if the problem persists in safe mode.

    Start your computer in safe mode

    http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-mode

    Restart the computer to return to normal mode.

    If the problem does not persist in safe mode, then it is possible that some third-party programs installed on the computer is causing the problem.

    Step 2:

     

     

    I suggest that you put the computer in a clean boot state and check.

    To help resolve the error and other messages, you can start Windows Vista or Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    See section to learn more about how to clean boot.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Reset the computer to start as usual

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    (a) click Start, type msconfig in the search box and press ENTER.

    (b) If you are prompted for an administrator password or for confirmation, type your password or click on continue.

    (c) under the general tab, click the Normal startup option, and then click OK.

    (d) when you are prompted to restart the computer, click on restart.

  • How to use the API of the IOM in Self Service identity custom region

    Hi all

    I developed a custom in Self Service identity using this guide area: customization of the Interface - 11 g Release 2 (11.1.2.1.0)

    Inside this area, I have a simple form that allows the creation of users. This form uses the API of the IOM, in particular the following line:

    UserManager usermgr = Platform.getService(UserManager.class);
    

    The error I got is:

    < error > < oracle.iam.platform.utils.SpringBeanFactory > < BEA-000000 > < parsin instantiation Spring Bean Factory Failed.IOExceptiong XML document resource path of class [META-INF/iam-spring-config. XML]; nested exception is java.io.FileNotFoundException: resource path of class [META-INF/AIm-spring-config.] XML] could not be opened because there is no >

    I use it because I think that I am inside the ISS. For this reason I don't want to use the client method to retrieve the UserManager (which obviously works):

            String ctxFactory = "weblogic.jndi.WLInitialContextFactory";
            String serverURL = "t3://" + HOSTNAME + ":" + PORT;
            
            Hashtable env = new Hashtable();
            env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, ctxFactory);
            env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, serverURL);
            
            OIMClient oimClient = new OIMClient(env);
            try {
                oimClient.login(OIM_USERNAME, OIM_PASSWORD.toCharArray());
            } catch(LoginException e) {
                e.printStackTrace();
            }
            UserManager usermgr = client.getService(UserManager.class);
    

    It is possible to use the UserManager methods in this case?

    Thanks in advance for your help.

    Manual

    Solved.

    Just replace

    UserManager usrmgr = Platform.getService(UserManager.class);
    

    with

    UserManager usermgr = OIMClientFactory.getUserManager();
    

    Manual

Maybe you are looking for

  • Can I use the lan Ethernet port on the airport express to the release of music?

    Can I use the Ethernet connections on airport express at the exit of music over wifi to a set of speakers? I would use an Ethernet connector at one end a DIN 5 pin to a pair of speakers beolab 2500/2300. I don't want to use the PIN audio output on th

  • Lenovo A536 after OTA network problem

    Since the last LINE updated A536-S168-141219, I have had drops of appeal and if it connects I can't hear the other person. Is there any solution for this?

  • XP service Pack 3 cannot see express airport

    XP service pack 3 cannot see the apple Airport express. No problem with the windows machine 7.  All thoughts

  • always restart Windows Explorer

    whenever I open my 'downloads' and 'video' folders, a guest always appears "windows Explorer has stopped working, windows Explorer restarts, then when I right click my files/icons of the menu shows"cut, copy, properties, etc. "  pls help me thanks, I

  • Visual studio Tool box express 2013

    I express visual studio 2013.first I cut the Toolbox and then set the default window form, and now the Toolbox is empty... How to get it back.