Header header = envelope.addNewHeader( );
XmlObject toElem;
XmlObject actionElem;
org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument toDoc =
org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument.Factory.newInstance( );
AttributedURI attributedURI = toDoc.addNewTo( );
attributedURI.setStringValue( address );
toElem = toDoc;
org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument actionDoc =
org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument.Factory.newInstance( );
AttributedURI actionType = actionDoc.addNewAction( );
actionType.setStringValue( MetadataExchangeConstants.ACTION_GET_REQUEST );
actionElem = actionDoc;
XmlBeanUtils.addChildElement( header, toElem );
XmlBeanUtils.addChildElement( header, actionElem );
if ( endpointReferenceType.getReferenceProperties( ) != null )