Topic
  • 4 replies
  • Latest Post - ‏2012-01-11T16:32:02Z by aryan_raj
aryan_raj
aryan_raj
67 Posts

Pinned topic Invoke builders from java

‏2012-01-10T19:01:19Z |
Hi All,
I am new to wpf, using wpf v6.1.5, how to invoke SQL Call builder from java code.
Updated on 2012-01-11T16:32:02Z at 2012-01-11T16:32:02Z by aryan_raj
  • aryan_raj
    aryan_raj
    67 Posts

    Re: Invoke builders from java

    ‏2012-01-11T03:30:44Z  
    Below code is generated by consumer,

    public IXml employeeInformationServiceConsumerMyEmployeeInfoOperation(WebAppAccess webAppAccess)
    {
    Object result = webAppAccess.callMethod("employeeInformationServiceConsumer.executeOperation", "myEmployeeInfoOperation", Boolean.FALSE );
    if (result instanceof WebAppAccessConsumer) {
    ((WebAppAccessConsumer)result).setWebAppAccess(webAppAccess);
    }
    return (IXml)result;
    }

    So, I called my consumer from my java class using the below code, it is working but can somebody tell me what is "WebAppAccessConsumer" object.

    Object myObj = webAppAccess.callMethod("employeeInformationServiceConsumer.executeOperation", "myEmployeeInfoOperation", Boolean.FALSE );
  • aryan_raj
    aryan_raj
    67 Posts

    Re: Invoke builders from java

    ‏2012-01-11T03:32:37Z  
    And one more thing, wanted to confirm whether is this the right way of calling the consumer from java.
  • mburati
    mburati
    425 Posts

    Re: Invoke builders from java

    ‏2012-01-11T14:48:11Z  
    • aryan_raj
    • ‏2012-01-11T03:32:37Z
    And one more thing, wanted to confirm whether is this the right way of calling the consumer from java.
    That generated method is a method that you could call directly, so you shouldn't need to copy the code out of it to call yourself, when you execute callMethod, try calling that generated method instead. What it's doing in there looks like some internal checks that you can rely on rather than needing to copy and understand yourself (eg, the test for WebAppAccessConsumer ...).

    When you're choosing a service operation from a picker (eg, ActionList picker) it's looking at your generated WebApp's Data Services objects, so it can determine the Method, Inputs and Outputs for that service operation. If you look in the Application Tree in the Design View for your webapp and expand the Data Services section, you should see the operations that your consumer pulls in from a provider. Click on one of those operations and you should see the Method, Inputs and Outputs that data service operation wraps. That Method displayed for the data service operation that it displays is the one you likely want to call from your Method builder or LinkedJavaObject method.

    I hope that info helps,
    ..mb1
  • aryan_raj
    aryan_raj
    67 Posts

    Re: Invoke builders from java

    ‏2012-01-11T16:32:02Z  
    • mburati
    • ‏2012-01-11T14:48:11Z
    That generated method is a method that you could call directly, so you shouldn't need to copy the code out of it to call yourself, when you execute callMethod, try calling that generated method instead. What it's doing in there looks like some internal checks that you can rely on rather than needing to copy and understand yourself (eg, the test for WebAppAccessConsumer ...).

    When you're choosing a service operation from a picker (eg, ActionList picker) it's looking at your generated WebApp's Data Services objects, so it can determine the Method, Inputs and Outputs for that service operation. If you look in the Application Tree in the Design View for your webapp and expand the Data Services section, you should see the operations that your consumer pulls in from a provider. Click on one of those operations and you should see the Method, Inputs and Outputs that data service operation wraps. That Method displayed for the data service operation that it displays is the one you likely want to call from your Method builder or LinkedJavaObject method.

    I hope that info helps,
    ..mb1
    Thank you mb1