You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by "Geir Magnusson Jr." <ge...@apache.org> on 2005/02/12 20:33:00 UTC
bug when updating an existing organization? existing service key changes?
I am not sure what to make of this. I have an organization with a
service saved on the server. I then update my org name :
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:save_business generic="2.0" xmlns="urn:uddi-org:api_v2"
xmlns:ns1="urn:uddi-org:api_v2">
<ns1:authInfo>authToken:55418A30-7D29-11D9-B9EA-E8099F0B4417</ns1:
authInfo>
<ns1:businessEntity authorizedName="juddi user"
businessKey="2E263F90-7D29-11D9-B9EA-81B6D19CC84A">
<ns1:name xml:lang="en">updatedOrgName</ns1:name>
<ns1:description/>
<ns1:contacts>
<ns1:contact>
<ns1:personName>juddi user</ns1:personName>
</ns1:contact>
</ns1:contacts>
<ns1:businessServices>
<ns1:businessService
businessKey="2E263F90-7D29-11D9-B9EA-81B6D19CC84A"
serviceKey="315DEAF0-7D29-11D9-B9EA-BC0E2BFD1618">
<ns1:name xml:lang="en">myTestService</ns1:name>
<ns1:description/>
</ns1:businessService>
</ns1:businessServices>
</ns1:businessEntity>
</ns1:save_business>
</soapenv:Body>
</soapenv:Envelope>
and i can confirm that the business key and service keys are correct
(from previous transactions)
Now - what I get back is :
HTTP/1.1 200 OK
Content-Type: text/xml;charset=utf-8
Date: Sat, 12 Feb 2005 19:07:28 GMT
Server: Apache-Coyote/1.1
Connection: close
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<businessDetail generic="2.0" operator="jUDDI.org"
xmlns="urn:uddi-org:api_v2">
<businessEntity authorizedName="juddi user"
businessKey="2E263F90-7D29-11D9-B9EA-81B6D19CC84A"
operator="jUDDI.org">
<discoveryURLs>
<discoveryURL
useType="businessEntity">http://localhost:8080/juddi//uddiget.jsp?
businesskey=2E263F90-7D29-11D9-B9EA-81B6D19CC84A</discoveryURL>
</discoveryURLs>
<name xml:lang="en">updatedOrgName</name>
<description></description>
<contacts>
<contact>
<personName>juddi user</personName>
</contact>
</contacts>
<businessServices>
<businessService
businessKey="2E263F90-7D29-11D9-B9EA-81B6D19CC84A"
serviceKey="5664D480-7D29-11D9-B9EA-9872473E3EA6">
<name xml:lang="en">myTestService</name>
<description></description>
</businessService>
</businessServices>
</businessEntity>
</businessDetail>
</soapenv:Body>
</soapenv:Envelope>
Notice how the service key changed? Is that right?
geir
--
Geir Magnusson Jr +1-203-665-6437
geirm@apache.org
Re: bug when updating an existing organization? existing service key changes?
Posted by "Geir Magnusson Jr." <ge...@apache.org>.
Well, I may be missing something basic (probably am...) but the
following patch makes JAXR happy...
Index: JDBCDataStore.java
===================================================================
RCS file:
/home/cvspublic/ws-juddi/src/java/org/apache/juddi/datastore/jdbc/
JDBCDataStore.java,v
retrieving revision 1.9
diff -r1.9 JDBCDataStore.java
460a461,467
>
> String serviceKey = service.getServiceKey();
>
> if ((serviceKey == null) || (serviceKey.length() == 0)) {
> service.setServiceKey(uuidgen.uuidgen());
> }
>
462d468
< service.setServiceKey(uuidgen.uuidgen());
Do you want this here or in JIRA?
On Feb 12, 2005, at 2:41 PM, Geir Magnusson Jr wrote:
> I see why.
>
> In JDBCDataStore, you don't care if the service already has a key when
> saving the business, you create a new one for it. I assume that's a
> bug, because you probably want to check if it's existing and not do
> anything if so?
>
> I'll fix, test and send a patch.
>
>
--
Geir Magnusson Jr +1-203-665-6437
geirm@apache.org
Re: bug when updating an existing organization? existing service key changes?
Posted by Geir Magnusson Jr <ge...@4quarters.com>.
I see why.
In JDBCDataStore, you don't care if the service already has a key when
saving the business, you create a new one for it. I assume that's a
bug, because you probably want to check if it's existing and not do
anything if so?
I'll fix, test and send a patch.
geir
On Feb 12, 2005, at 2:33 PM, Geir Magnusson Jr. wrote:
> I am not sure what to make of this. I have an organization with a
> service saved on the server. I then update my org name :
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <ns1:save_business generic="2.0" xmlns="urn:uddi-org:api_v2"
> xmlns:ns1="urn:uddi-org:api_v2">
>
> <ns1:authInfo>authToken:55418A30-7D29-11D9-B9EA-E8099F0B4417</ns1:
> authInfo>
> <ns1:businessEntity authorizedName="juddi user"
> businessKey="2E263F90-7D29-11D9-B9EA-81B6D19CC84A">
> <ns1:name xml:lang="en">updatedOrgName</ns1:name>
> <ns1:description/>
> <ns1:contacts>
> <ns1:contact>
> <ns1:personName>juddi user</ns1:personName>
> </ns1:contact>
> </ns1:contacts>
> <ns1:businessServices>
> <ns1:businessService
> businessKey="2E263F90-7D29-11D9-B9EA-81B6D19CC84A"
> serviceKey="315DEAF0-7D29-11D9-B9EA-BC0E2BFD1618">
> <ns1:name
> xml:lang="en">myTestService</ns1:name>
> <ns1:description/>
> </ns1:businessService>
> </ns1:businessServices>
> </ns1:businessEntity>
> </ns1:save_business>
> </soapenv:Body>
> </soapenv:Envelope>
>
> and i can confirm that the business key and service keys are correct
> (from previous transactions)
>
> Now - what I get back is :
>
> HTTP/1.1 200 OK
> Content-Type: text/xml;charset=utf-8
> Date: Sat, 12 Feb 2005 19:07:28 GMT
> Server: Apache-Coyote/1.1
> Connection: close
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <businessDetail generic="2.0" operator="jUDDI.org"
> xmlns="urn:uddi-org:api_v2">
> <businessEntity authorizedName="juddi user"
> businessKey="2E263F90-7D29-11D9-B9EA-81B6D19CC84A"
> operator="jUDDI.org">
> <discoveryURLs>
> <discoveryURL
> useType="businessEntity">http://localhost:8080/juddi//uddiget.jsp?
> businesskey=2E263F90-7D29-11D9-B9EA-81B6D19CC84A</discoveryURL>
> </discoveryURLs>
> <name xml:lang="en">updatedOrgName</name>
> <description></description>
> <contacts>
> <contact>
> <personName>juddi user</personName>
> </contact>
> </contacts>
> <businessServices>
> <businessService
> businessKey="2E263F90-7D29-11D9-B9EA-81B6D19CC84A"
> serviceKey="5664D480-7D29-11D9-B9EA-9872473E3EA6">
> <name xml:lang="en">myTestService</name>
> <description></description>
> </businessService>
> </businessServices>
> </businessEntity>
> </businessDetail>
> </soapenv:Body>
> </soapenv:Envelope>
>
> Notice how the service key changed? Is that right?
>
> geir
>
> --
> Geir Magnusson Jr +1-203-665-6437
> geirm@apache.org
>
>
--
Geir Magnusson Jr +1-203-665-6437
geir@gluecode.com