Header Ads

  • Breaking Now

    How to register Web Services with UDDI4j?

    Here we go with a snippet of code to register a web service using UDDI4j

    ****BEGIN****

    proxy.setPublishURL(uddiPublishingURI);
    AuthToken token = proxy.get_authToken(mUserName, mPassword);
    Vector entities = new Vector();
    BusinessEntity be = new BusinessEntity("", mBusinessEntityName);// set all related data

    BusinessDetail bd = proxy.save_business(token.getAuthInfoString(), entities);
    Vector businessEntities = bd.getBusinessEntityVector();
    BusinessEntity returnedBusinessEntity = (BusinessEntity) (businessEntities.elementAt(0));
    mServiceKey = returnedBusinessEntity.getBusinessServices().get(0).getServiceKey();

    ****END****

    'mServiceKey' will be used to extract to get URL of a registered Service from a UDDI Registry,and here is another snippet which helps you in locating a service :

    ****BEGIN****

    UDDIProxy proxy = new UDDIProxy();
    proxy.setInquiryURL("http://localhost:9090/juddi/inquiry");
    ServiceDetail serviceDetail = proxy.get_serviceDetail(mServiceKey);
    Vector businessServiceVector = new Vector();
    businessServiceVector = serviceDetail.getBusinessServiceVector();
    BusinessService returnedBusinessService = (BusinessService) (businessServiceVector.get(0));
    AccessPoint = returnedBusinessService.getBindingTemplates().get(0).getAccessPoint().getText();

    ****END****

    Now the whole picture with all its ingredients put together makes webservice functioning.

    Individually, any one of these technologies(SOAP,UDDI,WSDL etc) is only evolutionary. Each provides a standard for the next step in the advancement of web services, their description, or their discovery.

    However, one of the big promises of web services is seamless, automatic business integration:

    A piece of software will discover, access, integrate, and invoke new services from unknown
    companies dynamically without the need for human intervention.

    Dynamic integration of this nature requires the combined involvement of SOAP, WSDL, and UDDI to provide a dynamic, standard infrastructure for enabling the dynamic business of tomorrow.

    Combined, these technologies are revolutionary because they are the first standard technologies to offer the promise of a dynamic business. In the past, technologies provided features equivalent to SOAP, WSDL, and UDDI in other languages, but they weren't supported by every major corporation and did not have a core language as flexible as XML.

    Post Top Ad

    Post Bottom Ad