Skip to main content
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    SDK3.0 Use Stubs Instead of WS Locator

    • Article Type: General
    • Product: Rosetta
    • Product Version: 3.2.1

    Desired Outcome Goal:
    When customer uses SDK3.0, the way the WS is called must be changed to use stubs instead of WS locator.

    Instead of using the old lookup call:
    1. String producerWSDL = hostURL + "/dpsws/backoffice/ProducerWebServices?wsdl";
    2. WebServiceLocator.getInstance().lookUp(ProducerWebServices.class, producerWSDL)

    Use the generated stub (in this case it is ProducerWebServices_Service)
    ProducerWebServices producerWebServices = new ProducerWebServices_Service(new URL(producerWSDL),new QName("", "ProducerWebServices")).getProducerWebServicesPort();

    Then use the stub services:
    String producerAgentId = producerWebServices.getInternalUserIdByExternalId(userName);

    Additional Information

    Ex Libris recommends checking the FullFlowExample in the SDK.
    It includes many other examples and is also documented in EL Commons.

    Category: SDK - Rosetta

    Subject: Rosetta

    • Article last edited: 3/11/2014