I used following code to register my key domain;
SaveTModel st = new SaveTModel();
st.setAuthInfo(rootAuthToken.getAuthInfo());
TModel tm = new TModel();
tm.setName(new Name());
tm.getName().setValue("My Company's Keymodel generator");
tm.getName().setLang("en");
tm.setCategoryBag(new CategoryBag());
KeyedReference kr = new KeyedReference();
kr.setTModelKey("*uddi:uddi.org:categorization:types*");
kr.setKeyName("*uddi-org:servicebus*");
kr.setKeyValue("*servicebus*");
tm.getCategoryBag().getKeyedReference().add(kr);
tm.setTModelKey("*uddi:bea.com:servicebus*");
st.getTModel().add(tm);
TModelDetail saveTModel = publish.saveTModel(st);
System.out.println("Creation of Partition Success!");
And I am getting following. Do you have any idea why ?
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: The
proposed key is not within the partition defined by owning publisher:
uddi:bea.com:servicebus
at
com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at
com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:119)
at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke
On Tue, May 14, 2013 at 7:04 PM, Subash Chaturanga <[email protected]>wrote:
> May I know what is the syntax behind this,
>
> 1. KeyedReference kr = new KeyedReference();
> 2. kr.setTModelKey("uddi:uddi.org:categorization:types");
> 3. kr.setKeyName("uddi-org:keyGenerator");
> 4. kr.setKeyValue("keyGenerator");
> 5. tm.getCategoryBag().getKeyedReference().add(kr);
> 6. tm.setTModelKey("uddi:www.mycoolcompany.com:keygenerator");
> 7. st.getTModel().add(tm);
>
> Lines #3 #4 #6 has the name "keygenerator" (Does all 3 needs to be
> same?). Are we here registering a key called "keygenerator" for the
> domain "uddi.org" ?
>
>
> On Tue, May 14, 2013 at 6:53 PM, Subash Chaturanga <[email protected]>wrote:
>
>>
>>
>> On Tue, May 14, 2013 at 6:39 PM, Alex O'Ree <[email protected]>wrote:
>>
>>> Try using uddi uddi for the user name and pass
>>>
>> Same result ;(
>>
>>
>>> On May 14, 2013 8:42 AM, "Subash Chaturanga" <[email protected]>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Tue, May 14, 2013 at 4:30 PM, Alex O'Ree <[email protected]>wrote:
>>>>
>>>>> Check out the blog post
>>>>>
>>>>> http://apachejuddi.blogspot.com/2013/03/uddi-howto-create-tmodels-with-custom.html
>>>>>
>>>>> I'm assuming you are trying to save something while defining your own
>>>>> key (business, service, tmodel, binding template,etc). That post
>>>>> explains what to do in order to setup your own key domain, also known
>>>>> as a key partition or a key generator
>>>>>
>>>>
>>>> Thanks Alex for the quick response.
>>>> I went through the blog post initially and I ran that code against the
>>>> JUDDI. When try to save tModel, then it says
>>>> "javax.xml.ws.soap.SOAPFaultException: A Key Generator cannot be added for
>>>> the root publisher".
>>>>
>>>> In fact I am configuring oracle service bus with JUDDI. So the one who
>>>> writes to JUDDI is OSB.
>>>>
>>>> Exception is as follows when try to publish a proxy named "foobar"
>>>>
>>>> [2013-05-14 12:53:16,871] INFO
>>>> {org.apache.cxf.phase.PhaseInterceptorChain} - Application
>>>> {urn:uddi-org:v3_service}UDDIPublicationService#{urn:uddi-org:v3_service}save_service
>>>> has thrown exception, unwinding now:
>>>> org.apache.juddi.v3.error.KeyUnavailableException: The proposed key is not
>>>> within the partition defined by owning publisher: uddi:bea.com:
>>>> servicebus:default:foobar.
>>>>
>>>> The problem is the key "uddi:bea.com:servicebus:default:foobar" is not
>>>> defined. But this key endswith the proxy name. So before each proxy
>>>> publishing from OSB side, do I have to add a key to the JUDDI by me ?
>>>> Appreciate any guidance on how this works/what needs to be done to sort
>>>> this out.
>>>>
>>>>
>>>>
>>>>>
>>>>> On Tue, May 14, 2013 at 2:24 AM, Subash Chaturanga <
>>>>> [email protected]> wrote:
>>>>> >
>>>>> > I dig in to the JUDDI code again, and it fails at
>>>>> > UddiEntityPublisher#isValidPublisherKey() method since the
>>>>> keyGeneratorKeys
>>>>> > List has only "uddi:juddi.apache.org" as a key.
>>>>> > Any idea what I am missing here?
>>>>> >
>>>>> > On Tue, May 14, 2013 at 10:05 AM, Subash Chaturanga <
>>>>> [email protected]>
>>>>> > wrote:
>>>>> >>
>>>>> >> Hi all,
>>>>> >> I was able to configure OSB with JUDDI finally . And I am getting
>>>>> $subject
>>>>> >> when publishing a proxy service to JUDDI.
>>>>> >> Any idea what I am missing here? Appreciate any feedback since I am
>>>>> at the
>>>>> >> edge of this.
>>>>> >>
>>>>> >> --
>>>>> >> Subash Chaturanga
>>>>> >>
>>>>> >> Sri Lanka
>>>>> >>
>>>>> >> Blog - http://subashsdm.blogspot.com/
>>>>> >> Twitter - http://twitter.com/subash89
>>>>> >>
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > Subash Chaturanga
>>>>> > Department of Computer Science & Engineering
>>>>> > University of Moratuwa
>>>>> > Sri Lanka
>>>>> >
>>>>> > Blog - http://subashsdm.blogspot.com/
>>>>> > Twitter - http://twitter.com/subash89
>>>>> >
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Subash Chaturanga
>>>> Department of Computer Science & Engineering
>>>> University of Moratuwa
>>>> Sri Lanka
>>>>
>>>> Blog - http://subashsdm.blogspot.com/
>>>> Twitter - http://twitter.com/subash89
>>>>
>>>>
>>>
>>
>>
>> --
>> Subash Chaturanga
>> Department of Computer Science & Engineering
>> University of Moratuwa
>> Sri Lanka
>>
>> Blog - http://subashsdm.blogspot.com/
>> Twitter - http://twitter.com/subash89
>>
>>
>
>
>
> --
> Subash Chaturanga
> Department of Computer Science & Engineering
> University of Moratuwa
> Sri Lanka
>
> Blog - http://subashsdm.blogspot.com/
> Twitter - http://twitter.com/subash89
>
>
--
Subash Chaturanga
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka
Blog - http://subashsdm.blogspot.com/
Twitter - http://twitter.com/subash89