You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by Bryan Pendleton <bp...@amberpoint.com> on 2009/11/18 20:33:32 UTC

Saving a new business with no services in it seems to create a corrupted business record

Hi All,

It seems that if I create a publish a brand new business entity
to the 'uddi' publisher, by sending the request:

       <urn:save_business>
          <urn:authInfo>authtoken:5ece2884-694e-4341-b856-2a9d7c418aa6</urn:authInfo>
          <urn:businessEntity businessKey="uddi:uddi.org:MyBusinessKey">
             <urn:name >MySampleBusiness</urn:name>
          </urn:businessEntity>
       </urn:save_business>

I get back a successful response (a <businessDetail> message, with the detail
of my new business.

But then if I call <find_Business> for that business entity, I get a hard
'marshalling error', and in the logs I find the following:

[org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: The content of element
'serviceInfos' is not complete. One of '{"urn:uddi-org:api_v3":serviceInfo}' is
expected.]

I have no trouble calling <find_business> for business entities which have
one or more business services.

Should it be legal to have a business entity which has no services contained
within it?

thanks,

bryan


Re: Saving a new business with no services in it seems to create a corrupted business record

Posted by Steve Viens <st...@viens.net>.
Hey guys, I noticed the same issue over the weekend.  Saving a
BusinessEntity with no BusinessServices worked but the jUDDI Client choked
(validation error) when trying to locate the BusinessEntity via
FindBusiness.  UDDIv3 XSD indicates that if a BusinessInfos element exists
then at least one BusinessInfo must as well.  I believe this issue effects
the following collection elements as well:

 ServiceInfos
TModelInfos
BusinessServices
BindingTemplates
TModels
DiscoveryURLs

Unsure but this may also be present in complex types such as the DeleteXxxxx
servcies which also expect at minimum one key.  I was just working on some
jUnit tests to validate messages against the UDDIv3 XSD to shake out any
others.

Steve

Re: Saving a new business with no services in it seems to create a corrupted business record

Posted by Kurt T Stam <ku...@gmail.com>.
It's good to see some discussion on the dev list :)! I have fixed, 
following Jeffs suggested fix to set the object to null.

https://issues.apache.org/jira/browse/JUDDI-312

I added a test in the unittest suite to reproduce and prove the fix. 
Please let us know if there are more issues list this.

Cheers,

--Kurt



Jeremi Thebeau wrote:
> Hi Guys,
>
> I noticed this when I was writing load test for juddi. This may be 
> obvious to others but I will mention it in case it isn't. The 
> serviceless business returns an error when it is found via 
> FindBusiness but this also means that any other businesses that match 
> the criteria are also not returned since all you get back is a 
> marshalling error. So if the name of my serviceless business is "Soap 
> producer 1" and there is also a business called "Soap and detergent 
> intl." (with services), a search via FindBusiness that has the 
> criteria BusinessName= "Soap" won't return the perfectly legally 
> existing "Soap and detergent intl." business.
>
> This may have been fixed already. I haven't worked with juddi in a 
> while. Just though it might be worth a mention.
>
> Jeremi
>
> Steve Viens wrote:
>> Hey guys, I noticed the same issue over the weekend.  Saving a 
>> BusinessEntity with no BusinessServices worked but the jUDDI Client 
>> choked (validation error) when trying to locate the BusinessEntity 
>> via FindBusiness.  UDDIv3 XSD indicates that if a BusinessInfos 
>> element exists then at least one BusinessInfo must as well.  I 
>> believe this issue effects the following collection elements as well:
>>  
>> ServiceInfos
>> TModelInfos
>> BusinessServices
>> BindingTemplates
>> TModels
>> DiscoveryURLs
>>  
>> Unsure but this may also be present in complex types such as the 
>> DeleteXxxxx servcies which also expect at minimum one key.  I was 
>> just working on some jUnit tests to validate messages against the 
>> UDDIv3 XSD to shake out any others.
>>  
>> Steve 
>


Re: Saving a new business with no services in it seems to create a corrupted business record

Posted by Jeremi Thebeau <j....@xceptance.de>.
Hi Guys,

I noticed this when I was writing load test for juddi. This may be 
obvious to others but I will mention it in case it isn't. The 
serviceless business returns an error when it is found via FindBusiness 
but this also means that any other businesses that match the criteria 
are also not returned since all you get back is a marshalling error. So 
if the name of my serviceless business is "Soap producer 1" and there is 
also a business called "Soap and detergent intl." (with services), a 
search via FindBusiness that has the criteria BusinessName= "Soap" won't 
return the perfectly legally existing "Soap and detergent intl." business.

This may have been fixed already. I haven't worked with juddi in a 
while. Just though it might be worth a mention.

Jeremi

Steve Viens wrote:
> Hey guys, I noticed the same issue over the weekend.  Saving a 
> BusinessEntity with no BusinessServices worked but the jUDDI Client 
> choked (validation error) when trying to locate the BusinessEntity via 
> FindBusiness.  UDDIv3 XSD indicates that if a BusinessInfos element 
> exists then at least one BusinessInfo must as well.  I believe this 
> issue effects the following collection elements as well:
>  
> ServiceInfos
> TModelInfos
> BusinessServices
> BindingTemplates
> TModels
> DiscoveryURLs
>  
> Unsure but this may also be present in complex types such as the 
> DeleteXxxxx servcies which also expect at minimum one key.  I was just 
> working on some jUnit tests to validate messages against the UDDIv3 
> XSD to shake out any others.
>  
> Steve 

Re: Saving a new business with no services in it seems to create a corrupted business record

Posted by Steve Viens <st...@viens.net>.
Hey guys, I noticed the same issue over the weekend.  Saving a
BusinessEntity with no BusinessServices worked but the jUDDI Client choked
(validation error) when trying to locate the BusinessEntity via
FindBusiness.  UDDIv3 XSD indicates that if a BusinessInfos element exists
then at least one BusinessInfo must as well.  I believe this issue effects
the following collection elements as well:

ServiceInfos
TModelInfos
BusinessServices
BindingTemplates
TModels
DiscoveryURLs

Unsure but this may also be present in complex types such as the DeleteXxxxx
servcies which also expect at minimum one key.  I was just working on some
jUnit tests to validate messages against the UDDIv3 XSD to shake out any
others.

Steve

RE: Saving a new business with no services in it seems to create a corrupted business record

Posted by Jeff Faath <jf...@apache.org>.
Actually, I think the problem is returning a non-null serviceInfos without
any serviceInfo.  Probably somewhere in the mapping layer, the serviceInfos
is created, the services looped through (adding serviceInfo to the
serviceInfos) and then the serviceInfos is set for the parent the
businessInfo.  So, even if there are no services, a non-null serviceInfos is
still set.  This would cause the JAXB marshaller to output a serviceInfos
element (with no serviceInfo elements).

The fix would be to make sure the serviceInfos is null if there are no
services.  The same issue probably occurs for other child collections (ex.
The bindingTemplates of services).

-Jeff

-----Original Message-----
From: Kurt T Stam [mailto:kurt.stam@gmail.com] 
Sent: Wednesday, November 18, 2009 3:12 PM
To: juddi-dev@ws.apache.org
Subject: Re: Saving a new business with no services in it seems to create a
corrupted business record

The WSDL provided by the spec was used, and this is enforcing it. We 
could diverge from the spec, but I'd rather not. Please let us know if 
this is a big issue for you.

--Kurt


Bryan Pendleton wrote:
> Hi All,
>
> It seems that if I create a publish a brand new business entity
> to the 'uddi' publisher, by sending the request:
>
>       <urn:save_business>
>          
>
<urn:authInfo>authtoken:5ece2884-694e-4341-b856-2a9d7c418aa6</urn:authInfo> 
>
>          <urn:businessEntity businessKey="uddi:uddi.org:MyBusinessKey">
>             <urn:name >MySampleBusiness</urn:name>
>          </urn:businessEntity>
>       </urn:save_business>
>
> I get back a successful response (a <businessDetail> message, with the 
> detail
> of my new business.
>
> But then if I call <find_Business> for that business entity, I get a hard
> 'marshalling error', and in the logs I find the following:
>
> [org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: The content of 
> element
> 'serviceInfos' is not complete. One of 
> '{"urn:uddi-org:api_v3":serviceInfo}' is
> expected.]
>
> I have no trouble calling <find_business> for business entities which 
> have
> one or more business services.
>
> Should it be legal to have a business entity which has no services 
> contained
> within it?
>
> thanks,
>
> bryan
>
>



Re: Saving a new business with no services in it seems to create a corrupted business record

Posted by Kurt T Stam <ku...@gmail.com>.
The WSDL provided by the spec was used, and this is enforcing it. We 
could diverge from the spec, but I'd rather not. Please let us know if 
this is a big issue for you.

--Kurt


Bryan Pendleton wrote:
> Hi All,
>
> It seems that if I create a publish a brand new business entity
> to the 'uddi' publisher, by sending the request:
>
>       <urn:save_business>
>          
> <urn:authInfo>authtoken:5ece2884-694e-4341-b856-2a9d7c418aa6</urn:authInfo> 
>
>          <urn:businessEntity businessKey="uddi:uddi.org:MyBusinessKey">
>             <urn:name >MySampleBusiness</urn:name>
>          </urn:businessEntity>
>       </urn:save_business>
>
> I get back a successful response (a <businessDetail> message, with the 
> detail
> of my new business.
>
> But then if I call <find_Business> for that business entity, I get a hard
> 'marshalling error', and in the logs I find the following:
>
> [org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: The content of 
> element
> 'serviceInfos' is not complete. One of 
> '{"urn:uddi-org:api_v3":serviceInfo}' is
> expected.]
>
> I have no trouble calling <find_business> for business entities which 
> have
> one or more business services.
>
> Should it be legal to have a business entity which has no services 
> contained
> within it?
>
> thanks,
>
> bryan
>
>