SOAPHeader soapHeader = context.getSOAPMessage( ).getSOAPHeader( );
Iterator resourceIdElemsIter =
soapHeader.getChildElements( NameUtils.toName( getResourceIdentifierReferenceParameterQName( ) ) );
if ( !resourceIdElemsIter.hasNext( ) )
{
throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
"The expected resource identifier reference parameter named "
+ getResourceIdentifierReferenceParameterName( )
+ " was not found in the SOAP header." );
}
SOAPHeaderElement resourceIdElem = (SOAPHeaderElement) resourceIdElemsIter.next( );
if ( resourceIdElemsIter.hasNext( ) )
{
throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
"More than one resource identifier reference parameter named "
+ getResourceIdentifierReferenceParameterName( )
+ " was found in the SOAP header. Exactly one is expected." );
}