|
From: Ladislav U. <lad...@we...> - 2005-12-27 20:59:33
|
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>
--
Ladislav Urban
CEO
Webswell Inc.
1333 Howe Avenue, Suite 100
Sacramento, 95825 CA
email: lad...@we...
phone: +1 (916) 290-2040
fax: +1 (916) 921-2850
http://www.webswell.com
|