|
From: Ladislav U. <lad...@we...> - 2005-12-27 21:45:37
|
The same problem is for public void setTimeToLive(String time) throws
SOAPException
I applied the same fix
On Tue, 2005-12-27 at 15:59 -0500, 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>
>
|