Hi Igor,

I just went over the code and you are right; it simply parses the annotations and then calls register. So it never 'merges' with an existing service (but rather writes over another one). Please open a Jira for it. You can try making a patch yourself, you'd have to do a lookup for each service in the second for-loop below to see if it exists, and then 'merge' the existing info (bindingTemplates) with the new one before calling register. Should be fairly straightforward. If you attach the patch in jira (preferable with unittest) we will merge it in quickly.

In the UDDIClerkManager:

public void registerAnnotatedServices() {
        Map<String,UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
        if (uddiClerks.size() > 0) {
            AnnotationProcessor ap = new AnnotationProcessor();
            for (UDDIClerk uddiClerk : uddiClerks.values()) {
Collection<BusinessService> services = ap.readServiceAnnotations(
uddiClerk.getClassWithAnnotations(),uddiClerk.getUDDINode().getProperties());
                for (BusinessService businessService : services) {
log.info("Node=" + uddiClerk.getUDDINode().getApiNode().getName()); uddiClerk.register(businessService, uddiClerk.getUDDINode().getApiNode());
                }
            }
        }
    }

Cheers,

--Kurt

p.s. please register with the [email protected] mailing list, so other users may help out or be helped out by our conversation.



On 9/17/12 2:49 PM, Igor Azarny wrote:
Hi Kurt !

Couple of options was tested:

1. localhost and pc domain name as part of bindind key for different web service implementations in the same war.
2. suffix of binding key was different "-zimbra-wsdl" and "-bangolio-wsdl"

but result was not as expected - service has only one bindings. This was checked via jaxr scout and data base.

Any ideas or need to raise a bug ?

Thanks, Igor

------------------------------------------------------------------------
*From:* Kurt T Stam <[email protected]>
*To:* "[email protected]" <[email protected]>
*Cc:* Igor Azarny <[email protected]>; "[email protected]" <[email protected]>
*Sent:* Monday, September 17, 2012 8:10 PM
*Subject:* Re: juddi multiple service binding

Hi Igor,

Sure you should be able to use the same business and seriviceKey and a different bindingKey (which should happen by itself if it run on a different server).

Good luck!

-Kurt

On 9/17/12 12:09 PM, Igor Azarny wrote:
Hi Kurt !

Is it possible to register several bindings to one service key using @UDDIServiceBinding ?

Example




@UDDIService(
businessKey="uddi:${keyDomain}:${department}",
serviceKey="uddi:${keyDomain}:${department}-awardDefinitionProvider",
      description = "Bangolio award definition provider",
categoryBag="keyedReference=keyName=uddi-org:types:wsdl;keyValue=wsdlDeployment;tModelKey=uddi:uddi.org:categorization:types")

@UDDIServiceBinding(
bindingKey="uddi:${keyDomain}:${serverName}-${serverPort}-${department}-bangolio-wsdl",
description="WSDL endpoint for the bangolio award definition provider",
      accessPointType="wsdlDeployment",
accessPoint="http://$ <http://%24/>{serverName}:${serverPort}/aprod/services/bangolioawarddefinitionprovider?wsdl",
categoryBag="keyedReference=keyName=uddi-org:types:wsdl;keyValue=wsdlDeployment;tModelKey=uddi:uddi.org:categorization:types"
)
@WebService (
      endpointInterface = "org.domainAwardDefinitionProvider",
      serviceName = "awardDefinitionProvider"
)
public class BangolioAwardDefinitionProviderImpl implements AwardDefinitionProvider , ServletContextAware {



@UDDIService(
businessKey="uddi:${keyDomain}:${department}",
serviceKey="uddi:${keyDomain}:${department}-awardDefinitionProvider",
      description = "Zimbra award definition provider",
categoryBag="keyedReference=keyName=uddi-org:types:wsdl;keyValue=wsdlDeployment;tModelKey=uddi:uddi.org:categorization:types")

@UDDIServiceBinding(
bindingKey="uddi:${keyDomain}:${serverName}-${serverPort}-${department}-zimbra-wsdl",
description="WSDL endpoint for the zimbra award definition provider",
      accessPointType="wsdlDeployment",
accessPoint="http://$ <http://%24/>{serverName}:${serverPort}/aprod/services/zimbraawarddefinitionprovider?wsdl",
categoryBag="keyedReference=keyName=uddi-org:types:wsdl;keyValue=wsdlDeployment;tModelKey=uddi:uddi.org:categorization:types"
)

@WebService (
      endpointInterface = "org.domainAwardDefinitionProvider",
      serviceName = "awardDefinitionProvider"
)
public class ZimbraAwardDefinitionProviderImpl implements AwardDefinitionProvider , ServletContextAware {



Thanks, Igor




Reply via email to