juddi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Faath" <jfa...@apache.org>
Subject RE: Saving a new business with no services in it seems to create a corrupted business record
Date Wed, 18 Nov 2009 22:00:53 GMT
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).


-----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.


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: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

View raw message