|
From: Patrick Y. <kc...@ce...> - 2005-12-28 08:57:22
|
I would vote yes for the change. Thanks Ladislav for pointing this out.
Regards,
Patrick Yee
Center for E-Commerce Infrastructure Development
Making E-Commerce Everyday Commerce
Ladislav Urban wrote:
>Hello hermes developers,
>I have found bug in ebxml header. For example if I call
>setFromRole(null) with null value. This method creates empty Element
><eb:Role/> . This problem is repeated in setToRole and possibly other
>methods.
>I fixed the problem:
>
>Do you agree with this solution?
>
>
>public void setToRole(String role) throws SOAPException {
> if (role != null) {
>
> if (toRole == null) {
> if (toPartyIds.size() > 0) {
> to.addChildElement(ELEMENT_ROLE, role);
> }
> toRole = role;
> } else {
> throw new SOAPValidationException(
> SOAPValidationException.SOAP_FAULT_CLIENT, "<"
> + NAMESPACE_PREFIX_EB + ":" +
>ELEMENT_ROLE
> + "> has already been " + "set in <"
> + NAMESPACE_PREFIX_EB + ":" + ELEMENT_TO
>+ ">!");
> }
>
> }
> }
>
>
>
>
>
>
>
> <eb:From>
> <eb:PartyId
>eb:type="urn:oasis:names:tc:ebxml-cppa:partyid-type:duns">AutoMateHub</eb:PartyId>
> <eb:Role/>
> <eb:Role>Seller</eb:Role>
> </eb:From>
> <eb:To>
> <eb:PartyId
>eb:type="urn:oasis:names:tc:ebxml-cppa:partyid-type:duns">TestDriver</eb:PartyId>
> <eb:Role>Buyer</eb:Role>
> </eb:To>
>
>
>
|