private SensorSoapHttpBindingStub getSensorService( EndpointReferenceType endpointReferenceType )
throws ServiceException,
MalformedURLException
{
URL sensorUrl = new URL( endpointReferenceType.getAddress( ).toString( ) );
SensorWsdmServiceLocator sensorLocator = new SensorWsdmServiceLocator( );
SensorSoapHttpBindingStub sensorStub = (SensorSoapHttpBindingStub) sensorLocator.getsensor( sensorUrl );
sensorStub.setResourceId( AddressingUtils.getResourceId( endpointReferenceType.getProperties( ) ) );
return sensorStub;
}